/* === CSS Variables === */
:root {
    /* Primary colors */
    --primary-orange: #ff7400;
    --primary-orange-hover: rgba(255, 116, 0, 0.15);
    --primary-orange-hover-light: rgba(255, 116, 0, 0.1);
    
    /* Header/AppBar colors */
    --appbar-gray: #4c5ccc;
    
    /* Gray colors */
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --gray-dark: #757575;
}

/* === Page Title Typography === */

/* Make all h3 page titles larger */
.mud-typography-h3,
.mud-typography.mud-typography-h3,
h3.mud-typography {
    font-weight: 400 !important;
    font-size: 2.5rem !important;
    letter-spacing: 0 !important;
}

/* Custom page title class */
.page-title {
    font-weight: 400 !important;
    font-size: 2.5rem !important;
    letter-spacing: 0 !important;
    color: rgba(0, 0, 0, 0.87) !important;
}

/* === Action Column Styles === */

/* Action menu buttons (three dots) - no background by default */
.actions-col .mud-button-root,
.actions-col .mud-icon-button,
td.actions-col .mud-menu .mud-button-root,
td.actions-col .mud-icon-button-root,
.mud-table-cell.actions-col .mud-menu button,
.mud-table-cell.actions-col button.mud-icon-button {
    background-color: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    color: var(--primary-orange) !important;
}

/* Hover state - light orange background appears */
.actions-col .mud-button-root:hover,
.actions-col .mud-icon-button:hover,
td.actions-col .mud-menu .mud-button-root:hover,
td.actions-col .mud-icon-button-root:hover,
.mud-table-cell.actions-col .mud-menu button:hover,
.mud-table-cell.actions-col button.mud-icon-button:hover {
    background-color: var(--primary-orange-hover) !important;
    border: none !important;
    color: var(--primary-orange) !important;
}

/* Icon inside the button - orange */
.mud-table-cell.actions-col .mud-icon-root {
    color: var(--primary-orange) !important;
    opacity: 1 !important;
}

/* Icon inside the button on hover - stays orange */
.mud-table-cell.actions-col .mud-button-root:hover .mud-icon-root,
.mud-table-cell.actions-col .mud-icon-button:hover .mud-icon-root {
    color: var(--primary-orange) !important;
    opacity: 1 !important;
}

/* Make sure all icons in actions column are orange */
.actions-col .mud-icon-root,
td.actions-col .mud-icon-root,
.mud-table-cell.actions-col .mud-icon-root {
    color: var(--primary-orange) !important;
    opacity: 1 !important;
}

/* === Filter Icons in Table Headers === */

.mud-table-head .mud-icon-button,
.mud-table-head .mud-icon-button-root {
    color: var(--primary-orange) !important;
}

.mud-table-head .mud-icon-button:hover,
.mud-table-head .mud-icon-button-root:hover {
    color: var(--primary-orange) !important;
    background-color: var(--primary-orange-hover-light) !important;
}

/* === Table Styles === */

/* Table header background color */
.mud-table-head,
.mud-table thead,
.mud-datagrid thead,
.mud-table-head .mud-table-row,
.mud-datagrid-header {
    background-color: #f5f5f5 !important;
}

.mud-table-head .mud-table-cell,
.mud-table thead th,
.mud-datagrid thead th,
.mud-table-head th,
.mud-datagrid-header-cell {
    background-color: #f5f5f5 !important;
    font-weight: 600 !important;
}

/* Remove striped background for all MudBlazor tables and datagrids */
.mud-table-striped .mud-table-row:nth-of-type(odd),
.mud-table-striped > tbody > tr:nth-of-type(odd),
.mud-table.mud-table-striped .mud-table-row:nth-of-type(odd),
.mud-table tbody tr:nth-of-type(odd),
.mud-datagrid tbody tr:nth-of-type(odd),
.mud-datagrid.mud-table-striped tbody tr:nth-of-type(odd) {
    background-color: #ffffff !important;
}

.mud-table-striped .mud-table-row:nth-of-type(even),
.mud-table-striped > tbody > tr:nth-of-type(even),
.mud-table.mud-table-striped .mud-table-row:nth-of-type(even),
.mud-table tbody tr:nth-of-type(even),
.mud-datagrid tbody tr:nth-of-type(even),
.mud-datagrid.mud-table-striped tbody tr:nth-of-type(even) {
    background-color: #ffffff !important;
}

/* Light hover effect on rows */
.mud-table tbody tr:hover,
.mud-table .mud-table-row:hover,
.mud-datagrid tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* === Dark Mode Overrides === */

/* Dark mode: same styling for action buttons */
.mud-theme-dark .actions-col .mud-button-root,
.mud-theme-dark .actions-col .mud-icon-button,
.mud-theme-dark td.actions-col .mud-menu .mud-button-root,
.mud-theme-dark td.actions-col .mud-icon-button-root,
.mud-theme-dark .mud-table-cell.actions-col .mud-menu button,
.mud-theme-dark .mud-table-cell.actions-col button.mud-icon-button {
    background-color: transparent !important;
    border: none !important;
    color: var(--primary-orange) !important;
}

.mud-theme-dark .actions-col .mud-button-root:hover,
.mud-theme-dark .actions-col .mud-icon-button:hover,
.mud-theme-dark td.actions-col .mud-menu .mud-button-root:hover,
.mud-theme-dark td.actions-col .mud-icon-button-root:hover,
.mud-theme-dark .mud-table-cell.actions-col .mud-menu button:hover,
.mud-theme-dark .mud-table-cell.actions-col button.mud-icon-button:hover {
    background-color: var(--primary-orange-hover) !important;
    color: var(--primary-orange) !important;
}

.mud-theme-dark .mud-table-cell.actions-col .mud-icon-root {
    color: var(--primary-orange) !important;
}

.mud-theme-dark .mud-table-cell.actions-col .mud-button-root:hover .mud-icon-root,
.mud-theme-dark .mud-table-cell.actions-col .mud-icon-button:hover .mud-icon-root {
    color: var(--primary-orange) !important;
}

/* === Primary Filled Button Styles === */

/* All Primary color filled buttons should have AppBar gray color */
.mud-button-filled.mud-button-filled-primary {
    background-color: var(--appbar-gray) !important;
    color: white !important;
    text-transform: none !important;
    font-weight: 500 !important;
}

/* Hover state - change to orange */
.mud-button-filled.mud-button-filled-primary:hover {
    background-color: var(--primary-orange) !important;
    color: white !important;
}

/* Remove uppercase from all buttons */
.mud-button-root,
.mud-button-root span,
.mud-button,
button.mud-button-root {
    text-transform: none !important;
    font-weight: 500 !important;
}

/* Ensure button text is not bold or uppercase */
.mud-button-filled span.mud-button-label,
.mud-button-outlined span.mud-button-label,
.mud-button-text span.mud-button-label {
    text-transform: none !important;
    font-weight: 500 !important;
}

/* === Outlined Button Styles === */

/* Outlined buttons - default state */
.mud-button-outlined.mud-button-outlined-default {
    border-color: var(--gray-medium) !important;
    color: var(--gray-dark) !important;
    background-color: transparent !important;
}

/* Hover state for outlined buttons */
.mud-button-outlined.mud-button-outlined-default:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
    border-color: var(--gray-dark) !important;
}

/* === Text Button Styles === */

/* Text buttons - hover effect */
.mud-button-text.mud-button-text-primary:hover,
.mud-button-text.mud-button-text-default:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}
