/* Map sidebar styles */
#map-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

#map-sidebar {
    width: 100%;
    min-width: 100%;
    background: rgba(13, 13, 13, 0.95);
    border-bottom: 1px solid rgba(197, 164, 78, 0.2);
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 300px;
    border-radius: 0;
    order: 2;
}

#map-main {
    flex: 1;
    min-width: 0;
    order: 1;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section h3 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(197, 164, 78, 0.15);
}

/* Near me button */
.near-me-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(155, 27, 48, 0.2);
    border: 1px solid var(--ruby);
    border-radius: 8px;
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 1rem;
}

.near-me-btn:hover {
    background: rgba(155, 27, 48, 0.4);
}

/* Filter checkboxes */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--cream-dark);
    cursor: pointer;
}

.filter-group input[type="checkbox"] {
    accent-color: var(--gold);
}

.filter-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* Pilgrimage builder */
.pilgrim-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(245, 240, 232, 0.08);
    border: 1px solid rgba(197, 164, 78, 0.3);
    border-radius: 6px;
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    margin-bottom: 0.75rem;
}

.pilgrim-input:focus {
    border-color: var(--gold);
}

.pilgrim-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(245, 240, 232, 0.08);
    border: 1px solid rgba(197, 164, 78, 0.3);
    border-radius: 6px;
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    margin-bottom: 0.75rem;
}

.pilgrim-select option {
    background: var(--charcoal);
}

.stop-list {
    list-style: none;
    margin: 0.75rem 0;
}

.stop-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(245, 240, 232, 0.04);
    border-radius: 6px;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    color: var(--cream-dark);
}

.stop-item .stop-num {
    background: var(--ruby);
    color: var(--cream);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.stop-item .stop-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stop-item .stop-actions button {
    background: transparent;
    border: none;
    color: var(--cream-dark);
    cursor: pointer;
    padding: 0 2px;
    font-size: 0.9rem;
}

.stop-item .stop-actions button:hover {
    color: var(--gold);
}

.build-route-btn {
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--gold-dark);
    border: none;
    border-radius: 8px;
    color: var(--dark);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.build-route-btn:hover {
    background: var(--gold);
}

.build-route-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Share link */
.share-link-box {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.share-link-box input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    background: rgba(245, 240, 232, 0.06);
    border: 1px solid rgba(197, 164, 78, 0.2);
    border-radius: 6px;
    color: var(--cream);
    font-size: 0.8rem;
}

.share-link-box button {
    padding: 0.4rem 0.8rem;
    background: var(--gold-dark);
    border: none;
    border-radius: 6px;
    color: var(--dark);
    font-size: 0.8rem;
    cursor: pointer;
}

/* Nearby businesses in sidebar */
.nearby-biz-list {
    font-size: 0.85rem;
}

.nearby-stop-group {
    margin-bottom: 0.75rem;
}

.nearby-stop-group h4 {
    font-size: 0.8rem;
    color: var(--gold-dark);
    margin-bottom: 0.3rem;
}

.nearby-stop-group .biz-item {
    padding: 0.2rem 0;
    color: var(--cream-dark);
}

.nearby-stop-group .biz-distance {
    color: rgba(245, 240, 232, 0.4);
    font-size: 0.75rem;
}

/* Sidebar toggle for mobile */
.sidebar-toggle {
    display: block;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    padding: 0.5rem 0.75rem;
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
    color: var(--gold);
    font-size: 0.85rem;
    cursor: pointer;
}

/* Desktop overrides */
@media (min-width: 1024px) {
    #map-container {
        flex-direction: row;
    }

    #map-sidebar {
        width: 320px;
        min-width: 320px;
        max-height: 700px;
        border-right: 1px solid rgba(197, 164, 78, 0.2);
        border-bottom: none;
        border-radius: 12px 0 0 12px;
        order: 0;
    }

    #map-main {
        order: 0;
    }

    .sidebar-toggle {
        display: none;
    }
}
