﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ======================
   NavMenu Styles
   ====================== */
/* Navigation styling to match design */
.mud-drawer .mud-navmenu .mud-nav-link {
    color: rgba(255, 255, 255, 0.6) !important;
    position: relative;
    border-right: 5px solid transparent;
    min-height: 48px;
    display: flex !important;
    align-items: center;
    padding: 12px 16px !important;
    margin: 0 !important;
}

.mud-drawer .mud-navmenu .mud-nav-link.active {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-right: 5px solid #cc4141 !important;
}

.mud-drawer .mud-navmenu .mud-nav-link.active .mud-nav-link-text {
    color: #ffffff !important;
}

.mud-drawer .mud-navmenu .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Ensure icon and text are vertically centered */
.mud-drawer .mud-navmenu .mud-nav-link .mud-nav-link-icon,
.mud-drawer .mud-navmenu .mud-nav-link .mud-nav-link-text {
    display: inline-flex;
    align-items: center;
}

/* Remove MudStack spacing - we want nav items to touch */
.mud-navmenu .mud-stack {
    gap: 0 !important;
}

/* ======================
   Input Focus Styles
   ====================== */
/* Smokey white background for active (focused) inputs */
:root {
    --smokey-white: #F7F7F7;
    --ssw-red: #cc4141;
    --validation-pink: #ff8a8a;
    --label-grey: rgba(255, 255, 255, 0.5);
}

/* Generic inputs */
input:focus, textarea:focus, select:focus {
    background-color: var(--smokey-white);
}

/* Ensure all inputs have consistent padding */
input.mud-input-slot,
textarea.mud-input-slot {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* MudTextField - black text on smokey white when focused */
/* Target the input element directly as it has the mud-input-slot class */
input.mud-input-slot:focus,
textarea.mud-input-slot:focus,
.mud-input-control:focus-within input.mud-input-slot,
.mud-input-control:focus-within textarea.mud-input-slot,
.mud-input-control.mud-input-control-focused input.mud-input-slot,
.mud-input-control.mud-input-control-focused textarea.mud-input-slot {
    background-color: var(--smokey-white) !important;
    color: #000000 !important;
}

/* MudSelect (dropdowns) - black text on smokey white when focused */
.mud-select:focus-within input.mud-input-slot,
.mud-select.mud-select-open input.mud-input-slot,
input.mud-select-input:focus {
    background-color: var(--smokey-white) !important;
    color: #000000 !important;
}

/* MudAutocomplete (searchable dropdowns) - black text on smokey white when focused */
.mud-autocomplete:focus-within input.mud-input-slot,
.mud-autocomplete input.mud-input-slot:focus,
input.mud-select-input:focus {
    background-color: var(--smokey-white) !important;
    color: #000000 !important;
}

/* MudDatePicker & MudTimePicker - black text on smokey white when focused */
.mud-picker:focus-within input.mud-input-slot,
.mud-picker input.mud-input-slot:focus,
input.mud-picker-input:focus {
    background-color: var(--smokey-white) !important;
    color: #000000 !important;
}

/* Ensure normal state (unfocused) for all inputs has proper styling */
input.mud-input-slot:not(:focus),
textarea.mud-input-slot:not(:focus),
.mud-input-control:not(.mud-input-control-focused) input.mud-input-slot,
.mud-input-control:not(.mud-input-control-focused) textarea.mud-input-slot {
    background-color: transparent;
}

/* ======================
   Label Styling - Keep grey for focused inputs (no red)
   ====================== */
/* Override MudBlazor's default red label on focus */
.mud-input-label,
.mud-input-label-filled,
.mud-input-label-outlined,
.mud-input-control .mud-input-label,
.mud-input-control.mud-input-control-focused .mud-input-label,
.mud-input-control:focus-within .mud-input-label {
    color: var(--label-grey) !important;
}

/* Remove red underline on focused inputs */
.mud-input.mud-input-underline:after,
.mud-input-control-focused .mud-input.mud-input-underline:after {
    border-bottom-color: transparent !important;
}

/* Remove red border on outlined focused inputs */
.mud-input-outlined.mud-focused .mud-input-outlined-border,
.mud-input-control-focused .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Ensure textarea has proper padding when focused */
textarea.mud-input-slot {
    padding: 12px !important;
}

/* ======================
   Validation Error Styling
   ====================== */
/* Error state: SSW red border around the entire field */
.mud-input-control.mud-input-error .mud-input,
.mud-input-control.mud-input-error .mud-input-outlined-border {
    border: 2px solid var(--ssw-red) !important;
    border-radius: 4px;
}

/* Error state: light red/pink validation message text */
.mud-input-helper-text.mud-input-error,
.mud-input-control.mud-input-error .mud-input-helper-text {
    color: var(--validation-pink) !important;
}

/* Error state: label should also be light red/pink */
.mud-input-control.mud-input-error .mud-input-label {
    color: var(--validation-pink) !important;
}

/* Remove red on black background */
.mud-selected-item .mud-list-item-text .mud-typography {
    color: #ffffff;
    font-weight: bold;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4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Mzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

/*.warm-grey-bg {*/
/*    background-color: #F5F3F0 !important; !* Warm grey, adjust as needed to match sidebar *!*/
/*    color: black;*/
/*}*/

/*.preview-light-grey-bg {*/
/*    background-color: #FAF9F7 !important; !* Lighter warm grey for preview elevation *!*/
/*}*/