/* Import Bootstrap Icons */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css");

/* Global CSS Variables for Landing Page */
:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --light: #252a33;
    --dark: #1a1d24;
    --text: #e1e1e1;
    --text-secondary: #b0b7c3;
    --border: #2f3541;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #1a1a1a;
    color: #eee;
}

a, .btn-link {
    color: #5aa6e6;
}

/* Custom Button Styles */
.btn,
.timelane-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn::after,
.timelane-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.btn:hover,
.timelane-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn:hover::after,
.timelane-btn:hover::after {
    transform: translateY(0);
}

.btn:active,
.timelane-btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Primary Button */
.btn-primary,
.timelane-btn-primary {
    background: linear-gradient(135deg, #3498db, #2c5082);
    color: white;
}

.btn-primary:hover,
.timelane-btn-primary:hover {
    background: linear-gradient(135deg, #3ea1e6, #2c5082);
    color: white;
}

/* Secondary Button */
.btn-secondary,
.timelane-btn-secondary {
    background: linear-gradient(135deg, #444, #333);
    color: #eee;
}

.btn-secondary:hover,
.timelane-btn-secondary:hover {
    background: linear-gradient(135deg, #555, #444);
    color: #eee;
}

/* Info Button */
.btn-info,
.timelane-btn-info {
    background: linear-gradient(135deg, #226644, #184f34);
    color: #eee;
}

.btn-info:hover,
.timelane-btn-info:hover {
    background: linear-gradient(135deg, #2a7a51, #226644);
    color: #eee;
}

/* Danger Button */
.btn-danger,
.timelane-btn-danger {
    background: linear-gradient(135deg, #772222, #661919);
    color: #eee;
}

.btn-danger:hover,
.timelane-btn-danger:hover {
    background: linear-gradient(135deg, #8a2828, #772222);
    color: #eee;
}

/* Outline Buttons */
.btn-outline-primary,
.timelane-btn-outline-primary {
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.btn-outline-primary:hover,
.timelane-btn-outline-primary:hover {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: #3ea1e6;
    color: #3ea1e6;
}

.btn-outline-secondary,
.timelane-btn-outline-secondary {
    background-color: transparent;
    color: #aaa;
    border: 2px solid #aaa;
    box-shadow: 0 2px 8px rgba(170, 170, 170, 0.1);
}

.btn-outline-secondary:hover,
.timelane-btn-outline-secondary:hover {
    background-color: rgba(170, 170, 170, 0.1);
    border-color: #bbb;
    color: #bbb;
}

/* Button Sizes */
.btn-sm,
.timelane-btn-sm {
    padding: 0.25rem 1rem;
    font-size: 0.875rem;
}

.btn-lg,
.timelane-btn-lg {
    padding: 0.875rem 2.5rem;
    font-size: 1.25rem;
}

/* Block Buttons */
.btn-block,
.timelane-btn-block {
    display: flex;
    width: 100%;
}

/* Outline Button */
.timelane-btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.timelane-btn-outline:hover {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: #3ea1e6;
    color: #3ea1e6;
}

.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus,
.timelane-btn:focus {
  box-shadow: 0 0 0 0.1rem #333, 0 0 0 0.25rem #3498db;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e55858;
}

.validation-message {
    color: #e55858;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45OTMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: #888;
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Dark Mode Styles */
.table {
    color: #ddd !important;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #2a2a2a !important;
    color: #eee !important;
}

.table-striped > tbody > tr:nth-of-type(even) {
    background-color: #232323 !important;
    color: #eee !important;
}

.table-striped > tbody > tr:hover {
    background-color: #333 !important;
}

.table thead {
    background-color: #2c2c2c !important;
}

.modal-content {
    background-color: #333 !important;
    color: #eee !important;
    border-color: #444 !important;
}

.modal-header {
    border-bottom-color: #444 !important;
}

.modal-footer {
    border-top-color: #444 !important;
}

.form-control, .form-select {
    background-color: #444 !important;
    color: #eee !important;
    border-color: #555 !important;
}

.form-control:focus, .form-select:focus {
    background-color: #444 !important;
    color: #eee !important;
    border-color: #2c5082 !important;
    box-shadow: 0 0 0 0.25rem rgba(44, 80, 130, 0.25) !important;
}

.input-group-text {
    background-color: #555 !important;
    color: #eee !important;
    border-color: #666 !important;
}

.alert-info {
    background-color: #1e3a5f !important;
    color: #eee !important;
    border-color: #2c5082 !important;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.alert {
    background-color: #1e3a5f !important;
    color: #eee !important;
    border-color: #2c5082 !important;
}

/* Adding to the existing dark mode styles */

/* Fix for card text being unreadable */
.card {
    background-color: #2a2a2a !important;
    color: #eee !important;
    border-color: #444 !important;
}

/* Fix time dropdown background */
input[type="time"], 
input[type="date"],
input[type="datetime-local"] {
    background-color: #444 !important;
    color: #eee !important;
    border-color: #555 !important;
}

/* Fix for any remaining form elements */
select, 
option {
    background-color: #444 !important;
    color: #eee !important;
}

/* Ensure modal backdrops are dark */
.modal-backdrop {
    background-color: #000 !important;
}

/* Add styles for pagination if used */
.pagination > li > a,
.pagination > li > span {
    background-color: #333 !important;
    border-color: #555 !important;
    color: #eee !important;
}

.pagination > .active > a, 
.pagination > .active > span {
    background-color: #2c5082 !important;
    border-color: #1e3a5f !important;
}

/* Fix table styling - more specific selectors to override Bootstrap */
table.table,
.table,
table {
    background-color: #222 !important;
    color: #ffffff !important; /* Brighter white text */
    border-color: #444 !important;
}

table.table > thead > tr > th,
.table > thead > tr > th,
table > thead > tr > th {
    background-color: #1e1e1e !important;
    color: #ffffff !important; /* Brighter white text */
    border-color: #444 !important;
    border-bottom: 2px solid #444 !important;
    font-weight: 600 !important; /* Make headers slightly bolder */
}

table.table > tbody > tr > td,
.table > tbody > tr > td,
table > tbody > tr > td {
    border-color: #444 !important;
    background-color: transparent !important;
    color: #ffffff !important; /* Brighter white text */
}

/* Fix for table-striped rows */
.table-striped > tbody > tr:nth-of-type(odd),
table.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #252525 !important;
    color: #ffffff !important; /* Brighter white text */
}

.table-striped > tbody > tr:nth-of-type(even),
table.table-striped > tbody > tr:nth-of-type(even) {
    background-color: #2a2a2a !important;
    color: #ffffff !important; /* Brighter white text */
}

/* Fix time/date inputs with higher specificity */
input[type="time"],
input[type="date"],
input[type="datetime-local"],
.form-control[type="time"],
.form-control[type="date"],
.form-control[type="datetime-local"],
input.form-control[type="time"],
input.form-control[type="date"],
input.form-control[type="datetime-local"] {
    background-color: #333 !important;
    color: #eee !important;
    border-color: #555 !important;
}

/* Fix time/date input dropdowns */
::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Style DateTime picker dropdown */
.calendar-popup,
.time-popup,
.datetime-popup {
    background-color: #333 !important;
    color: #eee !important;
    border-color: #555 !important;
}

/* Fix input placeholders */
::placeholder {
    color: #888 !important;
    opacity: 1 !important;
}

/* Dark mode styling for date/time picker popup elements */

/* Invert calendar icon colors */
::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.8) !important;
    background-color: transparent !important;
}

/* Target Chrome/Edge date input popup styling */
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    background-color: transparent !important;
    color-scheme: dark !important;
}

/* Force dark color scheme for datetime pickers */
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[type="week"] {
    color-scheme: dark !important;
}

/* Ensure dark background for any popup content */
::-webkit-datetime-edit,
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-year-field,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-minute-field,
::-webkit-datetime-edit-second-field,
::-webkit-datetime-edit-ampm-field,
::-webkit-datetime-edit-week-field,
::-webkit-inner-spin-button,
::-webkit-calendar-picker-indicator,
::-webkit-clear-button {
    color: #eee !important;
    background-color: transparent !important;
}

/* Custom styles for Firefox date/time pickers */
@-moz-document url-prefix() {
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"],
    input[type="week"] {
        background-color: #333 !important;
        color: #eee !important;
    }
}

/* Additional control for date picker styling in all browsers */
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus {
    color: #eee !important;
    background-color: #333 !important;
    border-color: #2c5082 !important;
    box-shadow: 0 0 0 0.25rem rgba(44, 80, 130, 0.25) !important;
}

/* For browsers that support it, force dark UI controls */
@supports (color-scheme: dark) {
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    select {
        color-scheme: dark;
    }
}

/* Dark mode styling for browser autocomplete dropdowns - consolidated rules */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #2c3e50 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
}

/* Chrome, Safari, Edge autofill background */
input.form-control:-webkit-autofill {
    background-color: #2c3e50 !important;
}

/* Firefox specific autofill styling */
@-moz-document url-prefix() {
    input.form-control:-moz-autofill,
    input.form-control:-moz-autofill-preview {
        background-color: #2c3e50 !important;
        color: #ffffff !important;
    }
}

/* Style for the autocomplete options */
input:-webkit-autofill-selected {
    background-color: #34495e !important;
    color: #ffffff !important;
}

/* Fix for selected text color in inputs */
::selection {
    background-color: #2c5082 !important;
    color: #ffffff !important;
}

/* Ensure text color is white when autocompleted and selected */
input::selection,
input::-moz-selection {
    background-color: #2c5082 !important;
    color: #ffffff !important;
}

/* Fix for Chrome/Safari/Edge selected text in autocompleted fields */
input:-webkit-autofill::selection {
    background-color: #2c5082 !important;
    color: #ffffff !important;
}

/* Additional styling for input text color */
input, select, textarea {
    color: #ffffff !important;
}

/* Disable spell check and text suggestions red underlines */
input, textarea {
    spellcheck: false !important;
    -webkit-spell-check: none !important;
    -ms-spellcheck: false !important;
}

/* Force autocomplete dropdown styling - more aggressive approach */
input:-webkit-autofill option,
datalist option,
input option {
    background-color: #2c3e50 !important;
    color: #ffffff !important;
}

/* Additional selector for autofill dropdown items */
option, select option {
    background-color: #2c3e50 !important;
    color: #ffffff !important;
}