#ail-map-application,
#ail-map-application * {
    box-sizing: border-box;
}

#ail-map-application {
    position: relative;
    width: 100%;
}



/* Map stage */


#ail-map-stage {
    position: relative;
    width: 100%;
    height: 78vh;
    min-height: 480px;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

#ail-map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}



/* Floating pills */



.ail-overlay-group {
    position: absolute;
    top: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 220px;
}

#ail-filter-overlay {
    left: 12px;
}

#ail-actions-overlay {
    right: 12px;
    align-items: stretch;
    text-align: right;
}

.ail-select-wrap {
    position: relative;
}




/* Mobile Filters */



.ail-filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    background-color: #111111;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.ail-filter-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #ffffff;
    margin-left: 4px;
}

.ail-filter-count {
    background: #ffffff;
    color: #111111;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
}

#ail-filter-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ail-filter-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 10px 30px 10px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    background-color: #111111;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0L5 6L10 0Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.ail-filter-input option {
    color: #111111;
    background: #ffffff;
    font-weight: 400;
}

.ail-pinned-badge {
    background: #111111;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    white-space: nowrap;
}

.ail-overlay-btn {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    background-color: #111111;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: background-color 0.2s ease;
}

.ail-overlay-btn:hover {
    background-color: #333333;
}

.ail-btn-short {
    display: none;
}




/* Location - single location sheet to replace map balloon */




.ail-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    max-height: 58%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.28);
    padding: 14px 20px 18px;
    transform: translateY(105%);
    transition: transform 0.28s ease;
}

.ail-sheet.is-open {
    transform: translateY(0);
}

.ail-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: #dddddd;
    margin: 0 auto 10px;
    flex-shrink: 0;
}

#ail-sheet-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    background: transparent;
    border: none;
    color: #111111;
    font-size: 22px;
    cursor: pointer;
    border-radius: 2px;
}

#ail-sheet-close:hover {
    background: #f2f2f2;
}

#ail-sheet-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.ail-sheet-title-row h3 {
    margin: 0 0 2px 0;
    font-size: 17px;
    font-weight: 700;
    color: #111111;
    padding-right: 26px;
}

.ail-sheet-meta {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #666666;
}

.ail-sheet-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px 0;
}

.ail-pill {
    background: #111111;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 5px 10px;
    border-radius: 2px;
    white-space: nowrap;
}

.ail-sheet-scroll {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 12px;
    padding-top: 8px;
    border-top: 1px solid #eeeeee;
}

.ail-sheet-events-fallback {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ail-sheet-events-fallback li {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #eeeeee;
    font-size: 13px;
}

.ail-sheet-events-fallback li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ail-sheet-events-fallback a {
    color: #0066cc;
    font-weight: 700;
    text-decoration: none;
}

.ail-sheet-events-fallback a:hover {
    text-decoration: underline;
}

.ail-sheet-events-fallback small {
    color: #777777;
}

.ail-sheet-empty {
    font-size: 12px;
    color: #999999;
    margin: 0;
}



/* simple evnt cards for map view */



.ail-mobile-event-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ail-mobile-event-card {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eeeeee;
}

.ail-mobile-event-card:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.ail-mobile-event-hidden {
    display: none;
}

.ail-mobile-event-thumb {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 2px;
    overflow: hidden;
    background: #f0f0f0;
}

.ail-mobile-event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ail-mobile-event-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ail-mobile-event-title {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ail-mobile-event-date {
    font-size: 11px;
    color: #777777;
    margin-top: 2px;
}

.ail-mobile-events-more {
    width: 100%;
    margin-top: 2px;
    text-align: center;
}

.ail-pin-btn {
    width: 100% !important;
    padding: 5px 10px !important;
    background: #111111 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 2px !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    cursor: pointer !important;
    flex-shrink: 0;
}

.ail-pin-btn.is-pinned {
    background: #ffffff !important;
    color: #111111 !important;
    border: 2px solid #111111 !important;
}




/* Pinned Venues List */


.ail-pinned-container {
    margin-top: 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ail-pinned-container h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 2px solid #111;
    padding-bottom: 8px;
}

#ail-pinned-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ail-pinned-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 0;
}

.ail-pinned-item:last-child {
    border-bottom: none;
}

.ail-pinned-item-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 12px;
}

.ail-pinned-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ail-pinned-num {
    background: #111111;
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.ail-pinned-title-row h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.ail-pinned-meta {
    margin: 2px 0 6px 0;
    font-size: 11px;
    color: #666;
}

.ail-unpin-btn {
    background: transparent;
    color: #cc0000;
    border: 1px solid #cc0000;
    border-radius: 2px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ail-unpin-btn:hover {
    background: #cc0000;
    color: #ffffff;
}

.ail-pinned-events {
    margin: 8px 0 0 32px;
    padding: 0;
    list-style: disc;
    font-size: 12px;
    color: #333;
}

.ail-pinned-events li {
    margin-bottom: 4px;
}

.ail-pinned-events a {
    color: #0066cc;
    font-weight: 700;
    text-decoration: none;
}

.ail-pinned-events a:hover {
    text-decoration: underline;
}

.ail-shortcode-grid {
    margin-top: 4px;
}

#ail-map-application .em-forced-responsive-grid .em-events-list,
#ail-map-application .em-forced-responsive-grid .events-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

#ail-map-application .em-forced-responsive-grid .em-events-list > *,
#ail-map-application .em-forced-responsive-grid .events-list > * {
    flex: 0 0 calc(25% - 15px) !important;
    width: calc(25% - 15px) !important;
    box-sizing: border-box !important;
}



/* Mobile layouts */


@media (max-width: 767px) {
    #ail-map-stage {
        height: 82vh;
        min-height: 420px;
        border-radius: 0;
    }

    .ail-overlay-group {
        max-width: 132px;
    }

    #ail-filter-overlay {
        width: 132px;
    }

    .ail-filter-toggle {
        display: flex;
    }

    #ail-filter-panel {
        display: none;
        margin-top: 8px;
    }

    #ail-filter-panel.is-open {
        display: flex;
    }

    .ail-filter-input {
        font-size: 11px;
        padding: 9px 24px 9px 10px;
        background-position: right 10px center;
    }

    .ail-pinned-badge,
    .ail-overlay-btn {
        font-size: 10px;
        padding: 7px 8px;
    }

    .ail-btn-full {
        display: none;
    }

    .ail-btn-short {
        display: inline;
    }

    .ail-sheet {
        max-height: 66%;
        padding: 12px 16px 16px;
        border-radius: 16px 16px 0 0;
    }

    .ail-sheet-title-row h3 {
        font-size: 15px;
    }

    .ail-sheet-meta {
        font-size: 11px;
    }

    .ail-pin-btn {
        padding: 5px 10px !important;
        font-size: 10px !important;
    }

    .ail-sheet-pills {
        gap: 4px;
    }

    .ail-pill {
        flex: 0 0 calc(33.333% - 3px);
        max-width: calc(33.333% - 3px);
        box-sizing: border-box;
        text-align: center;
        font-size: 9px;
        letter-spacing: 0.01em;
        padding: 4px 3px;
        line-height: 1.2;
        white-space: normal;
    }

    .ail-pinned-container {
        padding: 14px;
    }

    .ail-pinned-container h3 {
        font-size: 14px;
    }

    .ail-pinned-title-row h4 {
        font-size: 13px;
    }

    .ail-pinned-meta {
        font-size: 10px;
    }

    .ail-unpin-btn {
        font-size: 10px;
        padding: 5px 10px;
    }

    #ail-map-application .em-forced-responsive-grid .em-events-list > *,
    #ail-map-application .em-forced-responsive-grid .events-list > * {
        flex: 0 0 calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
    }
}


@media (max-width: 576px) {
    .ail-overlay-group {
        max-width: 116px;
    }

    #ail-filter-overlay {
        width: 116px;
    }

    #ail-map-application .em-forced-responsive-grid .em-events-list > *,
    #ail-map-application .em-forced-responsive-grid .events-list > * {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
}