*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui;
}

html, body {
    background-color: #222222;
}

#map {
    height: 100vh;
}

#controls {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 5px;
    padding: 5px 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#filters {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px;
    align-items: center;
    color: #1c1c1c;
}

#filters label {
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

#filters input[type="date"],
#filters input[type="text"] {
    border: 1px solid #b6b6b6;
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 14px;
    background: #fff;
}

#date-presets {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.search-reset {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.search-reset button {
    grid-column: span 1 !important;
}

.band-nav {
    grid-column: span 2;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

#filters button {
    grid-column: span 2;
    border: none;
    border-radius: 8px;
    padding: 4px 5px;
    font-size: 13px;
    background: #1e3a5f;
    color: #fff;
    cursor: pointer;
}

.search-reset button {
    grid-column: auto;
}

.band-nav button {
    grid-column: auto;
    background: #3b2f6f;
}

#filters button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#filters .preset-button {
    grid-column: auto;
    background: #f2f2f2;
    color: #1c1c1c;
    border: 1px solid #b6b6b6;
    padding: 4px 0;
}

#filters button#reset-dates {
    background: #5a5a5a;
}

#filters button#list-toggle {
    background: #244c2a;
}

#filters button#controls-toggle {
    background: #394657;
}

#filters button:hover {
    filter: brightness(0.95);
}

#controls.is-band-mode .date-controls {
    display: none;
}

#controls.is-band-mode .band-nav {
    display: grid;
}

#controls.is-collapsed .controls-collapsible {
    display: none;
}

@media (max-width: 600px) {
    #controls {
        left: 50px;
        right: 10px;
        width: calc(100% - 60px);
    }
}

#list-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2000;
}

#list-modal.is-open {
    display: block;
}

.list-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.list-modal__panel {
    position: relative;
    width: min(720px, 92vw);
    max-height: min(78vh, 680px);
    margin: 8vh auto 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.list-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #e5e5e5;
    background: #f7f6f2;
}

.list-modal__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.list-modal__header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1b1b1b;
}

.list-modal__count {
    font-size: 12px;
    color: #4a4a4a;
}

.list-modal__close {
    border: 1px solid #c7c7c7;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
}

.list-modal__body {
    padding: 16px 18px 20px;
    overflow-y: auto;
    display: grid;
    gap: 12px;
}

.list-modal__item {
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}

.list-modal__item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2a2e;
    margin-bottom: 6px;
}

.list-modal__item-meta {
    font-size: 13px;
    color: #4a4a4a;
}

.show-ics-link {
    color: inherit;
    text-decoration: underline;
}

.show-ics-link:hover {
    text-decoration: none;
}

.list-modal__item-address {
    font-size: 12px;
    color: #2f2f2f;
    margin-top: 4px;
}

.list-modal__item-address a {
    color: inherit;
    text-decoration: none;
}

.list-modal__item-address a:hover {
    text-decoration: underline;
}

.list-modal__empty {
    font-size: 14px;
    color: #4a4a4a;
}

.modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .list-modal__panel {
        width: calc(100% - 24px);
        margin: 10vh auto 0;
        max-height: 75vh;
    }

    .list-modal__header {
        padding: 14px 16px;
    }
}

.venue-marker {
    background-color: #bababa;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 14px;
    padding: 2px;

}

.venue-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, 0);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #bababa;
}

.venue-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 15%;
}
