/* Thru-Hike Tracker - Theme-matching styles */

/* === Map Container === */
.tht-map-wrap {
    margin: 1.5em 0;
}
.tht-map-container {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.tht-map-container .leaflet-popup-content-wrapper {
    font-family: inherit;
    font-size: 0.9em;
    border-radius: 6px;
}
.tht-map-popup h4 {
    margin: 0 0 6px 0;
    font-size: 1em;
    color: inherit;
}
.tht-map-popup .tht-popup-detail {
    margin: 3px 0;
    font-size: 0.9em;
    opacity: 0.85;
}
.tht-map-legend {
    background: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    font-size: 0.85em;
    line-height: 1.6;
}
.tht-map-legend i {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: middle;
    border-radius: 50%;
}
.tht-map-legend .tht-legend-trail {
    background: #2ecc40;
    border-radius: 2px;
    height: 3px;
    width: 14px;
    margin-bottom: 3px;
}
.tht-map-legend .tht-legend-path {
    background: #0074d9;
    border-radius: 2px;
    height: 3px;
    width: 14px;
    margin-bottom: 3px;
}

/* === Status Card === */
.tht-status-card {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1.2em;
    margin: 1.5em 0;
    background: inherit;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: inherit;
}
.tht-status-item {
    flex: 1 1 180px;
    padding: 0.8em;
    text-align: center;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.02);
}
.tht-status-label {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    margin-bottom: 0.3em;
}
.tht-status-value {
    display: block;
    font-size: 1.3em;
    font-weight: 600;
}
.tht-status-sub {
    display: block;
    font-size: 0.8em;
    opacity: 0.6;
    margin-top: 0.2em;
}

/* === Table === */
.tht-table-wrap {
    margin: 1.5em 0;
    overflow-x: auto;
}
.tht-table {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    font-size: 0.95em;
}
.tht-table thead th {
    padding: 0.7em 0.8em;
    text-align: left;
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.7;
}
.tht-table tbody td {
    padding: 0.6em 0.8em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: middle;
}
.tht-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}
.tht-table .tht-day-row {
    cursor: pointer;
    transition: background 0.15s ease;
}
.tht-table .tht-day-row:hover {
    background: rgba(0, 0, 0, 0.04);
}
.tht-table .tht-day-row td:first-child::before {
    content: "\25B6";
    display: inline-block;
    margin-right: 6px;
    font-size: 0.7em;
    transition: transform 0.2s ease;
    opacity: 0.5;
}
.tht-table .tht-day-row.tht-expanded td:first-child::before {
    transform: rotate(90deg);
}
.tht-table .tht-hour-row td {
    padding-left: 2em;
    font-size: 0.9em;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.015);
}
.tht-table .tht-hour-row td:first-child::before {
    content: "\2022";
    margin-right: 6px;
    opacity: 0.4;
}
.tht-table .tht-elevation-up {
    color: #27ae60;
}
.tht-table .tht-elevation-down {
    color: #e74c3c;
}

/* === Loading / Empty States === */
.tht-loading {
    text-align: center;
    padding: 2em;
    opacity: 0.5;
    font-style: italic;
}
.tht-empty {
    text-align: center;
    padding: 3em 1em;
    opacity: 0.4;
}

/* === Pagination === */
.tht-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin-top: 1em;
    font-size: 0.9em;
}
.tht-pagination a,
.tht-pagination span {
    padding: 0.4em 0.8em;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
}
.tht-pagination span.current {
    font-weight: 600;
    background: rgba(0, 0, 0, 0.05);
}

/* === Responsive === */
@media (max-width: 600px) {
    .tht-status-card {
        flex-direction: column;
    }
    .tht-status-item {
        flex: 1 1 100%;
    }
    .tht-table {
        font-size: 0.85em;
    }
    .tht-table thead th,
    .tht-table tbody td {
        padding: 0.5em;
    }
}
