/* Asset Tracking - Site Styles
   Migrated from Web Forms Content/Site.css
   Web Forms-specific styles (ASPxNavBar overrides, DevExpress Moderno theme) removed.
   Blazor layout and DevExpress Blazor theme handle those concerns now. */

/* Primary brand color */
:root {
    --dx-color-primary: #5f8bad;
}

/* Map container */
#myMap {
    width: 100%;
    min-width: 290px;
}

@media (min-width: 600px) {
    #myMap {
        height: 500px;
    }
}

@media (max-width: 599px) {
    #myMap {
        height: 250px;
    }
}

/* SVG marker overflow fix for Azure Maps */
.marker-collection-container svg {
    overflow: visible;
}

/* Tab styling (Bootstrap 5 tabs with brand accent) */
.BSTabPageBox {
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    border-radius: 2px;
    margin: -1px;
}

.BSTabPageBox .form-group {
    margin-bottom: 5px;
    color: #666666;
}

.BSTabActive .nav-link.active {
    color: #FFFFFF !important;
    background-color: #0072C6 !important;
    margin-left: 1px;
    margin-right: 1px;
    font-weight: 500;
}

.BSTabInactive .nav-link {
    color: #666666 !important;
    background-color: rgb(224, 224, 224) !important;
    margin-left: 1px;
    margin-right: 1px;
    margin-bottom: 1px;
}

.BSTabContent .nav.nav-tabs {
    border-bottom: 4px solid #0072C6;
    margin: 0px 0px 0px 10px;
}

.BSTabContent .nav.nav-tabs .nav-link {
    border: none;
}

/* Utility */
.centerText {
    text-align: center;
}

body {
    overflow-x: hidden;
}

/* Sidebar nav link layout — colors intentionally omitted so Fluent theme owns them */
.nav-link {
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* Address autocomplete dropdown */
.address-autocomplete {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

.autocomplete-item:hover {
    background-color: #e9ecef;
    color: #0072C6;
}

/* Brand accent color */
.navbar-brand {
    font-size: 1.4rem !important;
}

.navbar-brand i {
    color: #0072C6;
}

/* Day-of-week pill buttons (maintenance plan recurrence) */
.dow-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: transparent;
    color: #6c757d;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.dow-btn:hover {
    border-color: #0072C6;
    color: #0072C6;
}

.dow-btn.dow-btn-active {
    background: #0072C6;
    border-color: #0072C6;
    color: #fff;
}

/* Ensure the maintenance plan popup is wide enough to show all fields */
.maintenance-plan-popup {
    min-width: 900px !important;
}

/* ── Theme-aware Bootstrap replacements ───────────────────────────────────── */
/* Use these instead of bg-light / table-light so dark mode works correctly   */
.bg-surface {
    background-color: var(--dx-color-secondary-bg, #f8f9fa);
}

.table-surface > * > tr > th,
.table-surface > * > tr > td,
.table-surface {
    background-color: var(--dx-color-secondary-bg, #f8f9fa);
    color: var(--dx-color-text, inherit);
}

/* ── Status badge color lock ──────────────────────────────────────────────── */
/* DX Fluent's UseBootstrapStyles remaps --bs-secondary to a near-white in    */
/* light mode, making bg-secondary badges invisible. Pin the badge colors     */
/* unconditionally so DX variable overrides can't reach them.                 */
.badge.bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

.badge.bg-dark {
    background-color: #343a40 !important;
    color: #fff !important;
}

/* In dark mode, add a faint ring so grey/dark badges stand out from the bg   */
[data-bs-theme="dark"] .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

[data-bs-theme="dark"] .badge.bg-dark {
    background-color: #495057 !important;
    color: #e9ecef !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* ── Sidebar nav-link theming ─────────────────────────────────────────────── */
.sidebar-nav {
    /* No background-color override — let the Fluent theme control it */
}

.sidebar-item {
    display: block;
    padding: 6px 16px 6px 32px;
    color: var(--dx-color-text, #333);
    border-radius: 4px;
    margin-bottom: 2px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-item:hover {
    background-color: var(--bs-tertiary-bg, #e9ecef);
    color: var(--dx-color-primary, #0072C6);
    text-decoration: none;
}

.sidebar-item.active {
    background-color: var(--dx-color-primary, #0072C6);
    color: #fff !important;
    text-decoration: none;
}

.sidebar-item i {
    width: 18px;
    text-align: center;
    margin-right: 7px;
}

/* ── Sidebar section labels (replaces DxAccordion headers) ───────────────── */
.sidebar-section-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dx-color-text-secondary, #6c757d);
    padding: 8px 16px 2px;
    margin-top: 4px;
}

/* ── Company switcher DxComboBox in dark navbar ───────────────────────────── */
.company-switcher-combobox {
    min-width: 220px;
    max-width: 260px;
}

/* ── AuditLogTab filter comboboxes ────────────────────────────────────────── */
.filter-combobox {
    min-width: 160px;
}

/* ── Day-of-week pills: use DX CSS variables so they follow the theme ─────── */
.dow-btn {
    border-color: var(--dx-color-border, #dee2e6);
    color: var(--dx-color-text-secondary, #6c757d);
}

.dow-btn:hover {
    border-color: var(--dx-color-primary, #0072C6);
    color: var(--dx-color-primary, #0072C6);
}

.dow-btn.dow-btn-active {
    background: var(--dx-color-primary, #0072C6);
    border-color: var(--dx-color-primary, #0072C6);
    color: #fff;
}

/* ── Azure Maps container: theme-aware background ────────────────────────── */
#myMap {
    background-color: var(--dx-color-bg, #fff);
}
