/**
 * ACC Frontend - Premium Dark Theme
 * 
 * Overrides base UI for a high-end, black/dark aesthetic.
 */

:root {
    /* Premium Light Palette */
    --acc-bg: #fdfdfd;
    /* Soft White */
    --acc-surface: #ffffff;
    /* White Card */
    --acc-surface-hover: #f9fafb;
    /* Gray 50 */
    --acc-border: #e5e7eb;
    /* Gray 200 */
    --acc-border-active: #d1d5db;
    /* Gray 300 */

    --acc-text-main: #111827;
    /* Deep Black Text */
    --acc-text-muted: #6b7280;
    /* Gray 500 */

    /* Brand Accent */
    --acc-primary: #000000;
    /* Pitch Black */
    --acc-primary-hover: #1f2937;
    /* Gray 800 */
    --acc-accent: #374151;
    /* Gray 700 */

    /* Inputs */
    --acc-input-bg: #ffffff;
}

/* Force Light Mode Default scope */
#acc-report-app {
    color: var(--acc-text-main);
    font-family: 'Inter', system-ui, sans-serif;
}

/* --- Animations --- */
@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-30px);
        opacity: 0;
    }
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutFade {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}


@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

/* --- Card & Container --- */
#acc-report-app .acc-card {
    background: var(--acc-surface);
    border: 1px solid var(--acc-border);
    border-radius: 24px;
    /* Ultra rounded */
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.05);
    /* Softer shadow for light mode */
    overflow: hidden;
    /* For animations */
    position: relative;
    padding: 0;
    /* Reset padding for full bleed headers if needed, but we keep structure */
}

/* Inner padding wrapper */
#acc-report-app .acc-card-content {
    padding: 40px;
}

/* Header */
#acc-report-app .acc-card-header {
    border-bottom: 1px solid var(--acc-border);
    padding-bottom: 30px;
    margin-bottom: 30px;
    background: #f8fafc;
    /* Slight contrast for header */
}

#acc-report-app .acc-card-title {
    color: var(--acc-text-main);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* --- Login Overlay Animations --- */
@keyframes gradualBlur {
    0% {
        filter: blur(0px);
        opacity: 1;
    }

    100% {
        filter: blur(6px);
        opacity: 0.8;
    }
}

@keyframes delayedFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes delayedBgFade {
    0% {
        background: rgba(255, 255, 255, 0);
    }

    100% {
        background: rgba(255, 255, 255, 0.4);
    }
}

/* --- Login Overlay --- */
.acc-form-blurred {
    filter: blur(0px);
    /* Initial state */
    opacity: 1;
    pointer-events: none;
    user-select: none;
    animation: gradualBlur 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.acc-login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0);
    /* Initial state */
    animation: delayedBgFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border-radius: inherit;
}

.acc-login-overlay-box {
    background: var(--acc-surface);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    width: 90%;
    border: 1px solid var(--acc-border);
    pointer-events: auto;

    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    animation: delayedFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
    /* 1s delay */
}

.acc-login-overlay-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--acc-text-main);
    margin-bottom: 16px;
}

.acc-login-overlay-text {
    color: var(--acc-text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.acc-login-overlay-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Wizard Progress --- */

/* -----------------------------
 * Wizard Progress (Modern)
 * ----------------------------- */
.acc-wizard-progress-modern {
    position: relative;
    padding: 0 10px;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.acc-progress-track {
    position: absolute;
    top: 16px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: var(--acc-border);
    border-radius: 4px;
    z-index: 1;
}

.acc-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--acc-primary);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.acc-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.acc-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 60px;
}

.acc-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--acc-surface);
    border: 2px solid var(--acc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--acc-text-muted);
    transition: all 0.3s ease;
}

.acc-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--acc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

/* Step States */
.acc-step-item.active .acc-step-circle {
    border-color: var(--acc-primary);
    background: var(--acc-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

.acc-step-item.active .acc-step-label {
    color: var(--acc-text-main);
}

.acc-step-item.completed .acc-step-circle {
    border-color: var(--acc-primary);
    background: var(--acc-surface);
    color: var(--acc-primary);
}

/* --- Form Step Visibility --- */
#acc-report-app .acc-step-content {
    display: none;
}

#acc-report-app .acc-step-content.active {
    display: block;
    animation: slideInFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#acc-report-app .acc-step-content.exiting {
    display: block;
    animation: slideOutFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


/* --- Form Elements --- */
#acc-report-app .acc-label {
    color: var(--acc-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

#acc-report-app .acc-form-group {
    margin-bottom: 24px;
}

#acc-report-app .acc-input,
#acc-report-app .acc-select,
#acc-report-app .acc-textarea {
    background: var(--acc-input-bg);
    border: 1px solid var(--acc-border);
    border-radius: 12px;
    color: var(--acc-text-main);
    padding: 14px 16px;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

#acc-report-app .acc-input:focus,
#acc-report-app .acc-select:focus,
#acc-report-app .acc-textarea:focus {
    border-color: var(--acc-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
    /* Minimal black focus ring */
    transform: translateY(-1px);
}

/* Premium Error States */
#acc-report-app .error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Custom Radio "Cards" for Impact */
.acc-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.acc-radio-label {
    display: block;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
}

.acc-radio-label:hover {
    transform: translateY(-2px);
}

.acc-radio-label input {
    position: absolute;
    opacity: 0;
}

.acc-radio-label span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--acc-input-bg);
    border: 1px solid var(--acc-border);
    border-radius: 12px;
    color: var(--acc-text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

.acc-radio-label input:checked+span {
    background: #f9fafb;
    border-color: var(--acc-primary);
    color: var(--acc-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

.acc-radio-label:hover span {
    border-color: var(--acc-border-active);
    background: var(--acc-surface-hover);
}

/* --- Buttons --- */
#acc-report-app .acc-btn {
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1rem;
    letter-spacing: 0.02em;
    text-transform: none;
    /* Keep natural case */
    transition: transform 0.2s, box-shadow 0.2s;
}

#acc-report-app .acc-btn-primary {
    background: var(--acc-primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#acc-report-app .acc-btn-primary:hover {
    background: var(--acc-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.15);
}

/* -----------------------------
 * Directory & Card Enhancements
 * ----------------------------- */

/* Sidebar */
.acc-sidebar-filters {
    transition: all 0.3s ease;
}

/* Directory Cards */
.acc-dir-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--acc-border) !important;
    background: var(--acc-surface);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border-radius: 12px;
}

.acc-dir-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--acc-primary) !important;
}

.acc-dir-card .acc-card-title a {
    transition: color 0.2s ease;
}

.acc-dir-card:hover .acc-card-title a {
    color: var(--acc-primary) !important;
}

.acc-dir-card-link {
    color: var(--acc-text-main) !important;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
}

.acc-dir-card-link:hover {
    color: var(--acc-primary) !important;
    transform: translateX(4px);
}

/* Success State */
#acc-report-app .acc-step-content[data-step="success"] {
    text-align: center;
    padding: 60px 0;
}

#acc-report-app .acc-step-content[data-step="success"] h3 {
    color: #10b981;
}

/* Mobile */
@media (max-width: 600px) {
    .acc-radio-group {
        grid-template-columns: 1fr;
    }

    #acc-report-app .acc-card-content {
        padding: 20px;
    }
}