/*
 * MudBlazor component overrides — MyWorkforce-inspired styling.
 * Colors are handled by MudThemeProvider via ThemeConfig.cs.
 */

/* ===== AppBar — gradient with rounded bottom-right ===== */
body:not(.mud-theme-dark) .mud-appbar {
    background: linear-gradient(90deg, #05325F 30%, #0085B3);
    border-bottom-right-radius: 20px;
}

.mud-theme-dark .mud-appbar {
    border-bottom-right-radius: 20px;
}

.mud-appbar .mud-toolbar {
    padding-left: 0px;
}

/* ===== Navigation — generous touch targets ===== */
.mud-nav-link {
    min-height: 44px;
    border-radius: 8px;
    margin: 2px 8px;
    padding-left: 12px;
    padding-right: 12px;
    transition: all 0.12s ease;
}

/* ===== Drawer — side nav: subtle border, no shadow ===== */
.mud-drawer--open.mud-drawer-responsive,
.mud-drawer--open.mud-drawer-mini {
    border-right: 1px solid var(--mud-palette-lines-default);
    box-shadow: none !important;
}

/* ===== Drawer — temporary edit drawers: smooth slide + fade ===== */
.mud-drawer-temporary {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mud-drawer--open.mud-drawer-temporary .drawer-content {
    animation: drawerSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawerSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ===== Cards — subtle hover, consistent border radius ===== */
.mud-card {
    border-radius: 8px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mud-card.mud-card-outlined:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== Buttons — no text transform, smooth hover ===== */
.mud-button-root {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

/* ===== Input fields — outlined variant spacing ===== */
.mud-input-outlined .mud-input-slot {
    padding: 14px 14px;
}

/* ===== Tables — relaxed rows, consistent hover ===== */
.mud-table .mud-table-row {
    transition: background-color 0.1s ease;
}

.mud-table .mud-table-head .mud-table-cell {
    font-weight: 600;
}

/* ===== DataGrid — header styling ===== */
.mud-table-head .mud-table-cell {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

/* ===== Divider — prevent flex-grow pushing content down ===== */
.mud-divider-fullwidth {
    flex-grow: 0;
    width: 100%;
}

/* ===== Snackbar — rounded ===== */
.mud-snackbar {
    border-radius: 8px;
}

/* ===== Dialog — rounded corners ===== */
.mud-dialog {
    border-radius: 12px;
}

.mud-dialog .mud-dialog-title {
    padding: 16px 24px;
}

.mud-dialog .mud-dialog-content {
    padding: 8px 24px 16px;
}

.mud-dialog .mud-dialog-actions {
    padding: 8px 24px 16px;
}

/* ===== Chips — label style ===== */
.mud-chip {
    border-radius: 4px;
}

/* ===== Breadcrumbs — subtle styling ===== */
.mud-breadcrumbs .mud-breadcrumb-item a {
    opacity: 0.6;
}

.mud-breadcrumbs .mud-breadcrumb-separator span {
    opacity: 0.4;
}

/* ===== Tabs — subtle bottom border ===== */
.mud-tabs-rounded {
    border-radius: 8px;
}

/* ===== Toolbar search field — consistent spacing ===== */
.mud-toolbar .mud-input-root-outlined {
    margin-top: 0;
}

/* ===== Responsive: mobile tweaks ===== */
@media (max-width: 959.98px) {
    .mud-appbar {
        border-bottom-right-radius: 0;
    }

    .mobile-card-stack {
        gap: 6px;
    }

    .mobile-card-stack .mud-card {
        border-radius: 8px;
    }

    .mobile-card-meta {
        font-size: 0.8125rem;
        gap: 4px 10px;
        margin-top: 6px;
    }
}

@media (min-width: 600px) {
    .mud-toolbar-gutters {
        padding-left: 12px;
    }
}
