/* TruckNav — Slide-in panels, forms, lists, components */

/* ── Slide-In Panels ── */
.slide-panel {
    position: fixed;
    top: 0;
    right: -340px;
    width: 340px;
    height: 100%;
    background: #121224;
    z-index: 300;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(126, 184, 255, 0.15);
}

.slide-panel.open {
    right: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #7eb8ff;
}

.panel-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: #aaa;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:active {
    background: rgba(255, 255, 255, 0.12);
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* Panel overlay */
#panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 250;
    display: none;
}

#panel-overlay.active {
    display: block;
}

/* ── Truck Stop / POI List ── */
.poi-list {
    list-style: none;
}

.poi-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.poi-item:active {
    background: rgba(126, 184, 255, 0.08);
}

.poi-name {
    font-size: 15px;
    font-weight: 600;
    color: #e0e0e0;
}

.poi-detail {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.poi-distance {
    font-size: 13px;
    color: #7eb8ff;
    font-weight: 600;
    margin-top: 2px;
}

/* ── Directions List ── */
.direction-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.direction-item.active-step {
    background: rgba(126, 184, 255, 0.08);
    border-radius: 8px;
    padding: 12px 8px;
    margin: 0 -8px;
}

.direction-icon {
    width: 32px;
    min-width: 32px;
    font-size: 18px;
    color: #7eb8ff;
    padding-top: 2px;
}

.direction-text {
    font-size: 14px;
    color: #d0d0d0;
    line-height: 1.4;
}

.direction-dist {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* ── Dimension Row (ft/in inputs) ── */
.dim-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dim-row input {
    width: 60px !important;
    flex: none;
}

.dim-unit {
    color: #888;
    font-size: 14px;
    min-width: 16px;
}

/* ── Profile Form ── */
.profile-form label {
    display: block;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    margin-top: 16px;
}

.profile-form label:first-child {
    margin-top: 0;
}

.profile-form input,
.profile-form select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.profile-form input:focus,
.profile-form select:focus {
    border-color: #7eb8ff;
}

.profile-form select option {
    background: #1a1a2e;
    color: #e0e0e0;
}

.btn-save {
    width: 100%;
    padding: 14px;
    margin-top: 24px;
    background: #1e3a5f;
    border: none;
    border-radius: 8px;
    color: #7eb8ff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:active {
    background: #2a5090;
}

/* ── Hazmat Checkbox Group ── */
.hazmat-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.hazmat-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ccc;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    cursor: pointer;
}

.hazmat-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #7eb8ff;
}

/* Search input is now in the header bar — styled in base.css */

/* ── Panel scrollbar ── */
.panel-body::-webkit-scrollbar {
    width: 4px;
}

.panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.panel-body::-webkit-scrollbar-thumb {
    background: rgba(126, 184, 255, 0.2);
    border-radius: 2px;
}

/* ── Map Tools Grid ── */
.map-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.map-tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.map-tool-item:active {
    background: rgba(126, 184, 255, 0.15);
}

.tool-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

/* ── Loading Spinner ── */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(126, 184, 255, 0.2);
    border-top-color: #7eb8ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
