/* ==========================================================================
   PAS Academy — Gated Sample Content & Registration Popup Modal Styling
   ========================================================================== */

/* --- Gated Content Wrapper --- */
.sample-gated-container {
    position: relative;
    margin-top: 24px;
}

.sample-content-blurred {
    filter: blur(8px);
    -webkit-filter: blur(8px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    pointer-events: none;
    opacity: 0.28;
    max-height: 550px;
    overflow: hidden;
    transition: filter 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, max-height 0.8s ease;
}

/* When unlocked by registration */
.sample-content-blurred.sample-unlocked {
    filter: none !important;
    -webkit-filter: none !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
}

/* --- In-Page Unlock Card (Overlaid over blurred text) --- */
.sample-unlock-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 620px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.98) 100%);
    border: 2px solid rgba(245, 158, 11, 0.45);
    border-radius: 20px;
    padding: 36px 32px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(245, 158, 11, 0.15);
    z-index: 20;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.sample-unlock-card.card-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -40%) scale(0.9);
}

.unlock-icon-pulse {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(2, 132, 199, 0.2));
    border: 2px solid #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fbbf24;
    animation: pulseRing 2s infinite ease-in-out;
}

@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); transform: scale(1); }
    50% { box-shadow: 0 0 0 14px rgba(245, 158, 11, 0); transform: scale(1.05); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); transform: scale(1); }
}

.sample-unlock-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 12px;
    font-family: 'Montserrat', sans-serif;
}

.sample-unlock-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 22px;
}

.btn-unlock-sample {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0f172a;
    font-weight: 800;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.btn-unlock-sample:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.6);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #020617;
}

.unlock-trust-chips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.unlock-trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.unlock-trust-chip i {
    color: #10b981;
}

/* --- Unlocked Celebration Banner --- */
.sample-unlocked-banner {
    display: none;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 95, 70, 0.25) 100%);
    border: 1px solid #10b981;
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    color: #6ee7b7;
    font-size: 0.95rem;
    font-weight: 600;
    align-items: center;
    gap: 12px;
}

.sample-unlocked-banner.show {
    display: flex;
}

/* --- Registration Popup Modal --- */
.sample-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sample-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sample-modal-dialog {
    background: linear-gradient(145deg, #111e33 0%, #0d1525 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    padding: 36px 32px 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(2, 132, 199, 0.2);
    position: relative;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sample-modal-overlay.active .sample-modal-dialog {
    transform: scale(1) translateY(0);
}

.sample-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #94a3b8;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sample-modal-close:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.sample-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.sample-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 6px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.25;
}

.sample-modal-subtitle {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 22px;
}

/* Modal Form Controls */
.modal-form-group {
    margin-bottom: 14px;
    position: relative;
}

.modal-input-wrap {
    position: relative;
}

.modal-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
}

.modal-input-field {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(15, 23, 42, 0.75);
    border: 1.5px solid #263852;
    border-radius: 10px;
    color: #f8fafc;
    font-size: 0.92rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-input-field:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.modal-input-field:focus + i {
    color: #f59e0b;
}

.modal-input-readonly {
    background: rgba(30, 41, 59, 0.6);
    color: #cbd5e1;
    font-size: 0.82rem;
    border-style: dashed;
}

.btn-modal-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.4);
    transition: all 0.25s ease;
    margin-top: 8px;
}

.btn-modal-submit:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    box-shadow: 0 10px 28px rgba(234, 88, 12, 0.6);
    transform: translateY(-1px);
}

.modal-privacy-note {
    font-size: 0.74rem;
    color: #64748b;
    text-align: center;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Modal Form Alert Box */
.modal-form-alert {
    display: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    margin-bottom: 14px;
    line-height: 1.4;
}
.modal-form-alert.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}
.modal-form-alert.alert-success {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid #10b981;
    color: #6ee7b7;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .sample-unlock-card {
        padding: 26px 18px;
    }
    .sample-unlock-title {
        font-size: 1.25rem;
    }
    .sample-modal-dialog {
        padding: 28px 18px 22px;
    }
    .sample-modal-title {
        font-size: 1.25rem;
    }
}
