html, body {
    font-family: 'Roboto', sans-serif;
}

/* Global autocomplete disable - prevents browser autofill and password managers */
/* Autocomplete attributes should be set in HTML, not CSS */

/* Additional attributes to prevent autofill */
/* Autocomplete attributes should be set in HTML, not CSS */

/* Prevent Chrome autofill highlighting */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Prevent Firefox autofill */
input:-moz-autofill {
    background-color: transparent !important;
    color: inherit !important;
}

/* Customer search suggestions styling */
.customer-suggestion-item {
    padding: 12px 16px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.customer-suggestion-item:hover {
    background-color: var(--mud-palette-action-hover) !important;
}

.add-customer-item {
    padding: 12px 16px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.add-customer-item:hover {
    background-color: var(--mud-palette-primary) !important;
}

.add-customer-item:hover * {
    color: white !important;
}

/* MudBlazor specific overrides */
/* Autocomplete attributes should be set in HTML, not CSS */

/* Performance optimizations for input responsiveness */
.mud-input-control input,
.mud-input-control textarea,
.mud-input-control select {
    /* Improve input responsiveness */
    will-change: auto;
    transform: translateZ(0);
    /* Reduce input lag */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Optimize MudBlazor components for better performance */
.mud-text-field {
    contain: style paint;
}

/* Reduce unnecessary repaints */
.mud-list-item {
    contain: layout style paint;
}

/* Optimize suggestion dropdowns */
.customer-suggestions {
    contain: layout style paint;
    transform: translateZ(0);
}

/* Additional input performance optimizations */
input, textarea, select {
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Optimize rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Reduce input delay */
    -webkit-tap-highlight-color: transparent;
}


/* Optimize focus states */
input:focus, textarea:focus, select:focus {
    outline: none;
    /* Prevent layout shifts */
    box-shadow: 0 0 0 2px var(--mud-palette-primary);
}

/* Optimize MudBlazor input focus */
.mud-input-control input:focus,
.mud-input-control textarea:focus,
.mud-input-control select:focus {
    outline: none;
}

/* Login page styling */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
}

.card-header {
    background: #667eea;
    color: white;
    border-radius: 8px 8px 0 0 !important;
    border: none;
    border-bottom: 2px solid #764ba2;
}

.card-header h2 {
    margin: 0;
    font-weight: 500;
}

.form-floating {
    position: relative;
}

.form-floating > .form-control,
.form-floating > .form-control-plaintext {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out,transform .1s ease-in-out;
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: .65;
    transform: scale(.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-control {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 12px 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: #667eea;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.text-danger {
    color: #dc3545 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

#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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHZpZXdCb3g9IjAgMCA1NiA0OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTU2IDQ5SDBWMGg1NnY0OVoiIGZpbGw9IiNGNUY1RjUiLz4KPHRleHQgeD0iMjgiIHk9IjI1IiBmb250LWZhbWlseT0iQXJpYWwiIGZvbnQtc2l6ZT0iMTQiIGZvbnQtd2VpZ2h0PSJib2xkIiBmaWxsPSIjNjU2NTY1IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBkeT0iLjNlbSI+QXBwIGVycm9yPC90ZXh0Pgo8L3N2Zz4K) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Calendar Styles */
.calendar-day {
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 8px;
    cursor: pointer;
}

.calendar-day:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-day-other-month {
    background-color: #fafafa;
    color: #999;
}

.calendar-day-other-month:hover {
    background-color: #f0f0f0;
}

.calendar-day .mud-chip {
    margin: 1px 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day .mud-text {
    margin-bottom: 4px;
}

/* Responsive calendar grid */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .calendar-day .mud-chip {
        font-size: 0.6rem !important;
        padding: 2px 4px;
    }
}

/* Holiday Calendar Specific Styles */
.holiday-calendar {
    width: 100% !important;
    height: 100% !important;
    min-height: 500px !important;
}

.holiday-calendar .mud-calendar {
    width: 100% !important;
    height: 100% !important;
    min-height: 500px !important;
}

.holiday-calendar .mud-calendar-month {
    width: 100% !important;
    height: 100% !important;
    min-height: 500px !important;
}

.holiday-calendar .mud-calendar-month-view {
    width: 100% !important;
    height: 100% !important;
    min-height: 500px !important;
}

.holiday-calendar .mud-calendar-month-view .mud-calendar-month-view-day {
    min-height: 80px !important;
    height: auto !important;
    padding: 4px !important;
}

.holiday-calendar .mud-calendar-month-view .mud-calendar-month-view-day .mud-calendar-month-view-day-content {
    min-height: 60px !important;
    height: auto !important;
}

.holiday-calendar .mud-calendar-month-view .mud-calendar-month-view-day .mud-calendar-month-view-day-content .mud-calendar-month-view-day-items {
    max-height: none !important;
    overflow: visible !important;
}

/* Ensure calendar items are properly sized */
.holiday-calendar .mud-calendar-item {
    margin: 1px 0 !important;
    padding: 2px 4px !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Vehicle Dialog Styles */
.vehicle-dialog {
    position: relative !important;
    margin: 20px auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1000 !important;
}

/* Ensure dialog is properly positioned on all screen sizes */
@media (max-height: 600px) {
    .vehicle-dialog {
        margin: 10px auto !important;
        max-height: 95vh !important;
    }
}

/* Registration input styling */
.registration-container {
    background-color: var(--mud-palette-background) !important;
}

.registration-input {
    margin: 0 !important;
}

.registration-search-btn {
    min-width: 40px !important;
    height: 40px !important;
}

/* Enquiry View Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.enquiry-dialog {
    width: 600px;
    max-width: 90vw;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Fix for MudSelect and MudAutocomplete double scroll bars */
/* The issue is caused by both the popover and list having overflow */
/* Only the innermost list should have scroll */

.mud-popover-provider .mud-popover,
.mud-select-popover,
.mud-autocomplete-popover {
    overflow: visible !important;
}

.mud-popover .mud-paper,
.mud-select-popover .mud-paper,
.mud-autocomplete-popover .mud-paper {
    overflow: visible !important;
}

/* Only the list should scroll */
.mud-popover .mud-list,
.mud-select-popover .mud-list,
.mud-autocomplete-popover .mud-list {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.mud-popover .mud-list-padding,
.mud-select-popover .mud-list-padding,
.mud-autocomplete-popover .mud-list-padding {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Prevent double scrollbars on the paper element */
.mud-paper.mud-elevation-8,
.mud-paper.mud-popover-paper {
    overflow: visible !important;
}

/* Ensure dropdowns don't exceed viewport */
.mud-select-popover .mud-list,
.mud-autocomplete-popover .mud-list {
    max-height: min(300px, calc(100vh - 200px)) !important;
}


/* Mobile responsive */
@media (max-width: 768px) {
    .enquiry-dialog {
        width: 95vw;
        margin: 20px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 12px 20px;
    }
    
    /* Mobile specific select fixes */
    .mud-popover .mud-list,
    .mud-select-popover .mud-list,
    .mud-popover .mud-list-padding {
        max-height: 250px !important;
    }
    
    /* Mobile specific autocomplete fixes */
    .mud-autocomplete-popover .mud-list,
    .mud-autocomplete-popover .mud-list-padding {
        max-height: 250px !important;
    }
} 