/* GrantCompass Premium Report — Styles */
/* Intake form overlay, CTA components, loading states */

/* ============================================
   PREMIUM CTA CARD (after quiz results)
   ============================================ */
.premium-cta-card {
    margin-top: 24px;
    padding: 28px 24px;
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    border-radius: 16px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.premium-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.premium-cta-card .cta-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(37, 99, 235, 0.5);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #93c5fd;
    margin-bottom: 12px;
}

.premium-cta-card h4 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
}

.premium-cta-card .cta-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.premium-cta-pills {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.premium-cta-pills .pill {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 12px;
    color: #e2e8f0;
    white-space: nowrap;
}

.premium-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.premium-cta-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.premium-cta-btn .price {
    opacity: 0.9;
}

.premium-cta-trust {
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
}

.premium-cta-trust span {
    margin: 0 6px;
}

/* ============================================
   SIDEBAR CTA (compact)
   ============================================ */
.premium-sidebar-cta {
    display: none; /* shown via JS after quiz */
    padding: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.premium-sidebar-cta.visible {
    display: block;
}

.premium-sidebar-cta .sidebar-cta-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.premium-sidebar-cta h5 {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 4px 0;
}

.premium-sidebar-cta p {
    font-size: 12px;
    color: #475569;
    margin: 0 0 10px 0;
}

.premium-sidebar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.premium-sidebar-btn:hover {
    background: #1d4ed8;
}

.premium-sidebar-btn .price-badge {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 11px;
}

/* ============================================
   MODAL CTA (inside grant detail)
   ============================================ */
.premium-modal-cta {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #2563eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.premium-modal-cta p {
    font-size: 13px;
    color: #475569;
    margin: 0;
    flex: 1;
}

.premium-modal-cta p strong {
    color: #1e3a5f;
}

.premium-modal-cta-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    font-family: inherit;
}

.premium-modal-cta-btn:hover {
    background: #1d4ed8;
}

/* ============================================
   INTAKE FORM OVERLAY
   ============================================ */
.premium-intake-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.premium-intake-overlay.active {
    display: flex;
}

.premium-intake-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 22, 40, 0.7);
    backdrop-filter: blur(4px);
}

.premium-intake-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: intakeSlideUp 0.3s ease;
}

@keyframes intakeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-intake-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
    z-index: 2;
}

.premium-intake-close:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Progress bar */
.premium-intake-progress {
    padding: 20px 24px 0;
}

.premium-intake-progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.premium-intake-progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.premium-intake-progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #94a3b8;
}

/* Form header */
.premium-intake-header {
    padding: 20px 24px 0;
    text-align: center;
}

.premium-intake-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.premium-intake-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Form screens */
.premium-intake-screen {
    display: none;
    padding: 20px 24px 24px;
}

.premium-intake-screen.active {
    display: block;
}

.premium-intake-field {
    margin-bottom: 16px;
}

.premium-intake-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.premium-intake-field label .optional {
    font-weight: 400;
    color: #94a3b8;
    font-size: 12px;
}

.premium-intake-field input,
.premium-intake-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.premium-intake-field input:focus,
.premium-intake-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.premium-intake-field input::placeholder {
    color: #9ca3af;
}

.premium-intake-field .field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.premium-intake-field.error input,
.premium-intake-field.error select {
    border-color: #dc2626;
}

.premium-intake-field.error .field-error {
    display: block;
}

/* Checkbox group */
.premium-intake-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.premium-intake-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: #374151;
}

.premium-intake-checkbox:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.premium-intake-checkbox.selected {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 500;
}

.premium-intake-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #2563eb;
}

/* Conditional fields */
.premium-intake-conditional {
    display: none;
    margin-top: 8px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.premium-intake-conditional.visible {
    display: block;
}

/* Form navigation */
.premium-intake-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px 24px;
    gap: 12px;
}

.premium-intake-back {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.premium-intake-back:hover {
    border-color: #9ca3af;
    color: #374151;
}

.premium-intake-back.hidden {
    visibility: hidden;
}

.premium-intake-next {
    padding: 12px 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-left: auto;
}

.premium-intake-next:hover {
    background: #1d4ed8;
}

.premium-intake-skip {
    display: block;
    text-align: center;
    padding: 0 24px 16px;
    font-size: 12px;
    color: #94a3b8;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.premium-intake-skip:hover {
    color: #64748b;
    text-decoration: underline;
}

/* ============================================
   GENERATING STATE
   ============================================ */
.premium-generating-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    justify-content: center;
    align-items: center;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(6px);
}

.premium-generating-overlay.active {
    display: flex;
}

.premium-generating-card {
    text-align: center;
    padding: 48px 40px;
    background: #fff;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.premium-generating-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: premiumSpin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes premiumSpin {
    to { transform: rotate(360deg); }
}

.premium-generating-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.premium-generating-card p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.premium-generating-steps {
    margin-top: 20px;
    text-align: left;
}

.premium-generating-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: #94a3b8;
    transition: color 0.3s;
}

.premium-generating-step.active {
    color: #2563eb;
    font-weight: 500;
}

.premium-generating-step.done {
    color: #16a34a;
}

.premium-generating-step .step-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================
   SUCCESS STATE
   ============================================ */
.premium-success-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    justify-content: center;
    align-items: center;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(6px);
}

.premium-success-overlay.active {
    display: flex;
}

.premium-success-card {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.premium-success-icon {
    width: 56px;
    height: 56px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.premium-success-icon svg {
    color: #16a34a;
}

.premium-success-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.premium-success-card p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.premium-success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.premium-success-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.premium-success-download:hover {
    background: #1d4ed8;
}

.premium-success-close {
    padding: 8px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.premium-success-close:hover {
    color: #64748b;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .premium-cta-card {
        padding: 20px 16px;
    }

    .premium-cta-card h4 {
        font-size: 18px;
    }

    .premium-cta-btn {
        padding: 12px 24px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }

    .premium-cta-pills {
        gap: 6px;
    }

    .premium-cta-pills .pill {
        font-size: 11px;
        padding: 4px 8px;
    }

    .premium-intake-card {
        max-height: 95vh;
        border-radius: 12px;
    }

    .premium-intake-checkboxes {
        grid-template-columns: 1fr;
    }

    .premium-modal-cta {
        flex-direction: column;
        text-align: center;
    }

    .premium-generating-card,
    .premium-success-card {
        padding: 32px 24px;
    }
}
