/* MapTrax v2.4.1.3 - Map Overlays and Controls */

.map-overlay {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 8px;
    z-index: 1;
}

.controls {
    top: 70px;
    left: 10px;
    max-width: 300px;
    transition: transform 0.3s ease;
}

.controls.collapsed {
    transform: translateX(calc(-100% - 10px));
}

.sidebar-toggle {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 60px;
    background: white;
    border: none;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #b96c28;
    z-index: 2;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
}

.info-panel {
    top: 70px;
    right: 10px;
    max-width: 380px;
    max-height: min(70vh, 600px);
    overflow-y: auto;
}

.info-panel.hidden {
    display: none;
}

.info-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.info-panel-header h3 {
    margin: 0;
}

.info-panel-close {
    background: none;
    color: #888;
    border: none;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    border-radius: 3px;
}

.info-panel-close:hover {
    background: #f0f0f0;
    color: #333;
}

.info-panel-show-btn {
    position: fixed;
    top: 70px;
    right: 10px;
    z-index: 1100;
    padding: 6px 10px;
    background: white;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    font-size: 12px;
    cursor: pointer;
}

.info-panel-show-btn:hover {
    background: #f5f5f5;
}

.quarter-editor {
    top: 200px;
    right: 10px;
    width: 250px;
    max-height: 70vh;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.quarter-editor.visible {
    display: block;
}

h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #333;
}

.control-group {
    margin-bottom: 6px;
}

.control-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    margin-bottom: 2px;
    color: #555;
}

button {
    padding: 5px 8px;
    background: #b96c28;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: background 0.2s;
}

button:hover {
    background: #a96932;
}

button.secondary {
    background: #7a4d27;
}

button.secondary:hover {
    background: #5a3d1f;
}

button.active {
    background: #b96c28;
}

button.active:hover {
    background: #a96932;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.info-content {
    font-size: 11px;
    line-height: 1.5;
}

.info-content strong {
    color: #333;
}

.info-content p {
    margin: 5px 0;
}

.empty-state {
    color: #999;
    font-style: italic;
}

.button-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

select {
    width: 100%;
    padding: 5px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    cursor: pointer;
}

.loading {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

.mapboxgl-ctrl-top-right {
    top: 180px !important;
}

.mode-indicator {
    background: #b96c28;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

/* v2.10.4.0 — Stacked Tract Picker.
   Shown in the Section Information panel when the user left-clicks a tract
   that has 2+ stacked siblings (same physical location, different ownership /
   data records). ◀ ▶ cycle, dropdown jumps when 4+ stacked. */
.stacked-picker {
    background: #fbf6ee;
    border: 1px solid #d4c5b0;
    border-radius: 4px;
    padding: 6px 8px;
    margin-bottom: 8px;
}

.stacked-picker-header {
    font-size: 10px;
    font-weight: 600;
    color: #6b5536;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.stacked-picker-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stacked-picker-arrow {
    background: #fff;
    border: 1px solid #d4c5b0;
    color: #b96c28;
    width: 26px;
    height: 24px;
    padding: 0;
    line-height: 1;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s, border-color 0.12s;
}

.stacked-picker-arrow:hover {
    background: #fdf2e6;
    border-color: #b96c28;
}

.stacked-picker-counter {
    font-size: 12px;
    font-weight: 600;
    color: #5b4a30;
    min-width: 60px;
    text-align: center;
}

.stacked-picker-dropdown {
    flex: 1;
    min-width: 100px;
    padding: 3px 4px;
    font-size: 11px;
    background: #fff;
    color: #5b4a30;
    border: 1px solid #d4c5b0;
    border-radius: 3px;
    cursor: pointer;
}

/* Detail block below the picker controls. v2.10.4.3 redesign: legal
   description is the focal point; asset name secondary; section / acres /
   source file are compact metadata. */
.stacked-picker-detail {
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    margin-top: 6px;
}

/* Asset name — second-most-prominent. Accent color, bold, larger. */
.stacked-picker-asset {
    font-weight: 700;
    color: #b96c28;
    font-size: 14px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Section identity — small contextual line below the asset. */
.stacked-picker-section {
    color: #6b5536;
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: 0.2px;
}

/* "LEGAL DESCRIPTION" label — small uppercase form-fieldset style. */
.stacked-picker-legal-label {
    font-size: 10px;
    font-weight: 600;
    color: #8a7752;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    margin-bottom: 2px;
}

/* The legal description value — the focal point. Big, bold, accent
   left-border + tinted background so it visually stands apart from the
   metadata rows above and below. */
.stacked-picker-legal {
    font-size: 16px;
    font-weight: 700;
    color: #2a1f0c;
    background: #fff8e8;
    border: 1px solid #ecdfce;
    border-left: 3px solid #b96c28;
    padding: 6px 10px;
    margin-bottom: 8px;
    border-radius: 3px;
    word-break: break-word;
    line-height: 1.3;
}

/* Compact two-line metadata block (Gross Acres + Source File). */
.stacked-picker-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.stacked-picker-meta-item {
    font-size: 11px;
    color: #5b4a30;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stacked-picker-meta-label {
    color: #8a7752;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-right: 4px;
    font-weight: 600;
}

.stacked-picker-hint {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #ecdfce;
    font-size: 10px;
    color: #888;
    font-style: italic;
}

/* v2.10.4.6: action buttons in the picker — explicit Show in Table /
   Edit Quarter Calls / Open Asset / Delete. Replaces the failed "right-click
   for options" hint that frustrated users into thinking nothing worked. */
.stacked-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ecdfce;
}

.stacked-picker-action {
    flex: 1 1 auto;
    min-width: 110px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    background: #fff;
    color: #5b4a30;
    border: 1px solid #d4c5b0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.stacked-picker-action:hover {
    background: #f5efe8;
    border-color: #b96c28;
    color: #b96c28;
}

/* Primary action (Edit Quarter Calls) — the most likely click. */
.stacked-picker-action-primary {
    background: #b96c28;
    color: #fff;
    border-color: #9a5820;
}

.stacked-picker-action-primary:hover {
    background: #9a5820;
    color: #fff;
    border-color: #7a4d27;
}

/* Destructive action (Delete) — visible only for click-only tracts. */
.stacked-picker-action-danger {
    color: #b91c1c;
    border-color: #fecaca;
}

.stacked-picker-action-danger:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #b91c1c;
}
