/**
 * Post Share Styles
 * 
 * @package Plus_Modiresabz
 * @since 1.2.0
 */

/* ===== دکمه تریگر ===== */
.pshare-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 5px;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}
@media (max-width: 767px) {
    .pshare-trigger {
        width: 32px;
        height: 32px;
    }
}

.pshare-trigger:hover {
    border-color: #334155;
    color: #0f172a;
}

.pshare-trigger img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ===== بک‌دراپ ===== */
.pshare-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pshare-backdrop.pshare-active {
    opacity: 1;
    visibility: visible;
}

/* ===== پنل اصلی ===== */
.pshare-panel {
    position: fixed;
    z-index: 999999;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    border-radius: 0;
}

/* دسکتاپ: پاپ‌آپ وسط صفحه */
@media (min-width: 769px) {
    .pshare-panel {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        width: 440px;
        max-height: 85vh;
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    .pshare-panel.pshare-active {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        visibility: visible;
    }

    .pshare-drag-handle {
        display: none;
    }
}

/* موبایل: اسلاید از پایین */
@media (max-width: 768px) {
    .pshare-panel {
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        will-change: transform;
        touch-action: none;
    }

    .pshare-panel.pshare-active {
        transform: translateY(0);
    }

    .pshare-panel.pshare-dragging {
        transition: none;
    }
}

/* ===== هندل درگ (موبایل) ===== */
.pshare-drag-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
    cursor: grab;
}

.pshare-drag-handle span {
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    display: block;
    border-radius: 0;
}

/* ===== هدر ===== */
.pshare-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.pshare-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.pshare-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
}

.pshare-close:hover {
    background: #e2e8f0;
}

/* ===== زیرعنوان ===== */
.pshare-subtitle {
    margin: 8px 24px 20px;
    font-size: 14px;
    color: #64748b;
}

/* ===== شبکه‌ها ===== */
.pshare-networks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 24px 20px;
}

.pshare-net-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border: none;
    background: #f8fafc;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
    color: inherit;
}

.pshare-net-btn:hover {
    background: #f1f5f9;
}

.pshare-net-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0;
}

.pshare-net-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.pshare-net-icon--default {
    background: #e2e8f0;
    color: #64748b;
}

.pshare-net-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    line-height: 1.3;
}

/* ===== بخش لینک ===== */
.pshare-link-section {
    padding: 0 24px 20px;
}

.pshare-link-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.pshare-link-box {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    overflow: hidden;
    border-radius: 0;
}

.pshare-link-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: #f8fafc;
    font-size: 13px;
    color: #334155;
    direction: ltr;
    text-align: left;
    outline: none;
}

.pshare-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    border-right: 2px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
    flex-shrink: 0;
}

.pshare-copy-btn:hover {
    background: #f1f5f9;
}

.pshare-copy-btn.pshare-copied {
    color: #10b981;
}

/* ===== دکمه بستن پایین ===== */
.pshare-close-btn {
    display: block;
    width: calc(100% - 48px);
    margin: 0 24px 24px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
}

.pshare-close-btn:hover {
    background: #f8fafc;
}