@import "year-navigation.css";
@import "memories.css";
@import "statistics.css";
@import "map-controls.css";
@import "checkbox.css";
@import "dialog.css";
@import "map.css";
@import "color-picker.css";
@import "job-status.css";

/* fraunces-100 - latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100;
    src: url('../fonts/fraunces-v37-latin_latin-ext_vietnamese-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fraunces-regular - latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/fraunces-v37-latin_latin-ext_vietnamese-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fraunces-900 - latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 900;
    src: url('../fonts/fraunces-v37-latin_latin-ext_vietnamese-900.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Serif SC';
    font-style: normal;
    font-weight: 100;
    src: url('../fonts/noto-serif-sc-chinese-simplified-200-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Serif SC';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/noto-serif-sc-chinese-simplified-400-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Serif SC';
    font-style: normal;
    font-weight: 900;
    src: url('../fonts/noto-serif-sc-chinese-simplified-900-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/noto-sans-sc-chinese-simplified-400-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Serif JP';
    font-style: normal;
    font-weight: 200;
    src: url('../fonts/noto-serif-jp-japanese-200-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Serif JP';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/noto-serif-jp-japanese-400-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Serif JP';
    font-style: normal;
    font-weight: 900;
    src: url('../fonts/noto-serif-jp-japanese-900-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans JP';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/noto-sans-jp-japanese-400-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
    --color-highlight: #F5DEB3FF;
    --color-highlight-transparent: rgba(245, 222, 179, 0.4);
    --color-background-dark: #3b3b3b;
    --color-background-dark-transparent: rgb(59 59 59 / 0.7);
    --color-background-dark-light: #5c5c5c;
    --color-text-white: #e3e3e3;
    --color-text-gray: #c0c0c0;
    --color-text-black: #2e2e2e;
    --color-warn: #ffeeab;
    --color-error: #ffb4ab;
    --serif-font: "Fraunces", 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
    --memories-header-height: 550px;
    --box-shadow: 0 8px 25px rgba(245, 222, 179, 0.2);
    --sans-serif-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

    --bg: #0e1826;
    --bg-deep: #0a1320;
    --panel: rgba(22, 32, 48, 0.78);
    --panel-solid: #162030;
    --ink: #ece6d6;
    --ink-dim: #a5a99f;
    --ink-faint: #6b7285;
    --gold: #d9a441;
    --gold-bright: #f2c470;
    --gold-deep: #b8862c;
    --gold-glow: rgba(217, 164, 65, 0.55);
    --sky: #8fc5e6;
    --sky-dim: #5a8bb0;
    --violet: #b89adc;
    --slate: #7e8a9e;
    --danger: #e07a6b;

    --drawer-h: 320px;
    --drawer-inset: 16px;
    --connector-h: 36px;
    --panel-line: rgba(212, 175, 108, 0.14);
    --drawer-top-edge: calc(var(--drawer-h) + var(--drawer-inset));
}

/* CJK Language-specific font stacks */
:root:lang(ja) {
    --serif-font: "Fraunces", 'Noto Serif JP', 'Hiragino Mincho ProN', 'YuMincho', serif;
    --sans-serif-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'YuGothic', 'Meiryo', sans-serif;
}

:root:lang(zh-CN) {
    --serif-font: "Fraunces", 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
    --sans-serif-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

body {
    font-family: var(--sans-serif-font);
    margin: 0;
    padding: 0;
    height: 100vh;
}

/* Main navigation */
.navbar {
    display: inline-flex;
    align-items: baseline;
    padding: 8px;
    border-bottom: 1px black;
    margin-left: 2rem;
    pointer-events: auto;
    position: sticky;
    font-size: 1.4rem;
}

.statistics-page .navbar {
    margin-left: 0;
}

.statistics-page .navigation-container {
    background-color: rgba(59, 59, 59, 0.68);
    backdrop-filter: blur(10px);
}

.navbar i {
    font-size: 1.4rem;
}

.navbar .nav-link {
    background: transparent;
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
}

.navbar .nav-link.active {
    color: var(--color-highlight)
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    filter: none;
    box-shadow: none;
}

.navigation-container.overlay {
    width: 100%;
}

.navigation-container.overlay .navbar {
    background: var(--color-background-dark);
    width: 100%;
    padding: 0 32px;
    margin: 0;
}

@media (min-width: 800px) {
    body.auto-update-mode .navbar {
        background: #4446;
        padding: 0;
        box-shadow: var(--box-shadow);
        margin: 0;
        border-right: 1px solid var(--color-highlight);
        border-bottom: 1px solid var(--color-highlight);
        border-bottom-right-radius: 8px;
        backdrop-filter: blur(10px);
    }
}

header {
    position: absolute;
    top: 0;
    left: 40%;
    z-index: 10;
    background: rgba(59, 59, 59, 0.62);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Map */

.loading-overlay {
    opacity: 0;
    position: absolute;
    width: 100%;
    z-index: 1000;
    pointer-events: none;
}

.loading-overlay .progress-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.loading-overlay .loading-progress-bar {
    width: 0;
    height: 100%;
    background: var(--color-highlight);
    transition: width 0.2s ease-out;
}

.loading-overlay .status-text {
    text-align: right;
    font-size: 0.8rem;
    font-family: sans-serif;
    color: var(--color-background-dark-light);
    text-shadow: 0 0 2px var(--color-highlight);
}

.font-small {
    font-size: 0.8rem;
}

.settings-menu {
    position: fixed;
    bottom: 180px;
    right: 20px;
    width: 300px;
    background: var(--color-background-dark);
    color: var(--color-text-white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.settings-menu.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.settings-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: var(--color-background-dark);
    color: var(--color-text-white);
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #eee;
}

.settings-menu-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    padding-left: 8px;
}

.close-settings-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.close-settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.settings-menu-content {
    padding: 16px;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-overlay.visible {
    opacity: 1;
}

.settings-menu-content .divider {
    font-size: 1rem;
    margin: 0;
    margin-bottom: 8px;
}

.settings-secondary-btn,
.settings-primary-btn,
.settings-ghost-btn,
.settings-icon-btn {
    color: var(--color-highlight);
    border: 1px solid var(--color-highlight);
}

.settings-secondary-btn,
.settings-primary-btn,
.settings-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
}

.settings-primary-btn,
.btn.settings-primary-btn {
    background: var(--color-highlight);
    color: var(--color-background-dark);
}

.settings-primary-btn i,
.settings-primary-btn span,
.btn.settings-primary-btn i,
.btn.settings-primary-btn span {
    color: var(--color-background-dark);
}

.settings-ghost-btn,
.btn.settings-ghost-btn {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-gray);
}

.settings-ghost-btn:hover,
.btn.settings-ghost-btn:hover {
    color: var(--color-text-white);
}

.settings-icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.settings-icon-btn.danger {
    color: #ffb4ab;
    border-color: #ffb4ab;
}

.settings-toggle-switch {
    display: inline-flex;
    flex: 0 0 auto;
    position: relative;
}

.settings-toggle-switch input {
    opacity: 0;
    position: absolute;
}

.settings-toggle-switch span {
    background: var(--color-background-dark);
    border: 1px solid var(--color-highlight);
    border-radius: 999px;
    cursor: pointer;
    display: inline-block;
    height: 24px;
    position: relative;
    transition: background 0.15s ease;
    width: 44px;
}

.settings-toggle-switch span::before {
    background: var(--color-text-gray);
    border-radius: 50%;
    content: "";
    height: 18px;
    left: 3px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.15s ease, background 0.15s ease;
    width: 18px;
}

.settings-toggle-switch input:checked + span {
    background: var(--color-highlight);
}

.settings-toggle-switch input:checked + span::before {
    background: var(--color-background-dark);
    transform: translateY(-50%) translateX(20px);
}

.custom-map-style-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.custom-map-style-grid .form-group {
    margin: 0;
}

.custom-map-style-error {
    display: none;
    color: #ffb4ab;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.custom-map-style-error.visible {
    display: block;
}

/* Responsive adjustments for settings menu */
@media (max-width: 768px) {
    .settings-menu {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 160px;
        max-height: 60vh;
    }

    .settings-menu-header {
        padding: 12px 16px;
    }

    .settings-menu-content {
        padding: 12px;
    }

    .loading-overlay {
        top: 46px;
    }

}
/* Elements */
.btn {
    background-color: var(--color-background-dark);
    font-family: var(--sans-serif-font);
    transition: all ease 0.2s;
    border-right: 4px;
}


.btn,
a.btn,
button {
    font-size: 14px;
    color: var(--color-highlight);
    border: 1px solid var(--color-highlight);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn:hover,
a.btn:hover,
button:hover {
    background-color: #525252;
    filter: brightness(1.05);
    box-shadow: 0 0 0 1px rgba(242, 196, 112, 0.5), 0 8px 28px rgba(217, 164, 65, 0.5), inset 0 1px 0 rgba(255, 245, 215, 0.7), inset 0 -1px 0 rgba(120, 80, 20, 0.3);
}

.btn-muted {
    filter: brightness(0.7);
}

.btn-link {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--color-highlight);
    text-decoration: underline;
    cursor: pointer;
}

.btn-link:hover {
    background-color: unset;
    filter: brightness(1.2);
    box-shadow: unset;
}


a.btn-default,
.btn-default {
    border: 1px solid var(--color-highlight);
}

.btn-block + .btn-block {
    margin-top: 10px;
}

.btn.btn-block {
    width: 100%;
    display: inline-block;
    box-sizing: border-box;
    text-align: center;
}

.btn.btn-danger {
    background: #995353;
    font-weight: bolder;
}

.btn.btn-danger:disabled {
    background: #917575;
    font-weight: normal;
}

.btn.btn-warning {
    color: var(--color-text-black);
    border-color: var(--color-text-black);
    background: var(--color-warn);
}

.btn.btn-warning:disabled {
    backdrop-filter: saturate(10%);
}

.btn.btn-small {
    padding: 4px 6px;
    font-size: 0.8rem;
}

fieldset {
    margin-bottom: 16px;
    border-radius: 4px;
    border-color: var(--color-highlight);
}

legend {
    font-weight: bold;
    color: var(--color-highlight);
}

details > div {
    padding: 16px;
}

.form-group details summary {
    font-weight: normal;
    font-size: 1em;
}

input:focus {
    outline: 0;
    /* some people use shadows too */
    box-shadow: none;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--color-text-white);
}

.toggle-buttons {
    display: inline-flex;
}

.toggle-buttons.pills {
    gap: 6px;
}

.toggle-buttons .btn {
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--color-highlight);
}

.toggle-buttons .btn:not(:last-child),
.toggle-buttons label:not(:last-of-type) {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.toggle-buttons .btn:not(:first-child),
.toggle-buttons label:not(:first-of-type) {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.toggle-buttons .btn.active {
    background: var(--color-background-dark-light);
    box-shadow: var(--box-shadow);
}

.toggle-buttons input[type="radio"] {
    width: 0;
    margin: 0;
}

.toggle-buttons label {
    background: var(--color-background-dark);
    display: inline-block;
    width: 100%;
    background: #2a2a2a;
    border: 1px solid var(--color-background-dark-light);
    color: var(--color-text-white, #ccc);
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease-in-out;
    border-radius: 4px;
}

.toggle-buttons.pills label {
    padding: 6px 12px;
    border-radius: 20px;
}

.toggle-buttons input[type="radio"]:checked + label,
.toggle-buttons label:hover {
    border: 1px solid var(--color-highlight);
    filter: brightness(1.1);
    box-shadow: 0 0 0 1px rgba(242, 196, 112, 0.5), 0 8px 28px rgba(217, 164, 65, 0.5), inset 0 1px 0 rgba(255, 245, 215, 0.7), inset 0 -1px 0 rgba(120, 80, 20, 0.3);
}

input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: var(--color-background-dark-light);
    color: var(--color-text-white);
}


select:active,
textarea:active,
input:active,
select:focus,
textarea:focus,
input:focus {
    border-color: var(--color-highlight);
}

textarea:focus-visible {
    outline: none;
}


select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3e3e3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
    font-family: var(--serif-font);
}

select option {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
}

select:disabled,
input:disabled {
    background-color: #3a3a3a;
    color: #d0d0d0;
    cursor: not-allowed;
}

input:read-only {
    background-color: #3a3a3a;
    color: #d0d0d0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    color: var(--color-text-white);
    background-color: var(--color-background-dark-light);

}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    color: var(--color-highlight);
    background-color: var(--color-background-dark-light);
}

/* Tags */

.tags-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag-chip {
    transition: all 0.15s ease-in-out;
    font-size: 0.9rem;
    display: inline-block;
    background: #2a2a2a;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 0 1px 0 var(--color-highlight) inset, 0 0 1px 0 var(--color-highlight);
}

.tag-chip:hover {
    border: 1px solid var(--color-highlight);
    filter: brightness(1.05);
    box-shadow: 0 0 0 1px rgba(242, 196, 112, 0.5), 0 8px 28px rgba(217, 164, 65, 0.5), inset 0 1px 0 rgba(255, 245, 215, 0.7), inset 0 -1px 0 rgba(120, 80, 20, 0.3);
}

.tag-chip .tag-remove {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
}

.tag-chip .tag-remove:hover {
    opacity: 1;
}

.form-description {
    color: var(--color-text-white);
    font-size: 0.9em;
    margin-top: 5px;
    font-style: italic;
}

/* Alerts */
.alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: var(--box-shadow);
    border: 1px solid;
    color: var(--color-highlight);
}

.alert-success {
    border-color: #e5ffeb;
    background: #2c4828;
}

.alert-danger {
    border-color: #ff3434;
    background: #995353;
}

.alert-warning {
    background: #5c4c2f;
    border-color: #ffd38b;
}

.alert-info {
}


.user-row.selected {
    background-color: var(--color-highlight);
    color: var(--color-background-dark);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    color: var(--color-text-white);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.queue-status {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.queue-description {
    margin-top: 16px;
}

.queue-card {
    background-color: var(--color-background-dark);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    flex: 1;
    min-width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.queue-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}


.upload-option {
    background-color: var(--color-background-dark);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    flex: 1;
    min-width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 15px;
}

.upload-option:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}

.divider {
    display: flex;
    align-items: center;
    color: var(--color-highlight);
    font-weight: 500;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--color-highlight);
    margin: 0 15px;
}

.divider.left::before {
    display: none;
}

.divider-description {
    color: var(--color-text-gray);
    font-size: 1.1em;
    margin-top: -15px;
    margin-bottom: 20px;
    padding-left: 15px;
    max-width: 800px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.divider-description.left {
    margin-left: 0;
    text-align: left;
    padding-left: 0;
}

.settings-card h3 {
    margin-top: 0;
}

.settings-card {
    background-color: var(--color-background-dark);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    flex: 1;
    min-width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 15px;
}

.settings-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}

.queue-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.queue-count {
    font-size: 24px;
    color: var(--color-highlight);
}

.queue-time {
    margin-top: 10px;
}

.progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--color-highlight);
    width: 0;
    transition: width 0.5s ease;
}

/* Places Management Styles */
.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.place-map {
    height: 250px;
    width: 250px;
}

.place-card {
    background-color: var(--color-background-dark);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
}

.place-info {
    margin: 15px 0;
    font-size: 0.9em;
}

.place-info div {
    margin-bottom: 5px;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pagination-buttons {
    display: flex;
    gap: 10px;
}

.timeline::-webkit-scrollbar {
    display: none;
}

.timeline {
    position: fixed;
    top: 0;
    width: 50%;
    bottom: 0;
    background: var(--color-background-dark);
    background: linear-gradient(90deg, rgb(17, 17, 17) 0%, rgba(59, 59, 59, 0.49) 21%, rgba(255, 255, 255, 0) 40%);;
    z-index: 5;
    overflow-y: auto;
    pointer-events: none;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    -webkit-user-select: none; /* Safari */
    user-select: none;
}

.navigation-container {
    position: fixed;
    top: 0;
    width: 50%;
    z-index: 50;
    overflow-y: auto;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    -webkit-user-select: none; /* Safari */
    user-select: none;
}

.timeline-container {
    font-family: var(--serif-font);
    line-height: 1.5;
    font-weight: 400;
    padding-top: 64px;
    padding-bottom: 140px;
    transition: opacity 0.3s ease;
    -webkit-user-select: none; /* Safari */
    user-select: none;
}

.timeline-entry {
    color: #e1e1e1;
    padding: 0 2rem;
    transition: all 0.25s ease-in-out;
    pointer-events: all;
    cursor: pointer;
    position: relative;
}

.timeline-entry.active {
    color: #e1e1e1;
    transition: all 0.25s ease-in-out;
}

.timeline-entry .entry-description {
    font-size: 3rem;
    font-weight: lighter;
    transition: all 0.25s ease-in-out;
}

.timeline-entry.active .entry-description {
    font-size: 5rem;
    transition: all 0.25s ease-in-out;
}

.timeline-entry .place-name-container {
    text-shadow: 0px 0px 0px white, 2px 2px 0px #24201c, 1px 1px 0 #171414;
}

.timeline-container .aggregated-entry .overview-container {
    display: flex;
    gap: 1rem;
    padding: 16px;
}

.timeline-container .aggregated-entry .amount-overview {
    display: flex;
    gap: 1rem;
    text-align: center;
    padding-top: 24px;
}

.timeline-container .aggregated-entry .activity-overview {
    border-right: 1px solid var(--color-highlight);
    padding-right: 8px;
}

.timeline-container .aggregated-entry .amount-overview .overview-icon {
    font-size: 2rem;
    color: var(--color-highlight);
}

.timeline-container .aggregated-entry .amount-overview .overview-amount {
    font-size: 2rem;
}

.timeline-container .aggregated-entry .headline .overview-link {
    color: white;
    text-decoration: navajowhite;
    border-bottom: 1px solid var(--color-highlight);
    display: flex;
    font-size: 1.8rem;
    margin-bottom: 8px;
    padding: 4px 16px;
}

.timeline-container .aggregated-entry .headline .overview-link .overview-name {
    flex-grow: 1;
}

.timeline-container .aggregated-entry-container {
    position: relative;
    pointer-events: all;
    left: 24px;
}
.timeline-container .aggregated-entry {
    -webkit-backdrop-filter: blur(14px);
    background-color: rgba(0, 0, 0, 0.45);
    padding: 0;
    color: #fff;
    margin-bottom: 24px;
    text-shadow: 0 0 0 white, 2px 2px 0 #24201c, 1px 1px 0 #171414;
    backdrop-filter: blur(14px);
    border: 1px solid var(--panel-line);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);

}

.timeline-container .aggregated-entry .sub-headline {
    margin-bottom: 8px;
    color: var(--color-text-gray);
    font-size: 1.1rem;
    padding: 4px 16px;
}

.htmx-indicator {
    display: none;
}
.htmx-indicator i {
    vertical-align: middle;
}

.htmx-indicator.htmx-request,
.htmx-request .htmx-indicator {
    display: inline;
    height: initial;
}

.upload-options progress {
    display: block;
    width: 100%;
    margin-top: 1rem;
}

/* Language Selection Styles */
.language-selection {
    margin-top: 20px;
}

.language-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-width: 800px;
}

.user-sharing-btn {
    text-align: center;
    justify-content: flex-start;
    padding: 8px 24px;
    background-color: var(--color-background-dark-light);
    color: var(--color-text-white);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.language-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    background-color: var(--color-background-dark-light);
    color: var(--color-text-white);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    min-height: 60px;
}

.user-sharing-btn:hover,
.language-btn:hover {
    background-color: var(--color-background-dark);
    border-color: var(--color-highlight);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.user-sharing-btn.active,
.language-btn.active,
.user-sharing-btn:has(input[type="radio"]:checked),
.language-btn:has(input[type="radio"]:checked) {
    background-color: var(--color-highlight);
    color: var(--color-background-dark);
    border-color: var(--color-highlight);
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(245, 222, 179, 0.4);
}

.language-btn.active:hover,
.user-sharing-btn.active:hover,
.user-sharing-btn:has(input[type="radio"]:checked):hover,
.language-btn:has(input[type="radio"]:checked):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 222, 179, 0.5);
}

.language-flag {
    font-size: 1.5rem;
    margin-right: 12px;
    display: inline-block;
}

.language-name {
    font-size: 1.1rem;
    font-weight: 500;
}

.language-btn:has(input[type="radio"]:checked) .language-name {
    font-weight: bold;
}

.language-btn.active .language-name {
    font-weight: bold;
}

@media (max-width: 600px) {
    .language-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .language-btn {
        padding: 12px 16px;
        min-height: 50px;
    }

    .language-flag {
        font-size: 1.3rem;
        margin-right: 10px;
    }

    .language-name {
        font-size: 1rem;
    }
}

/* Collapsible details styling */
details {
    color: var(--color-text-white);
}

details summary {
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
    transition: background-color 0.2s ease;
    border: 1px solid;
}

details > div {
    border-bottom: 1px solid;
    border-left: 1px solid;
    border-right: 1px solid;
}

details:first-child > summary {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

details:not([open]):last-child > summary {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}
details summary:hover {
    background-color: var(--color-background-dark-light);
}

input[type=file]::file-selector-button {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
    border: 1px solid var(--color-highlight);
    padding: 10px 15px;
    margin-right: 20px;
    transition: .5s;
}

input[type=file]::file-selector-button:hover {
    background-color: var(--color-background-dark-light);
}


/* Timeline Scroll Indicator Styles */
.timeline-scroll-indicator {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 30vh;
    width: 8px;
    z-index: 100;
    opacity: 0.7;
    pointer-events: none;
    padding-top: 100px;
    padding-bottom: 250px;
    transition: all 0.3s ease-in-out;
}

.timeline-scroll-indicator:hover {
    opacity: 1;
}

.scroll-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
    rgba(245, 222, 179, 0.3) 0%,
    rgba(245, 222, 179, 0.6) 50%,
    rgba(245, 222, 179, 0.3) 100%);
    border-radius: 3px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.scroll-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-highlight);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease-in-out;
}


body.timeline-hidden .timeline-scroll-indicator,
body.timeline-hidden .timeline-container {
    width: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

body.timeline-hidden .timeline-toggle-btn {
    position: fixed;
    right: auto;
}

body.datepicker-hidden .timeline-toggle-btn,
body.timeline-hidden.datepicker-hidden .timeline-toggle-btn {
    bottom: 24px;
}

.datepicker-toggle-btn {
    position: absolute;
    right: 4px;
    z-index: 10;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    font-size: 1.2rem;
    background: rgba(59, 59, 59, 0.9);
    backdrop-filter: blur(10px);
}

.datepicker-toggle-btn:hover {
    border-color: var(--color-highlight);
    transform: translateY(-2px);
    background: rgba(59, 59, 59, 0.9);
}

.datepicker-toggle-btn i {
    font-size: 1.2rem;
}

.timeline-toggle-btn {
    position: fixed;
    z-index: 10;
    background: transparent;
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    font-size: 1.2rem;
}


.timeline-toggle-btn,
.datepicker-toggle-btn {
    bottom: 114px;

}

.timeline-toggle-btn:hover {
    background: transparent;
    border-color: var(--color-highlight);
    transform: translateY(-2px);
}

.timeline-toggle-btn i {
    font-size: 1.2rem;
}

body.datepicker-hidden #date-picker-container {
    transform: translateY(100%);
    transition: all 0.3s ease-in-out;
}

body.datepicker-hidden .datepicker-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 4px;
    background: rgba(59, 59, 59, 0.9);
    backdrop-filter: blur(10px);
}

body.datepicker-hidden .today-fab {
    display: none !important;
}

body.auto-update-mode .timeline-toggle-btn,
body.auto-update-mode .datepicker-toggle-btn,
body.auto-update-mode .today-fab {
    display: none;
}

.transport-mode {
    font-weight: 500;
    color: var(--color-text-white);
    text-transform: capitalize;
}

.logo {
    width: auto;
    height: 28px;
    padding: 6px 8px 3px;
    vertical-align: bottom;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0))
}

.logo:hover {
    opacity: 1;
}

.settings-card a:visited,
.settings-card a:active,
.settings-card a:hover,
.settings-card a {
    color: var(--color-highlight);
}

.text-align-left {
    text-align: left;
}

.text-align-center {
    text-align: center;
}

.text-gray {
    color: var(--color-text-gray);
}

/* Settings Page Styles */
.settings-page {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
    min-height: 100vh;
    font-family: var(--serif-font);
    font-weight: normal;
}

.settings-header {
    width: 250px;
    background: linear-gradient(90deg, rgb(17, 17, 17) 0%, rgba(59, 59, 59, 0.49) 76%, rgba(255, 255, 255, 0) 100%);
    flex-shrink: 0;
    display: block;
    margin-bottom: 0;
    border-bottom: none;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-white);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.back-link:hover {
    background-color: var(--color-background-dark);
    color: var(--color-highlight);
}

.settings-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-highlight);
}

.settings-container {
    display: flex;
    min-height: 100%;
}

.settings-page .settings-nav {
    width: 250px;
    background: linear-gradient(90deg, rgb(17, 17, 17) 0%, rgba(59, 59, 59, 0.49) 76%, rgba(255, 255, 255, 0) 100%);
    flex-shrink: 0;
    display: block;
    margin-bottom: 0;
    border-bottom: none;
    font-size: 1.1rem;
}

.settings-page .navigation-container {
    position: relative;
    /* hack to make the background appear the same as the settings-nav*/
    background: linear-gradient(90deg, rgb(17, 17, 17) 0%, rgba(59, 59, 59, 0.49) 76%, rgba(255, 255, 255, 0) 250px);
    width: 250px;
    overflow-y: visible;
}

.settings-page .settings-nav-item {
    display: block;
    text-decoration: none;
    padding: 15px 25px;
    cursor: pointer;
    border-left: 3px solid transparent;
    border-bottom: none;
    transition: all 0.2s ease;
    color: var(--color-text-white);
}

.settings-page .settings-nav-item:hover {
    background-color: var(--color-background-dark);
    border-left-color: var(--color-highlight);
}

.settings-page .settings-nav-item.active {
    border-bottom: none;
    font-weight: bold;
    color: var(--color-highlight);
    font-size: 1.2rem;
}

.settings-content-area {
    flex: 1;
    padding-bottom: 24px;
    padding-right: 24px;
    line-height: 1.4;
}

.settings-page .settings-section {
    display: none;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.settings-page .settings-section.active {
    display: block;
}

.settings-page .settings-section input:focus,
.settings-page .settings-section select:focus {
    border: 2px solid var(--color-highlight);
    outline: none;
}

.settings-page .settings-section code {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-text-white);
}

@media (max-width: 800px) {
    .timeline-entry {
        padding: 1rem 2rem 0 1rem;
    }

    .timeline {
        background: linear-gradient(90deg, rgb(151, 151, 151) 0%, rgba(59, 59, 59, 0.49) 3%, rgba(255, 255, 255, 0) 100%);
        text-shadow: 0 0 0 white, 2px 2px 0 #24201c, 1px 1px 0 #171414;
    }

    .timeline-entry .entry-description {
        font-size: 1rem;
        font-weight: normal;
    }

    .timeline-entry {
        font-size: 1rem;
        color: white;
    }

    .timeline-entry.active {
        color: var(--color-highlight);
        padding: 1rem 2rem 0 1.3rem;
    }

    .timeline-entry.active .entry-description {
        font-size: 1.3rem;
    }

    .timeline-scroll-indicator {
        left: 5px;
        width: 4px;
        height: 50vh;
    }

    .scroll-thumb {
        width: 8px;
        height: 16px;
        border-radius: 4px;
    }

    .scroll-thumb::before {
        width: 4px;
        height: 4px;
    }

    .place-name-container.editing {
        border-radius: 3px;
        font-size: 1rem;
        float: left;
        min-width: 0;
    }

    .navigation-container {
        background-color: rgba(59, 59, 59, 0.68);
        backdrop-filter: blur(10px);
        -webkit-user-select: none; /* Safari */
        user-select: none;

    }
    .navigation-container,
    .settings-page .navigation-container {
        width: 100%;
    }
    .navbar {
        margin-left: initial;
        padding: 4px;
    }
    .settings-container {
        flex-direction: column;
    }

    .settings-page .settings-nav {
        width: 100%;
        display: flex;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-highlight);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .settings-page .settings-nav-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 18px 8px;
    }

    .settings-page .settings-nav-item.active {
        border-left: none;
        border-bottom-color: var(--color-highlight);
    }

    .settings-content-area {
        padding: 20px;
    }

    .settings-header {
        padding: 15px;
    }

    .settings-header h1 {
        font-size: 1.5rem;
    }


}
/* FAB Container Styles */
.fab-container {
    position: fixed;
    bottom: 117px;
    left: 50%;
    display: flex;
    align-items: center;
    background: var(--color-background-dark-light);
    color: var(--color-highlight);
    border: 1px solid var(--color-highlight);
    padding: 0;
    border-radius: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.fab-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.range-selection-info {
    opacity: 1;
    pointer-events: none;
    position: absolute;
    width: 100%;
    text-align: center;
    z-index: 2000;
    border-radius: 24px;
    background: var(--color-background-dark-light);
    color: var(--color-highlight);
    border: 1px solid var(--color-highlight);
    padding-top: 8px;
    padding-bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    transition: opacity 0.3s ease-in-out;
}
.range-selection-info.hidden {
    opacity: 0;

}


body.datepicker-hidden .fab-container {
    bottom: 20px;
}

.fab-btn {
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background-dark-light);
    color: var(--color-highlight);
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    padding: 0;
}

.fab-btn:first-child {
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
}

.fab-btn:last-child {
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
}

.fab-btn.active,
.fab-btn:hover {
    background: var(--color-highlight);
    color: var(--color-background-dark);
    box-shadow: 0 6px 16px rgba(245, 222, 179, 0.4);
}

/* Play button section with hover-triggered speed control */
.play-section {
    position: relative;
    display: flex;
    align-items: center;
}

.speed-control {
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
    border-radius: 8px;
    width: 0;
    white-space: nowrap;
    pointer-events: none; /* Add this to prevent interference */
}

.play-section:hover .speed-control {
    opacity: 1;
    visibility: visible;
    width: 120px;
    margin: 0 4px;
    pointer-events: auto; /* Re-enable pointer events when visible */
}

.speed-control select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

/* Today button specific styles */
.today-btn {
    background: var(--color-background-dark-light);
    min-width: 40px;
    padding: 0 12px;
}

.today-btn span {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Expanded state when today button is visible */
.fab-container.has-today {
    padding: 8px 12px;
    gap: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fab-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .speed-control {
        left: 46px;
    }

    .today-btn span {
        display: none; /* Hide text on small screens */
    }
}
@media (max-width: 800px) {
    .today-fab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .today-fab i {
        font-size: 0.9rem;
    }
}

a.btn:disabled,
button:disabled {
    background: #686868;
    cursor: not-allowed;
    color: #b4b4b4;
    border: 1px solid #9d9d9d;
}

.pulsating-marker {
    animation: pulse 1s infinite;
    z-index: 2000;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.css-icon {

}

.gps_ring {
    border: 3px solid #ff0000;
    -webkit-border-radius: 30px;
    height: 36px;
    width: 36px;
    -webkit-animation: pulsate 1.5s ease-out;
    -webkit-animation-iteration-count: infinite;
}

@-webkit-keyframes pulsate {
    0% {-webkit-transform: scale(0.1, 0.1); opacity: 0.0;}
    50% {opacity: 1.0;}
    100% {-webkit-transform: scale(1.2, 1.2); opacity: 0.0;}
}
.sr-only {
    display: none;
}

.spinner {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    border: 0.125em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.connected-account-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.connected-account-row .select {
    flex: 1;
}

.connected-account-row input[type="color"] {
    width: 50px;
    height: 35px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.no-connected-accounts {
    margin-bottom: 8px;
}

.select {
    min-width: 350px;
    position: relative;
}

.select select {
    appearance: none;
    width: 100%;
    padding: 8px 32px 8px 8px;
    background-color: var(--color-background-dark-light);
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--color-text-white);
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3e3e3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.select select option {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
}

.unit-description {
    padding-left: 8px;
}

/* Add to your existing CSS file */
.avatar-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.current-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.avatar-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.avatar-input {
    display: none;
}

.avatar-upload-btn {
    cursor: pointer;
    text-align: center;
}

.avatar-delete-btn {
    align-self: flex-start;
}

.avatar-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.avatar-input-row input[type="file"] {
    flex: 1;
}

.avatar-remove-btn {
    flex-shrink: 0;
}

.user-timeline-section {
    display: none;
    grid-template-columns: 1fr;
    justify-items: left;
}

.user-timeline-section.active {
    display: grid;
}

.user-timeline-selection {
    padding-left: 42px;
}

#auto-update-user-selection .device-header,
#auto-update-user-selection .user-header {
    text-shadow: 0 0 0 white, 2px 2px 0 #24201c, 1px 1px 0 #171414;
}

#auto-update-user-selection .device-menu {
    top: -54px;
}

#auto-update-user-selection .user-header i {
    text-shadow: none;
}
#auto-update-user-selection {
    z-index: 2000;
    position: fixed;
    bottom: 0;
    transition: opacity 0.3s ease-in-out;
    line-height: 1.5;
}

#auto-update-user-selection.hidden,
#auto-update-user-selection.hidden .user-header {
    opacity: 0;
    pointer-events: none;
}

#auto-update-user-selection .user-timeline-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background-color: var(--color-background-dark);
    border-top: 1px solid var(--color-highlight);
    width: 100%;
    box-sizing: border-box;
}
.user-timeline-section .no-entries {
    color: white;
    padding: 48px;
}

.device-header,
.user-header {
    position: relative;
    pointer-events: all;
    cursor: pointer;
    color: white;
    font-family: var(--serif-font);
    font-weight: normal;
    display: inline-block;
    text-align: center;
}

.device-header .username,
.user-header .username {
    overflow: hidden;
    white-space: nowrap;
    max-width: 80px;
    text-overflow: ellipsis;
}
.user-follow-badge {
    opacity: 0;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    aspect-ratio: 1;
    display: inline-block;
    position: absolute;
    right: 0;
    border: 2px solid var(--color-highlight);
    background: var(--color-background-dark);
    transition: opacity 0.3s ease-in-out;
    color: var(--color-highlight);
    font-size: 1rem;
    box-shadow: var(--box-shadow);
    top: 0;
}

.user-follow-badge.active {
    opacity: 1;
}

.device-header.active .avatar,
.user-header.active .avatar {
    border: 2px solid var(--color-highlight);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.3);
}


.default-avatars-section {
    margin-bottom: 20px;
}

.default-avatars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 15px 0;
    padding: 20px;
    max-width: 400px;
}

.default-avatar-option {
    width: 64px;
    height: 64px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.default-avatar-option:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.default-avatar-option input:checked + .avatar {
    border: 2px solid var(--color-highlight);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.3);
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.avatar.small {
    width: 32px;
    height: 32px;
}

.avatar::before {
    display: none;
}
.avatar::after {
    content: attr(alt);
    color: white;
    font-size: 2.1rem;
    top: 0;
    position: absolute;
    background: var(--color-background-dark);
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 7px;
    font-weight: initial;
    font-family: var(--serif-font);
}

.avatar.small::after {
    font-size: 1.1rem;
    padding: 4px;
}

.avatar:not(:has(img))::after {
    display: block;
}

.avatar img:not([src]) ~ .avatar::after {
    content: attr(alt);
    display: block;
}

.avatar img:not([src]),
.avatar img:empty {
    display: none;
}

.current-avatar .avatar {
    width: 100px;
    height: 100px;
}

.separator {
    text-align: center;
    padding: 20px 0;
    position: relative;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-highlight) 20%, var(--color-highlight) 80%, transparent);
    z-index: 1;
}

.separator span {
    background-color: white;
    padding: 0 15px;
    color: #666;
    position: relative;
    z-index: 2;
}

.custom-avatar-section {
    padding-top: 15px;
}

.home-location-inputs {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.coordinate-input {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.coordinate-input label {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.coordinate-input input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.home-location-map {
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

#message-container {
    text-align: center;
    position: fixed;
    z-index: 200;
    width: 100%;
    pointer-events: none;
}

#sse-message {
    display: none;
    background-color: var(--color-background-dark);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#sse-message.active {
    display: inline-block;
}

.export-data-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.export-data-table-container table {
    width: 100%;
    border-collapse: collapse;
}

.export-data-table-container table thead tr {
    position: sticky;
    top: 0;
    background-color: var(--color-background-dark);
    z-index: 1;
}

.export-data-table-container table tr th {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.export-data-table-container tbody tr th {
    padding: 8px;
    font-family: monospace;
    font-size: 1.2em;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-indicator.htmx-request {
    display: block !important;
}

.timeline-container #loading-indicator,
#timeline-content #loading-indicator {
    padding: 0 40px;
    font-size: 2rem;
    color: white;
    font-family: var(--serif-font);
    font-weight: lighter;
    text-shadow: 0px 0px 0px white, 2px 2px 0px #24201c, 1px 1px 0 #171414;
}

#data-content.htmx-request  {
    opacity: 0.3;
}

/* Auto-update mode styles */
.auto-update-overlay {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.2rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: var(--serif-font);
    text-align: center;
}

.auto-update-overlay.visible {
    display: block;
    opacity: 1;
}

.auto-update-overlay .date {
    font-weight: bold;
    margin-bottom: 5px;
}

.auto-update-overlay .time {
    font-size: 3rem;
    color: #f1ba63;
}

.auto-update-overlay .overlay-button {
    position: absolute;
    bottom: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.2s ease;
}

.auto-update-overlay .overlay-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.auto-update-overlay .exit-button {
    right: 15px;
}

.auto-update-overlay .fullscreen-button {
    left: 15px;
}

/* Smooth transitions for timeline and date picker */
.timeline, #date-picker-container {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.timeline.hidden {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

#date-picker-container.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .home-location-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .coordinate-input {
        min-width: unset;
    }

    .auto-update-overlay {
        width: 80%;
    }
}



.date-picker {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(59, 59, 59, 0.68);
    backdrop-filter: blur(10px);
    z-index: 50;
    box-shadow: unset;
    color: white;
    height: 110px;
}

.timeband-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.timeband-item .primary-text {
    font-size: 2rem;
    font-weight: lighter;
}

.timeband-item.selected {
    background-color: unset;
    color: var(--color-highlight);
    transform: scale(1.05);
    box-shadow: unset;
}

.timeband-item.in-range {
    background-color: rgba(117, 82, 0, 0.49);
    color: white;
}

.timeband-item.range-start, .timeband-item.range-end {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    background-color: rgba(117, 82, 0, 0.49);
    color: white;
}

.timeband-item.range-start:hover::before, .timeband-item.range-end:hover::before {
    opacity: 1;
}

.timeband-item.selected::before {
    content: "\eb47";
    font-family: 'Lineicons';
    font-weight: 900;
    position: absolute;
    top: 4px;
    left: unset;
    transform: unset;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    right: 4px;
}

.timeband-item.locked::before,
.timeband-item.selected.range-start::before,
.timeband-item.selected.range-end::before{
    content: "\ec2a";
}
.timeband-item.selected:hover::before {
    opacity: 1;
}

/* Autocomplete dropdown */
.autocomplete {
    position: relative;
}
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-background-dark, #1e1e1e);
    border: 1px solid var(--color-highlight, #444);
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 20;
    border-radius: 0 0 8px 8px;
}
.suggestions-dropdown:empty {
    display: none;
}
.suggestion-item {
    padding: 6px 12px;
    cursor: pointer;
    color: var(--color-text-white, #ccc);
}
.suggestion-item.active,
.suggestion-item:hover {
    background: var(--color-background-dark-light, #4da6ff);
    color: white;
    border: 1px solid var(--color-highlight);
    filter: brightness(1.1);
    box-shadow: 0 0 0 1px rgba(242, 196, 112, 0.5), 0 8px 28px rgba(217, 164, 65, 0.5), inset 0 1px 0 rgba(255, 245, 215, 0.7), inset 0 -1px 0 rgba(120, 80, 20, 0.3);

}

.hidden {
    display: none;
}

.device-menu .device-icon {
    height: 24px;
    min-width: 12px;
    display: inline-block;
    border-radius: 4px;
    margin-right: 8px;
}

.device-toggle-container {
    position: absolute;
    display: inline-block;
    bottom: 24px;
    right: 0;
}

.device-toggle-btn {
    border-radius: 8px;
    width: 25px;
    height: 18px;
    background: var(--color-background-dark);
    padding: 0;
    margin: 0;
    border-width: 2px;
}

.device-toggle-btn:hover {
    color: var(--color-highlight, #fff);
}

.device-menu {
    position: absolute;
    z-index: 500;
    min-width: 300px;
    background: var(--color-background-dark, #1e1e1e);
    border: 1px solid var(--color-highlight, #444);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.device-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    white-space: nowrap;
}

.device-item:hover {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.device-name {
    font-size: 13px;
    color: var(--color-text-white);
}

