/**
 * Multi-County Selection UI Styles
 * 
 * This file contains styles for the sidebar UI elements related to
 * multi-county region selection (USCB dataset).
 * 
 * Map/SVG-specific styles are in map.css
 */

/* ========================================
   UI LOCKING & SIDEBAR STYLES
   ======================================== */

/* Locked elements during multi-select mode */
.multi-select-locked {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(50%);
}

/* Sidebar visual indicator when multi-select is active */
#sidebar.multi-select-active {
    /* No longer using green overlay - repurposed for map editor */
    position: relative;
}

/* ========================================
   MAP EDITOR UI (LEFT SIDEBAR)
   ======================================== */

.map-editor-container {
    padding: 20px;
}

.map-editor-container h3 {
    margin: 0 0 15px 0;
    color: var(--primary-dark, #2C3E50);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Saved map items - styled like region items, full width */
.saved-map-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 0 0 10px 0;
    background: rgba(46, 213, 115, 0.05);
    border: 2px dashed var(--multi-select-green);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.saved-map-item:hover {
    background: rgba(46, 213, 115, 0.08);
    box-shadow: 0 2px 8px rgba(46, 213, 115, 0.2);
}

/* Edit button styling */
.edit-saved-map-btn {
    padding: 10px 16px;
    background: var(--multi-select-green);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-saved-map-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(46, 213, 115, 0.4);
}

.edit-saved-map-btn:active {
    transform: translateY(0);
}

/* Maps list container - no nested scrolling, use parent's scroll */
#maps-list-container {
    /* No max-height or overflow - uses parent sidebar scroll */
}

/* Map name input when editing */
#edit-map-name-input {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--multi-select-green);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    background: rgba(46, 213, 115, 0.05);
    transition: all 0.2s ease;
    text-align: center;
    text-transform: uppercase;
}

#edit-map-name-input:focus {
    outline: none;
    border-style: solid;
    background: rgba(46, 213, 115, 0.1);
    box-shadow: 0 0 0 3px rgba(46, 213, 115, 0.2);
}

#edit-map-name-input::placeholder {
    color: #999;
    font-weight: 600;
}

/* ========================================
   REGION NAMING UI
   ======================================== */
.region-header-editable,
.map-name-editable {
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--primary-dark);
    text-align: center;
    padding: 0 15px;
    border: 2px dashed var(--multi-select-green);
    border-radius: 6px;
    background-color: rgba(46, 213, 115, 0.05);
    cursor: text;
    outline: none;
    transition: all 0.2s ease;
    min-height: 45px;
    line-height: 45px;
    margin: 8px;
}

.region-header-editable:empty:before,
.map-name-editable:empty:before {
    content: attr(data-placeholder);
    color: #999;
    font-weight: 600;
    font-style: normal;
    text-transform: uppercase;
}

.region-header-editable:focus,
.map-name-editable:focus {
    border-color: var(--multi-select-green);
    border-style: solid;
    background-color: rgba(46, 213, 115, 0.1);
    box-shadow: 0 0 0 3px rgba(46, 213, 115, 0.2);
}

/* ========================================
   REGION SELECTION MESSAGE
   ======================================== */
.region-selection-message {
    text-align: center;
    padding: 20px 15px;
    color: var(--primary-dark);
}

.region-selection-message p {
    margin: 10px 0;
    font-size: 14px;
}

.region-selection-message .county-count {
    font-weight: 700;
    font-size: 16px;
    color: var(--multi-select-green);
    margin-top: 15px;
}

/* ========================================
   SAVE REGION BUTTONS
   ======================================== */

/* Shared styles for both button variants */
.save-region-btn,
.save-region-btn-primary {
    background-color: var(--multi-select-green);
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(46, 213, 115, 0.3);
}

.save-region-btn:hover:not(:disabled),
.save-region-btn-primary:hover:not(:disabled) {
    background-color: #26c063;
    box-shadow: 0 4px 8px rgba(46, 213, 115, 0.4);
}

.save-region-btn:disabled,
.save-region-btn-primary:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* Base save region button */
.save-region-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.save-region-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.save-region-btn:active:not(:disabled) {
    transform: translateY(0);
}

.save-region-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Primary variant (in download area) */
.save-region-btn-primary {
    border: 2px solid var(--multi-select-green);
    transition: all 0.2s ease;
}

.save-region-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
}

.save-region-btn-primary:disabled {
    border-color: #ccc;
}

