/* =============================================
   پاپ‌آپ تأیید ثبت‌نام وبینار
   دسکتاپ: modal مرکزی
   موبایل: bottom sheet
   ============================================= */

/* --- Overlay --- */
.webinar-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.webinar-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* --- Modal Box (دسکتاپ) --- */
.webinar-popup-box {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px 32px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    direction: rtl;
    font-family: "DanaFaNum", Tahoma, Arial, sans-serif;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}

.webinar-popup-overlay.is-open .webinar-popup-box {
    transform: translateY(0) scale(1);
}

/* --- دکمه بستن --- */
.webinar-popup-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #555;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
}

.webinar-popup-close:hover {
    color: #a5a5a5;
    background: #fff;
}

/* --- آیکون تیک --- */
.webinar-popup-icon {
    width: 64px;
    height: 64px;
    background: #e8f9ee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.webinar-popup-icon svg {
    width: 34px;
    height: 34px;
    color: #16803a;
}

/* --- عنوان --- */
.webinar-popup-title {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
    color: #111111;
    line-height: 1.5;
}

/* --- متن توضیح --- */
.webinar-popup-subtitle {
    margin: 0 0 22px;
    font-size: 17px;
    color: #444;
    line-height: 1.9;
}

/* --- باکس اطلاعات شرکت --- */
.webinar-popup-info {
    margin-bottom: 10px;
    text-align: right;
    border-top: 3px dashed #e3e3e3;
    padding-top: 15px;
}

.webinar-popup-info-label {
    font-size: 15px;
    font-weight: 800;
    color: #292929;
    margin-bottom: 10px;
    display: block;
}

/* --- ردیف لینک --- */
.webinar-popup-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    direction: ltr;
}

.webinar-popup-link-text {
    flex: 1;
    font-size: 18px;
    color: #03A9F4;
    word-break: break-all;
    text-align: left;
    text-decoration: none;
}

.webinar-popup-link-text:hover {
    text-decoration: underline;
}

/* --- دکمه کپی --- */
.webinar-popup-copy-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    background: #f0f4ff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    padding: 0;
    position: relative;
}

.webinar-popup-copy-btn:hover {
    background: #dce8ff;
}

.webinar-popup-copy-btn svg {
    width: 17px;
    height: 17px;
    color: #5b5b5b;
    transition: opacity 0.2s ease;
}

/* آیکون تیک بعد از کپی */
.webinar-popup-copy-btn .icon-copied {
    display: none;
    color: #16803a;
}

.webinar-popup-copy-btn.copied .icon-copy {
    display: none;
}

.webinar-popup-copy-btn.copied .icon-copied {
    display: block;
}

.webinar-popup-copy-btn.copied {
    background: #e8f9ee;
}

/* --- نکته ذخیره لینک --- */
.webinar-popup-note {
    font-size: 17px;
    color: #388E3C;
    margin-top: 10px;
    background: #E8F5E9;
    text-align: center;
    padding: 8px;
    border-radius: 10px;
}

/* ==============================================
   موبایل: تبدیل به bottom sheet
   ============================================== */
@media (max-width: 600px) {
    .webinar-popup-overlay {
        align-items: flex-end;
        padding: 0;
    }

        .webinar-popup-box {
            max-width: 100%;
            border-radius: 20px 20px 0 0;
            padding: 0 12px;
            transform: translateY(100%);
            transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        }

    .webinar-popup-overlay.is-open .webinar-popup-box {
        transform: translateY(0);
    }

    /* دستگیره بالای bottom sheet */
    .webinar-popup-box::before {
        content: "";
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 4px;
        margin: 8px auto 20px;
    }

                .webinar-popup-close {
                    top: 9px;
                    left: 5px;
                }
}
