/* Connect Talent CIO Custom CSS Overrides & Animations */

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f9f9ff;
    color: #121c2c;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Dark Mode Theme Classes */
html.dark body {
    background-color: #0b1324;
    color: #e2e8f0;
}

html.dark .bg-background {
    background-color: #0b1324 !important;
}

html.dark .bg-white {
    background-color: #131f38 !important;
    color: #e2e8f0 !important;
}

html.dark .bg-surface-container-low {
    background-color: #162442 !important;
}

html.dark .bg-surface-container {
    background-color: #1c2e54 !important;
}

html.dark .bg-surface-container-high {
    background-color: #233866 !important;
}

html.dark .bg-slate-50 {
    background-color: #162442 !important;
}

html.dark .bg-slate-100 {
    background-color: #1e3159 !important;
}

html.dark .text-primary {
    color: #93c5fd !important;
}

html.dark .text-on-surface-variant {
    color: #cbd5e1 !important;
}

html.dark .text-on-surface {
    color: #f1f5f9 !important;
}

html.dark .border-outline-variant,
html.dark .border-slate-200,
html.dark .border-surface-container-highest {
    border-color: #2a3f6d !important;
}

/* Material symbols outlined alignment */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Custom cards elevation */
.card-ambient-shadow {
    box-shadow: 0px 4px 20px rgba(26, 46, 90, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-ambient-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0px 8px 30px rgba(26, 46, 90, 0.12);
}

html.dark .card-ambient-shadow {
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.35);
}

html.dark .card-ambient-shadow:hover {
    box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.55);
}

/* Keyboard accessibility focus ring */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #fd8a27 !important;
    outline-offset: 2px !important;
}

/* Skip to main content accessibility link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: #fd8a27;
    color: #011844;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    z-index: 9999;
    border-radius: 0.5rem;
    transition: top 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.skip-to-content:focus {
    top: 1rem;
}

/* Scroll Reading Progress Bar */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #fd8a27, #f59e0b, #3b82f6);
    z-index: 100;
    transition: width 0.1s ease-out;
}

/* Mobile drawer transition */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#mobile-menu.hidden {
    display: none;
}

/* Modal Animations */
.modal-backdrop {
    background-color: rgba(1, 24, 68, 0.6);
    backdrop-filter: blur(4px);
    transition: opacity 0.25s ease;
}

.modal-content {
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    background: #011844;
    color: #ffffff;
    border: 1px solid #fd8a27;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: toastSlideIn 0.3s ease forwards;
}

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

/* Form Submitting Spinner */
.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #ffffff;
    width: 1.25rem;
    height: 1.25rem;
    animation: spin 0.75s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Validation Field Shake */
@keyframes shakeField {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.field-error-shake {
    animation: shakeField 0.4s ease;
    border-color: #ba1a1a !important;
}

/* Back to Top & Floating Actions */
.fab-btn {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.fab-btn:hover {
    transform: scale(1.08);
}

.fab-menu-open {
    transform: rotate(45deg);
}

/* ==========================================================================
   Print Stylesheet (@media print)
   ========================================================================== */
@media print {
    /* Hide non-printable interface elements */
    header,
    footer,
    nav,
    #mobile-menu,
    #scroll-progress-bar,
    #cookie-banner,
    #back-to-top,
    #floating-fab-container,
    #search-modal,
    #crisis-modal,
    #toast-container,
    .fab-btn,
    .skip-to-content,
    .no-print {
        display: none !important;
    }

    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
        line-height: 1.5;
    }

    .bg-primary,
    .bg-surface-container-low,
    .bg-white {
        background-color: transparent !important;
        color: #000000 !important;
    }

    .text-white,
    .text-primary,
    .text-on-surface-variant {
        color: #000000 !important;
    }

    .border,
    .border-outline-variant {
        border-color: #cccccc !important;
    }

    .card-ambient-shadow,
    .shadow-sm,
    .shadow-lg {
        box-shadow: none !important;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 85%;
        color: #555;
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    .print-header {
        display: block !important;
        border-bottom: 2px solid #000;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }
}
