/* ─── WP WhatsApp Connect — Login Button & Modal ─── */

/* ─── WhatsApp Login Button ─── */
.wwa-btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 380px;
    transition: background-color .2s, transform .15s;
    box-shadow: 0 4px 14px rgba(37,211,102,.3);
    font-family: inherit;
}
.wwa-btn-main:hover {
    background-color: #20ba5a;
    transform: translateY(-1px);
}
.wwa-btn-main:active { transform: translateY(0); }

/* ─── Separator ─── */
.wwa-login-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    width: 100%;
}
.wwa-login-separator hr {
    flex: 1;
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 0;
}
.wwa-login-separator span {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
}

/* ─── Modal Overlay ─── */
.wwa-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    animation: wwaFadeIn .2s ease;
}
.wwa-modal-overlay.wwa-active {
    display: flex !important;
}
@keyframes wwaFadeIn { from { opacity: 0; } to { opacity: 1; } }

.wwa-modal-box {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    animation: wwaSlideUp .25s ease;
    text-align: center;
    font-family: IRANSans, Vazirmatn, Tahoma, sans-serif;
    direction: rtl;
}
@keyframes wwaSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.wwa-modal-close {
    position: absolute;
    top: 14px;
    left: 16px;
    background: #f0f2f5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.wwa-modal-close:hover { background: #e2e6ea; }

/* ─── Steps ─── */
.wwa-step { padding: 8px 0; }

.wwa-modal-header { margin-bottom: 20px; }
.wwa-modal-header h3 {
    margin: 12px 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
}
.wwa-sub {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* ─── QR Code ─── */
.wwa-qr-wrap {
    margin: 0 auto 16px;
    display: none;
}
@media (min-width: 600px) {
    .wwa-qr-wrap { display: block; }
}
.wwa-qr-wrap img {
    border-radius: 10px;
    border: 2px solid #e2e6ea;
    width: 160px;
    height: 160px;
    display: block;
    margin: 0 auto 6px;
}
.wwa-qr-hint { font-size: 12px; color: #9ca3af; margin: 0; }

/* ─── Session Code Box ─── */
.wwa-code-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9ff;
    border: 1px dashed #c7d2fe;
    border-radius: 8px;
    padding: 8px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}
.wwa-code-label { color: #6b7280; }
.wwa-code-val {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #128C7E;
    direction: ltr;
}

/* ─── WhatsApp Action Button ─── */
.wwa-btn-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    border-radius: 10px;
    padding: 13px 26px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, .3);
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}
.wwa-btn-wa:hover {
    opacity: .9;
    transform: translateY(-1px);
    color: #fff;
}

/* ─── Status Row ─── */
.wwa-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}
.wwa-status-row p { margin: 0; font-size: 13px; color: #6b7280; }

/* ─── Spinners ─── */
@keyframes wwa-spin { to { transform: rotate(360deg); } }
.wwa-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid #e5e7eb;
    border-top-color: #25D366;
    border-radius: 50%;
    animation: wwa-spin .8s linear infinite;
    margin: 0 auto 16px;
}
.wwa-spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #25D366;
    border-radius: 50%;
    animation: wwa-spin .8s linear infinite;
    flex-shrink: 0;
}

/* ─── Success / Error Icons ─── */
.wwa-success-icon {
    width: 56px;
    height: 56px;
    background: #d4edda;
    color: #155724;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    margin: 0 auto 14px;
}
.wwa-error-icon {
    width: 56px;
    height: 56px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    margin: 0 auto 14px;
}
.wwa-step h3 { margin: 0 0 8px; font-size: 18px; color: #1c1e21; }
.wwa-step p  { margin: 0 0 16px; color: #6b7280; font-size: 14px; }

/* ─── Link Button ─── */
.wwa-link-btn {
    background: none;
    border: none;
    color: #128C7E;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: inherit;
    display: block;
    margin: 0 auto;
}
