/* WorkClock - minimal resets (MudBlazor handles the design system) */

h1:focus {
    outline: none;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: 4px;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

@keyframes workclock-autofill-start {
    from { opacity: 1; }
    to { opacity: 1; }
}

[data-auth-autofill-sync] input:-webkit-autofill {
    animation-name: workclock-autofill-start;
    animation-duration: 0.01s;
}

[data-auth-autofill-sync] input:autofill {
    animation-name: workclock-autofill-start;
    animation-duration: 0.01s;
}

[data-auth-autofill-sync] .mud-input.mud-input-outlined:has(> input:-webkit-autofill) > .mud-input-outlined-border legend {
    width: auto;
    padding: 0 5px;
}

[data-auth-autofill-sync] .mud-input.mud-input-outlined:has(> input:autofill) > .mud-input-outlined-border legend {
    width: auto;
    padding: 0 5px;
}

[data-auth-autofill-sync] .mud-input:has(> input:-webkit-autofill) ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-label-outlined {
    transform: translate(14px, -6px) scale(0.75);
    max-width: calc((100% - 14px) / .75);
    color: var(--mud-palette-text-primary);
}

[data-auth-autofill-sync] .mud-input:has(> input:autofill) ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-label-outlined {
    transform: translate(14px, -6px) scale(0.75);
    max-width: calc((100% - 14px) / .75);
    color: var(--mud-palette-text-primary);
}

/* Compact time picker for WorkDay start/end in TodaySummary */
.compact-timepicker.mud-input-control.mud-input-input-control {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
}

.compact-timepicker .mud-input-control-input-container {
    width: auto !important;
    min-width: unset !important;
    max-width: unset !important;
    margin-left: auto;
    justify-content: flex-end;
}

.compact-timepicker .mud-input {
    width: auto !important;
    min-width: unset !important;
}

.compact-timepicker .mud-input-slot,
.compact-timepicker .mud-input-input {
    width: auto !important;
    min-width: 3ch;
    text-align: right;
    padding: 0 !important;
}

/* Underline matches text width */
.compact-timepicker .mud-input-underline::before {
    border-bottom-style: solid;
}
.compact-timepicker .mud-input-underline::after,
.compact-timepicker .mud-input-underline::before {
    /* inherit width from parent — no forced width */
}

/* Mobile: collapse sidebar to icon-only rail */
@media (max-width: 768px) {
    .wc-sidebar {
        width: 56px !important;
        min-width: 56px !important;
    }

    .wc-sidebar-brand {
        justify-content: center;
        padding: 12px 8px !important;
    }

    .wc-sidebar-brand-text {
        display: none;
    }

    .wc-nav-group-label {
        display: none;
    }

    .wc-nav-item {
        justify-content: center;
        padding: 8px 6px !important;
        gap: 0 !important;
    }

    .wc-nav-item-label {
        display: none;
    }

    .wc-sidebar-footer {
        justify-content: center;
        padding: 8px 6px !important;
    }

    .wc-sidebar-footer-info,
    .wc-sidebar-footer-dot {
        display: none;
    }
}

/* ── Welcome tour ─────────────────────────────────────────────────── */

.wc-welcome-tour-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 36, 61, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1200;
    animation: wc-welcome-tour-fade 0.18s ease-out;
}

.wc-welcome-tour-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(540px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 18px;
    box-shadow: 0 28px 60px -16px rgba(0, 0, 0, 0.45), 0 8px 18px -8px rgba(0, 0, 0, 0.18);
    padding: 32px 32px 24px;
    z-index: 1201;
    animation: wc-welcome-tour-pop 0.22s cubic-bezier(.2,.9,.3,1.05);
}

.wc-welcome-tour-close {
    position: absolute !important;
    top: 12px;
    right: 12px;
}

.wc-welcome-tour-step-indicator {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
}

.wc-welcome-tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mud-palette-lines-default);
    transition: background 0.18s, transform 0.18s;
}

.wc-welcome-tour-dot.is-active {
    background: var(--mud-palette-primary);
    transform: scale(1.25);
}

.wc-welcome-tour-icon {
    display: flex;
    justify-content: center;
    color: var(--mud-palette-primary);
    margin-top: 4px;
}

.wc-welcome-tour-icon .mud-icon-root {
    font-size: 48px !important;
    width: 48px;
    height: 48px;
}

.wc-welcome-tour-body {
    color: var(--mud-palette-text-secondary);
}

.wc-welcome-tour-bullets {
    margin: 18px 0 0;
    padding-left: 20px;
    color: var(--mud-palette-text-primary);
    font-size: 0.95rem;
    line-height: 1.55;
}

.wc-welcome-tour-bullets li {
    margin-bottom: 6px;
}

.wc-welcome-tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    gap: 12px;
}

.wc-welcome-tour-actions-right {
    display: flex;
    gap: 8px;
}

@keyframes wc-welcome-tour-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wc-welcome-tour-pop {
    from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 600px) {
    .wc-welcome-tour-card {
        padding: 24px 20px 18px;
        border-radius: 14px;
    }
    .wc-welcome-tour-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .wc-welcome-tour-actions-right {
        justify-content: space-between;
    }
}
