/* 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+ */
}

:root {
    --color-highlight: #F5DEB3FF;
    --color-background-dark: #3b3b3b;
    --color-background-dark-light: #5c5c5c;
    --color-text-white: #e3e3e3;
    --serif-font: "Fraunces";
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    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;
}

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

.navbar .nav-link {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

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


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 */

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.leaflet-container .visit-popup {
    white-space: preserve-breaks;
    width: 14rem;
    font-family: var(--serif-font);
    font-size: 0.8rem;
    line-height: 1.5rem;
    border-radius: 8px;
    padding: 8px;
    background: #3b3b3bbf;
    color: white;
}

.leaflet-container .visit-popup .visit-title {
    font-size: 1.4rem;
    color: var(--color-highlight);
}

.leaflet-container .visit-popup .visit-description {
    margin-top: 4px;
    font-weight: bold;
}

/* Elements */

.btn.btn-block {
    width: 100%;
}

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

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

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

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

details > div {
    padding: 16px;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

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

.toggle-buttons .btn {
    padding: 0.375rem 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-size: 0.875rem;
    font-weight: 500;
}

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

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

.toggle-buttons .btn.active {
    background: var(--color-background-dark-light);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.2);
}

input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="date"], select {
    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 {
    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;
}

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);
}


/* Alerts */
.alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.2);
    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;
}
.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: 0 8px 25px rgba(245, 222, 179, 0.2);
}


.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: 0 8px 25px rgba(245, 222, 179, 0.2);
}

.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: 0 8px 25px rgba(245, 222, 179, 0.2);
}

.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-details {
    padding: 15px;
}

.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) 76%, rgba(255, 255, 255, 0) 100%);
    z-index: 5;
    overflow-y: auto;
    pointer-events: none;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.timeline-container {
    font-family: "Serif";
    width: 350px;
    padding-bottom: 250px;
}

.timeline-entry {
    color: #bfbfbf;
    padding: 1rem 2rem;
    transition: color, padding 0.5s ease-in-out;
    font-weight: lighter;
    pointer-events: all;
    cursor: pointer;
}

.timeline-entry.active {
    color: #f8f8f8;
    padding: 1rem 0 0 2.5rem;
    transition: color, padding 0.5s ease-in-out;
}

.timeline-entry .entry-description {
    font-family: var(--serif-font);
    font-size: 3rem;
    transition: font-size 0.5s ease-in-out;
}

.timeline-entry.active .entry-description {
    font-family: var(--serif-font);
    font-size: 5rem;
    transition: font-size 0.5s ease-in-out;
    position: relative;
}

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

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

button {
    background-color: transparent;
    color: var(--color-highlight);
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #959595;
}

.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;
    transition: opacity 0.3s ease;
    pointer-events: none;
    padding-top: 100px;
    padding-bottom: 250px;
}

.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;
}

.leaflet-container .photo-marker-icon img {
    width: 100%;
}

.statistics-content {
    margin-left: 30rem;
    color: var(--color-text-white);
    font-family: "Fraunces", serif;
    background: transparent;
    z-index: 1000;
    position: relative;
    font-weight: 300;
    font-size: 1.4rem;
    max-height: 100vh;
    padding: 2rem;
}

.statistics-content h2 {
    font-weight: 300;
    font-size: 2.4rem;
    margin-bottom: 2rem;
}

.statistics-content h3 {
    font-weight: 300;
    font-size: 2.1rem;
    margin-bottom: 1.5rem;
}

.statistics-section {
    margin-bottom: 3rem;
}

/* Top Places Grid Styles */
.places-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.place-stats-card {
    background: var(--color-background-dark);
    border: 1px solid var(--color-highlight);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.place-stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.2);
}

.place-map-container {
    width: 240px;
    height: 240px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-highlight);
    position: relative;
}

.place-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.place-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(245, 222, 179, 0.2);
}

.place-stat-item:last-child {
    border-bottom: none;
}

.place-stat-label {
    font-size: 1rem;
    color: var(--color-text-white);
    opacity: 0.8;
}

.place-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-highlight);
}

/* Transport Statistics Table Styles */
.transport-stats-table {
    background: var(--color-background-dark);
    border: 1px solid var(--color-highlight);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.transport-table-header {
    background: var(--color-background-dark-light);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--color-highlight);
    border-bottom: 2px solid var(--color-highlight);
}

.transport-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(245, 222, 179, 0.1);
    transition: background-color 0.2s ease;
}

.transport-table-row:hover {
    background: var(--color-background-dark-light);
}

.transport-table-row:last-child {
    border-bottom: none;
}

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

.transport-distance {
    color: var(--color-highlight);
    font-weight: 600;
}

.transport-trips {
    color: var(--color-text-white);
    opacity: 0.9;
}

/* Transport Charts Styles */
.transport-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(700px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.transport-chart-section {
    background: var(--color-background-dark);
    border: 1px solid var(--color-highlight);
    border-radius: 12px;
    padding: 1.5rem;
}

.transport-chart-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-highlight);
    margin-bottom: 1rem;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.pie-chart-container {
    position: relative;
    height: 250px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 1200px) {
    .transport-charts-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.statistics-panel {
}

.background-dark {
    background: var(--color-background-dark);
}

.logo {
    width: auto;
    height: 32px;
    padding: 6px 8px 0px;
    vertical-align: bottom;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
}

.logo:hover {
    opacity: 1;
}

.settings-card a:visited,
.settings-card a:active,
.settings-card a:hover,
.settings-card a {
    color: var(--color-highlight);
}
@media (max-width: 800px) {
    .timeline-entry {
        padding: 1rem 2rem 0 1rem;
    }

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

    .timeline-entry {
        display: inline-block;
        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 {
        width: 100%;
    }

    .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;
    }
}

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

/* Settings Page Styles */
.settings-page {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
    min-height: 100vh;
    font-family: "Fraunces", serif;
    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;
}

.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);
}

.settings-content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    font-family: initial;
}

.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);
}

.settings-page .settings-section .btn {
    border: 1px solid;
}

/* Mobile responsiveness for settings page */
@media (max-width: 768px) {
    .settings-container {
        flex-direction: column;
    }
    
    .settings-page .settings-nav {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
        border-right: none;
        border-bottom: 1px solid var(--color-highlight);
    }
    
    .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;
    }
}

button:disabled {
    background: #9b9b9b;
    cursor: not-allowed;
    color: white;
}

.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;
}

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

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

.user-timeline-section .no-entries{
    color: white;
    padding: 48px;
}

.user-timeline-selection .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
}

.user-header {
    pointer-events: all;
    color: white;
    font-family: "Fraunces", serif;
    font-weight: normal;
    display: inline-block;
    text-align: center;
}

.user-header .username {
    overflow: hidden;
    white-space: nowrap;
    max-width: 80px;
    text-overflow: ellipsis;
}


.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;
}

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

.avatar::before {
    display: none;
}
.avatar::after {
    content: attr(alt);
    font-size: 36px;
    font-family: "Fraunces", serif;
    font-weight: lighter;
    color: white;
    position: absolute;
    top: 8px;
    width: 64px;
    height: 64px;
}

.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-color: #ddd;
    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;
    width: 100%;
    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;
}

#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: "Fraunces", serif;
    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, #horizontal-date-picker-container {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

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

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




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

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