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

/* Single-ring pulse used for the selected city marker (expand + contract) */
@keyframes timeMapPulseDot {
    0% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(6.0);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 1;
    }
}

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

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

/* Light theme (default) */
html.theme-light body {
    background-color: #fff;
    color: #333;
}

/* Dark theme */
html.theme-dark body {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

html.theme-dark .top-row {
    background-color: #252526;
    border-bottom-color: #333;
    color: #e0e0e0;
}

html.theme-dark main {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

html.theme-dark .content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

html.theme-dark a,
html.theme-dark .btn-link {
    color: #58a6ff;
}

html.theme-dark .theme-toggle-btn {
    color: #e0e0e0;
}

/* Dark theme: tables (e.g. Weather forecast) */
html.theme-dark .table {
    color: #e0e0e0;
    border-color: #444;
}

html.theme-dark .table th,
html.theme-dark .table td {
    border-color: #444;
    color: #e0e0e0;
}

html.theme-dark .table thead th {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

html.theme-dark .table tbody tr {
    background-color: #1e1e1e;
}

html.theme-dark .table tbody tr:nth-of-type(odd) {
    background-color: #252526;
}

html.theme-dark .table-hover tbody tr:hover {
    background-color: #333;
    color: #e0e0e0;
}

/* Dark theme: cards (e.g. Dashboard) */
html.theme-dark .card {
    background-color: #252526;
    border-color: #444;
    color: #e0e0e0;
}

html.theme-dark .card .card-title,
html.theme-dark .card .card-text {
    color: #e0e0e0;
}

/* Dark theme: list groups (Orders list) */
html.theme-dark .list-group {
    background-color: transparent;
    border-color: #444;
}

html.theme-dark .list-group-flush {
    border-radius: 0;
}

html.theme-dark .list-group-item {
    background-color: #252526;
    color: #e0e0e0;
    border: 1px solid #383838;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

html.theme-dark .list-group-item:first-child {
    border-top: 1px solid #383838;
}

html.theme-dark .list-group-item:last-child {
    border-bottom: 1px solid #383838;
}

/* Pulsating city marker used by timeMap.* JS functions */
.time-map-city-pulse {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    display: inline-block;
    position: absolute;
    color: #ff3b30; /* default red for selected */
}
.time-map-city-pulse .pulse-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* hollow ring: use border so the expanding ring is visible */
    background: transparent;
    border: 3px solid var(--time-map-color, currentColor);
    box-sizing: border-box;
    transform-origin: center center;
    opacity: 0.98;
    box-shadow: 0 0 18px rgba(255, 59, 48, 0.55);
    animation: timeMapPulse 1.35s infinite ease-out;
}
.time-map-city-pulse .pulse-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--time-map-color, currentColor);
    box-shadow: 0 0 14px var(--time-map-color, currentColor);
    /* subtle scale pulse on the dot to emphasize activity */
    animation: timeMapDot 1.35s infinite ease-in-out;
}

.analog-clock {
    display:inline-block;
    vertical-align:middle;
    border-radius:8px;
}

.analog-clock svg { display:block; }

/* Slightly increase contrast for clock numerals on small displays */
.analog-clock text { font-weight:600; }

@keyframes timeMapPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.65);
        opacity: 0.98;
    }
    70% {
        transform: translate(-50%, -50%) scale(4.8);
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@keyframes timeMapDot {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.18); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Back-and-forth "breathing" pulse (expand then contract) */
@keyframes timeMapPulseBackForth {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(4.2);
        opacity: 0.06;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

html.theme-dark .list-group-item.list-group-item-action:hover,
html.theme-dark .list-group-item.list-group-item-action:focus {
    background-color: #333;
    color: #e0e0e0;
}

html.theme-dark .list-group-item.active {
    background-color: #1b6ec2; /* matches .btn-primary */
    border-color: #1861ac;
    color: #fff;
}

html.theme-dark .list-group-item .text-muted {
    color: #a8a8a8;
}

/* Selected city card: add a thin blue top accent line without affecting layout */
.city-card.active {
    background-image: linear-gradient(#0d6efd, #0d6efd) !important;
    background-size: 100% 2px !important;
    background-position: 0 0 !important;
    background-repeat: no-repeat !important;
}
