/* Spinning animation for loading indicators */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Security check button styles */
.security-check-btn {
    background: rgba(139, 92, 246, 0.2) !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
    color: #8b5cf6 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.security-check-btn:hover {
    background: rgba(139, 92, 246, 0.3) !important;
}

/* Final submit button styles */
.final-submit-btn {
    background: #22c55e !important;
    border: none !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.final-submit-btn:hover:not(:disabled) {
    background: #16a34a !important;
}

.final-submit-btn:disabled {
    background: #6b7280 !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

/* Back button for security check */
.back-btn-security {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    text-decoration: underline !important;
}

.back-btn-security:hover {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Loading spinner styles */
.loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Completion page container improvements */
.completion-container {
    text-align: center;
    padding: 60px 40px;
    max-width: 600px;
    margin: 0 auto;
}

.completion-container h3 {
    color: #8b5cf6;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 600;
}

.completion-container p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.completion-container .primary-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.completion-container .secondary-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.completion-container .small-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* reCAPTCHA container styling */
.recaptcha-inline-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

/* Success/Error message styling */
.status-message {
    padding: 60px 40px;
    text-align: center;
}

.status-message.success h3 {
    color: #22c55e;
}

.status-message.error h3 {
    color: #ef4444;
}

.status-message .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Hide old modal styles */
#submissionRecaptchaModal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Ensure no conflicts with existing modal styles */
.modal-overlay.submission-recaptcha-modal {
    display: none !important;
}

/* Additional animation keyframes for consistency */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Smooth transitions for content changes */
.question-content {
    animation: fadeIn 0.3s ease;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .completion-container {
        padding: 40px 20px;
    }

    .completion-container h3 {
        font-size: 1.5rem;
    }

    .security-check-btn,
    .final-submit-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Button Hover Popup Styles */
.hero-buttons {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
    z-index: 100;
}

.hover-button-wrapper {
    /* Remove position: relative so popup positions relative to .hero-buttons */
    position: static;
    display: block;
    flex: 1;
    width: 100%;
}

/* The Popup Card */
.popup-info {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    /* Span full width of .hero-buttons */
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    /* Reduced padding from 24px */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    backdrop-filter: blur(20px);
    pointer-events: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    margin-top: 10px;
    /* Reduced top margin */
    text-align: left;
    transform: translateY(10px);
    /* Reduced slide distance */
}

.hover-button-wrapper:hover .popup-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* Reset Y */
    pointer-events: auto;
}

/* Little arrow pointing up - REMOVED */
.popup-info::before {
    display: none;
}


.popup-header {
    display: flex;
    align-items: flex-end;
    /* Align number to bottom of text */
    gap: 10px;
    /* Reduced gap */
    margin-bottom: 8px;
    /* Reduced margin */
}

.popup-number {
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    /* Increased size (~5%) */
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.popup-title {
    font-size: 1rem;
    /* Reduced from 1.1rem */
    color: #fff;
    font-weight: 600;
    margin: 0;
}

/* Increased specificity to override .hero p */
.popup-info p.popup-desc {
    font-size: 14.4px !important;
    /* Increased by ~20% */
    color: rgba(255, 255, 255, 0.6) !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
}

.popup-details {
    display: none;
}

.popup-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    /* Tighter gap */
}

.popup-details li {
    font-size: 0.75rem;
    /* Smaller details text */
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    padding: 2px 8px;
    /* Compact padding */
    border-radius: 100px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Hover background effect inside popup */
.popup-hover-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.1), transparent 60%);
    z-index: -1;
}

/* Button styles synced from Home Page */
.btn {
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.35) 0%, rgba(139, 92, 246, 0.35) 100%);
    transition: width 0.4s ease;
    z-index: -1;
    box-shadow:
        0 0 10px rgba(236, 72, 153, 0.1),
        0 0 20px rgba(139, 92, 246, 0.05);
}

.btn:hover::before {
    width: 100%;
    box-shadow:
        0 0 15px rgba(236, 72, 153, 0.2),
        0 0 30px rgba(139, 92, 246, 0.1);
}

.btn::after {
    content: '→';
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.btn:hover::after {
    transform: translateX(3px);
}

.btn-primary {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    color: white;
    border-color: #8b5cf6;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

/* Hide scrollbars in questionnaire popups */
.question-modal,
.info-pane-modal,
.modal-overlay {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.question-modal::-webkit-scrollbar,
.info-pane-modal::-webkit-scrollbar,
.modal-overlay::-webkit-scrollbar {
    display: none;
}