.map-wrapper {
    height: 400px;
    position: relative;
    transition: height 0.5s ease-in-out;
}
#map {
    width: 100%;
    height: 100%;
}
/* Hide the infowindow close button */
.gm-style-iw-chr {display: none;}
/* Add little triangle under infowindow */
.gm-style .gm-style-iw-tc::after {
    background: #fff;
    -webkit-clip-path: polygon(0 0, 50% 100%, 100% 0);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    content: "";
    height: 12px;
    left: 0;
    position: absolute;
    top: -1px;
    width: 25px;
}
/* Remove weird google maps styles */
.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    max-height: 1000px !important;
}
.gm-style .gm-style-iw-c {
    padding: 0px !important;
}
/* Style for the tooltip container */
.event-tooltip {
    position: relative;
    background: #fff;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
	max-height: 180px;
    overflow: auto;
}
.mapboxgl-popup.mapboxgl-popup-anchor-top, .mapboxgl-popup.mapboxgl-popup-anchor-bottom {
    max-width: 300px !important;
    z-index: 99999;
}
/* Style for the close button */
#close-tooltip {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background-color: #ff5c5c;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    line-height: 20px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}
/* Style for the event tooltip card */
.event-tooltip-card {
    width: 100%;
    padding: 12px;
}
.event-tooltip-card a {
    outline: none;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px !important;
    text-decoration: none !important;
    width: 100% !important;
}
/* Style for the event image */
.event-tooltip-image {
    display: block !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0 !important;
}

/* Info column: name on top, bottom row below */
.tooltip-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px;
    flex: 1 !important;
    min-width: 0;
}
/* Bottom row: city/state on left, date box on right */
.tooltip-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
/* City, state */
.event-tooltip-location {
    font-size: 13px;
    color: #7A7A7A;
    margin: 0;
}
/* Date box */
.tooltip-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 8px;
    padding: 4px 8px;
    min-width: 40px;
    line-height: 1.2;
}
.tooltip-date-month {
    font-size: 11px;
    color: #555;
}
.tooltip-date-day {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}
/* Title styling */
.event-tooltip-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}
/* Date styling (legacy) */
.event-tooltip-date {
    font-size: 14px;
    color: #777;
    margin: 0;
}
button.mapboxgl-popup-close-button {
    background: #ff6565;
    color: #fff;
    font-size: 20px;
    padding: 0 4px;
}
.mapboxgl-popup-close-button:hover {
    background: red;
}
.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay color */
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
    pointer-events: none; 
    z-index: 20;
}
.map-wrapper.shrink .map-overlay {
    opacity: 1;
}
.view-switcher {
    position: absolute;
    z-index: 99999;
    background-color: #fff;
    display: flex;
    flex-direction: row;
    top: 10px;
    right: 50%;
    transform: translateX(50%);
    border-radius: 999px;
    padding: 4px;
}
.view-switcher-btn {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    padding: 10px 18px;
}
.view-switcher-btn.active {
    /* background-color: #02A67F; */
    background-color: #a4d577;
    color: #fff;
}
.view-switcher-left {
    padding: 10px;
}
.view-switcher-right {
    padding: 10px;
}
.events-wrapper {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    /* gap: 20px !important; */
    gap: 16px !important;
    justify-content: center;
}
.event-card {
 	flex: 1 1 300px;
    max-width: 336px;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.event-image {
    width: 100%;
    height: 181px;
    background-color: #ccc;
}
.event-date-right {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    width: 50px;
    height: 50px;
    -webkit-border-radius: 0.8rem;
    border-radius: 0.8rem;
    background: #e9ecef;
}
p.event-location {
    padding-top: 0;
    font-size: 14px;
    margin-bottom: 0;
    margin-top: 0;
    color: #7A7A7A;
}
.event-date-right span:first-child {
    font-size: 12px;
}
.event-name {
    font-size: 16px;
    min-height: auto;
    margin-bottom: 0;
}
.home .event-name {
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
}
.single-hpd_themes .event-name {
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
}
.event-d {
    display: flex;
    justify-content: space-between;
}
.events-page .filters h2 {
    margin: 0;
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
    color: var(--bs-body-color);
    text-align: var(--bs-body-text-align);
    background-color: var(--bs-body-bg);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.events-page .event-name {
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
}
#event-search-form input.btn.btn-primary {
    display: none;
}
#search-input{
    padding: 0 20px 0 65px;
    font-size: 1.1rem;
    border-radius: 40px;
    height: 4rem;
}
.search-wrapper {
    position: relative;
    width: 100%;
}
.search-wrapper .search-icon {
    position: absolute;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
}
.event-card-info {
    padding: 10px;
    margin-top: 10px;
    flex-grow: 1; 
}

/* Evergreen theme directory pilot (St. Patrick's Day). */
.theme-section-intro {
    max-width: 850px;
    margin: 10px auto 30px;
    padding: 0 18px;
    text-align: center;
    color: #5f666d;
    line-height: 1.65;
}

.theme-directory-heading {
    margin-top: 58px;
    text-align: center;
}

.theme-nearby-events,
.theme-all-locations {
    gap: 24px !important;
}

.theme-directory-card {
    position: relative;
    flex: 1 1 310px;
    max-width: 356px;
    border: 1px solid #e2e6e9;
    border-radius: 18px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(24, 39, 32, .06);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.theme-directory-card:hover,
.theme-directory-card:focus-visible {
    color: inherit;
    border-color: #b9cfc3;
    box-shadow: 0 14px 34px rgba(24, 39, 32, .14);
    transform: translateY(-4px);
}

.theme-directory-card:focus-visible {
    outline: 3px solid rgba(20, 108, 67, .22);
    outline-offset: 3px;
}

.theme-directory-card .event-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 8.5;
    object-fit: cover;
    background: #e9ecef;
}

.theme-directory-card .event-card-info {
    display: flex;
    min-height: 174px;
    padding: 17px 18px 16px;
    margin-top: 0;
    flex-direction: column;
}

.theme-directory-card .event-d {
    align-items: flex-start;
    gap: 16px;
}

.theme-directory-card .title-d {
    min-width: 0;
    flex: 1;
}

.theme-directory-card .event-name {
    display: -webkit-box;
    margin: 0 0 5px;
    overflow: hidden;
    color: #18211c;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.theme-directory-card p.event-location {
    color: #6b7278;
    font-size: 14px;
    font-weight: 500;
}

.event-status-row {
    position: absolute;
    z-index: 2;
    top: 13px;
    left: 13px;
    margin: 0;
}

.event-status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .13);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .01em;
}

.event-status-upcoming {
    background: rgba(223, 245, 230, .96);
    color: #126b32;
}

.event-status-returning {
    background: rgba(255, 255, 255, .95);
    color: #34433b;
}

.event-card-date,
.event-card-time {
    margin: 9px 0 0;
    color: #697179;
    font-size: 12px;
    line-height: 1.4;
}

.event-card-time {
    margin-top: 3px;
    color: #6c757d;
}

.theme-directory-card .event-date-right {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border: 1px solid #e1e5e8;
    border-radius: 15px;
    background: #f2f4f5;
    color: #26332c;
    font-weight: 700;
}

.theme-directory-card .event-date-right span:first-child {
    color: #697179;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.theme-directory-card .event-date-right span:last-child {
    font-size: 16px;
}

.theme-directory-card .event-date-tba {
    border-color: #d7eadf;
    background: #edf7f1;
    color: #146c43;
}

.event-card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #edf0f1;
    color: #146c43;
    font-size: 13px;
    font-weight: 700;
}

.event-card-cta::after {
    content: "\2192";
    font-size: 17px;
    line-height: 1;
    transition: transform .2s ease;
}

.theme-directory-card:hover .event-card-cta::after,
.theme-directory-card:focus-visible .event-card-cta::after {
    transform: translateX(3px);
}

.theme-empty-state {
    width: 100%;
    max-width: 760px;
    margin: 8px auto 20px;
    padding: 28px;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    background: #f8f9fa;
    text-align: center;
}

.theme-empty-state h3 {
    margin-bottom: 8px;
}

@media (max-width: 767px) {
    .theme-nearby-events,
    .theme-all-locations {
        gap: 18px !important;
    }

    .theme-directory-card {
        max-width: 430px;
    }

    .theme-directory-heading {
        margin-top: 44px;
    }
}
#event-filter-form {
	display: flex;
    flex-direction: row;
    gap: 10px;
}
.page-themes .event-card-info {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    margin-top: 0px;
}
.page-themes h3 {
    font-size: 16px;
    min-height: auto;
    margin-bottom: 0;
    font-weight: var(--bs-body-font-weight);
    text-transform: capitalize;
}
.mapboxgl-ctrl-bottom-left {
    display: none;
}
.list-view {
    padding: 15px 15px;
}
.filters { 
    display: flex;
    flex-direction: row;
    gap: 20px;
}
#event-filter-form {
    display: flex;
    flex-direction: row;
    gap: 10px;
}
.form-check {
    width: auto;
    flex: 0 1 auto;
}
/*Group event css start*/
.group-events {
  overflow: auto;
  max-height: 215px; 
  min-width: 220px;
}
.simplebar-content-wrapper:focus-visible {
    outline: none;
}
.custom-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: auto;
}
.marker-container {
    cursor: pointer;
    position: relative;
    width: 45px;
    height: 45px;
    background-image: url('/wp-content/uploads/2025/08/ic-group-location.png');
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inner-icon {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    left: 12px;
    top: 12px;
}
.marker-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #02A67F;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
}
/*Group event css end*/
/* Make the form-check elements 100% width only after 768px */
@media (max-width: 768px) {
    .view-switcher {
        min-width: 210px;
    }
    .event-card {
        max-width: 100% !important;
        flex: 2 2 150px !important;
    }

    #events-container.is-loading {
        min-height: 600px; /* Mobile space reserved */
    }
    .event-name {
        min-height: auto;
        font-size: 16px;
    }
    .event-image {
        height: auto;
    }
	.event-tooltip {
      width: unset !important;
      max-height: 195px;
    }
    .form-check {
        width: 100%;
    }
    #event-filter-form {
        flex-direction: column;
    }
    .event-tooltip:focus-visible,.group-events:focus-visible, .simplebar-wrapper:focus-visible,.gm-style .gm-style-iw:focus-visible {
        outline: 0px;
    }
    .event-tooltip-card a {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .event-tooltip-image {
        display: block !important;
        width: 50px !important;
        height: 50px !important;
        flex-shrink: 0 !important;
    }
    .tooltip-info {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    .tooltip-bottom {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .tooltip-date-box {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }
}
@media (max-width: 430px){
    .group-events {  
        min-width: 250px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .map-wrapper {
        height: 450px;
    }
}
@media screen and (min-width: 1600px) and (max-width: 1920px) {
    .events-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }
    
    .event-card {
        flex: 0 0 calc(25% - 16px);
        max-width: calc(25% - 16px);
        border: 1px solid #dee2e6;
        border-radius: 15px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    .event-image {
        width: 100%;
        height: 220px;
        object-fit: cover;
        display: block;
    }
}
