/* نظام الاشتراك — نافذة الدفع والصفحات المقفلة */

.subscription-status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.subscription-paywall-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 37, 64, 0.72);
    backdrop-filter: blur(4px);
}

.subscription-paywall-modal[hidden] {
    display: none !important;
}

body.paywall-open {
    overflow: hidden;
}

.subscription-paywall-card--wide {
    width: min(480px, 100%);
}

.paywall-step-indicator {
    font-weight: 700;
    color: #0070ba;
    font-size: 0.9rem;
    margin: 0 0 8px !important;
}

.paywall-intro {
    margin-bottom: 8px !important;
}

.paywall-step {
    text-align: right;
    margin-top: 12px;
}

.paywall-field {
    display: block;
    margin-bottom: 12px;
    text-align: right;
}

.paywall-field span {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0a2540;
    margin-bottom: 6px;
}

.paywall-field input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.paywall-error {
    color: #c0392b;
    font-size: 0.85rem;
    min-height: 1.2em;
    margin: 4px 0 10px;
}

.paywall-next-btn {
    width: 100%;
    margin-top: 4px;
}

.paywall-back-btn {
    background: #f1f3f5;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    font-weight: 600;
}

.paywall-have-account {
    margin-top: 14px;
    font-size: 0.88rem;
}

.paywall-have-account a {
    color: #0070ba;
    font-weight: 700;
}

.paywall-step2-note {
    font-size: 0.85rem;
    color: #57606f;
    margin-bottom: 10px !important;
}

.paypal-renew-note {
    font-size: 0.8rem;
    color: #57606f;
    margin-bottom: 10px;
    text-align: center;
}

.subscription-login-link-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: transparent;
    border: 2px solid #0070ba;
    color: #0070ba;
    border-radius: 14px;
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
}

.student-auth-label {
    font-size: 0.72rem;
    color: #8e44ad;
    font-weight: 600;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-student-access {
    background: #8e44ad !important;
}

.subscription-paywall-card {
    position: relative;
    width: min(440px, 100%);
    background: #fff;
    border-radius: 24px;
    padding: 28px 24px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    text-align: center;
    animation: paywall-pop 0.28s ease-out;
}

@keyframes paywall-pop {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.subscription-paywall-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

.subscription-paywall-close:hover {
    background: #e9ecef;
}

.subscription-paywall-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.subscription-paywall-card h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    color: #0a2540;
}

.subscription-paywall-card p {
    margin: 0 0 8px;
    color: #57606f;
    font-size: 0.95rem;
    line-height: 1.55;
}

.subscription-paywall-highlight {
    display: inline-block;
    margin: 12px 0 18px;
    padding: 8px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    color: #0a2540;
    font-weight: 700;
    font-size: 0.9rem;
}

#paypal-button-container {
    min-height: 48px;
    margin-top: 8px;
}

.paypal-config-warning {
    font-size: 0.85rem;
    color: #c0392b;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 12px;
    padding: 12px;
    line-height: 1.5;
    text-align: right;
}

.paypal-config-warning code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.subscription-locked-view {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 24px 12px 40px;
}

.subscription-locked-card {
    max-width: 420px;
    width: 100%;
    text-align: center;
    background: #fff;
    border: 2px dashed #dee2e6;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.subscription-locked-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.subscription-locked-card h2 {
    margin: 0 0 10px;
    color: #0a2540;
    font-size: 1.2rem;
}

.subscription-locked-card p {
    margin: 0 0 20px;
    color: #57606f;
    line-height: 1.55;
}

.subscription-unlock-btn {
    background: linear-gradient(135deg, #0070ba, #003087);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 112, 186, 0.35);
    transition: transform 0.15s ease;
}

.subscription-unlock-btn:hover {
    transform: translateY(-2px);
}

.subscription-locked-price-line {
    margin-bottom: 18px !important;
    color: #0a2540 !important;
    font-weight: 600;
}

/* لوحة المدير */
.subscription-admin-wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 16px;
    padding: 0 10px;
}

.subscription-admin-wrap[hidden] {
    display: none !important;
}

.subscription-admin-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border: 2px solid #0070ba;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 8px 24px rgba(0, 112, 186, 0.12);
}

.subscription-admin-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.subscription-admin-header-icon {
    font-size: 2rem;
    line-height: 1;
}

.subscription-admin-header h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    color: #0a2540;
}

.subscription-admin-header p {
    margin: 0;
    font-size: 0.85rem;
    color: #57606f;
}

.sub-admin-status {
    font-size: 0.88rem;
    padding: 10px 14px;
    border-radius: 12px;
    background: #e8f4fd;
    color: #0a2540;
    margin-bottom: 14px;
    text-align: center;
}

.subscription-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 560px) {
    .subscription-admin-grid {
        grid-template-columns: 1fr;
    }
}

.sub-admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sub-admin-field--full {
    grid-column: 1 / -1;
}

.sub-admin-field span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0a2540;
}

.sub-admin-field input,
.sub-admin-field select {
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
}

.sub-admin-field input:focus,
.sub-admin-field select:focus {
    outline: none;
    border-color: #0070ba;
}

.sub-admin-field small {
    font-size: 0.75rem;
    color: #868e96;
    line-height: 1.4;
}

.sub-admin-field small a {
    color: #0070ba;
}

.subscription-admin-actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.sub-admin-save-btn {
    background: linear-gradient(135deg, #0070ba, #003087);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 112, 186, 0.3);
}

.sub-admin-save-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.sub-admin-save-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}
