/* Young Birders – Event Customizations
   Filter UI ([events] + [past_events]), post-event report block, lightbox. */

/* ---------------------------------------------------------------
   Event filters
   --------------------------------------------------------------- */

/* Hide WPEM's free-text Location search on [events] (replaced by State/City) */
.event_filters .wpem-col:has(.wpem-location-container) { display: none; }
.event_filters .wpem-location-container { display: none; } /* fallback for older browsers */

/* Grey out states with no events (still selectable) */
select.event-manager-filter option.no-events,
select.ybmev-filter option.no-events { color: #999; }

/* [past_events] filter form */
.ybmev-past-filters { margin-bottom: 1.5em; }
.ybmev-past-actions { display: flex; align-items: center; gap: 1em; }
.ybmev-past-actions .ybmev-reset { text-decoration: underline; }
.ybmev-past-filters .chosen-container { width: 100% !important; }
.ybmev-past-filters .comiseo-daterangepicker-triggerbutton.ui-button { width: 100% !important; box-sizing: border-box; }

/* Mobile multi-select popup */
.mobile-multi-wrapper { margin-bottom: .6em; }
.mobile-multi-btn { width: 100%; text-align: left; padding: .6em .3em .6em .8em; border:1px solid #ccc; background:#fff; border-radius:4px; font-size:14px; }
.mobile-multi-label { display:inline-block; max-width:82%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }
.mobile-multi-caret { float:right; }

.mobile-multi-modal { position:fixed; top:5%; left:0; right:0; bottom:0; z-index:9999; }
.mobile-multi-overlay { position:absolute; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,0.45); }
.mobile-multi-dialog { position:absolute; top:12%; left:50%; right:auto; transform:translateX(-50%); width:min(420px, 90vw); background:#fff; border-radius:8px; padding:12px; max-height:76%; overflow:auto; box-shadow:0 8px 30px rgba(0,0,0,0.2); box-sizing:border-box; }
.mobile-multi-header h3 { margin:0 0 8px 0; font-size:16px; }
.mobile-multi-list { margin:8px 0; max-height: calc(70vh - 160px); overflow:auto; }
.mobile-multi-list .mm-item { display:block; padding:.5em 0; border-bottom:1px solid #f1f1f1; font-size:14px; }
.mobile-multi-actions { text-align:right; margin-top:10px; }
.mobile-multi-actions button { margin-left:.5em; padding:.45em .75em; font-size:14px; border-radius:6px; }
.mobile-multi-actions .mobile-multi-apply { background: #2b6cb0; color: #fff; border: none; }
.mobile-multi-actions .mobile-multi-cancel { background: transparent; border: 1px solid #ccc; color: #333; }

/* ---------------------------------------------------------------
   Post-event report block (markup from YB Events Toolkit)
   --------------------------------------------------------------- */
.yb-post-event-report {
	border-top: 1px solid rgba(0, 0, 0, .1);
	padding: 30px 30px;
	border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.yb-post-event-report__row {
  margin-bottom: 1.25em;
}
.yb-post-event-report__label {
  font-weight: 600;  
	padding-bottom: 0.2em;
  display: block;
}
.yb-post-event-report__row--social .yb-post-event-report__value a {
    overflow-wrap: anywhere;
}

.yb-post-event-report > h2,
.yb-post-event-report > h3 { margin: 0 0 .75em; }

.yb-post-event-report__text > :first-child { margin-top: 0; }
.yb-post-event-report__text > :last-child  { margin-bottom: 0; }

.yb-post-event-report__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 1.5em;
}

.yb-post-event-report__gallery a {
    display: block;
    line-height: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: zoom-in;
}

.yb-post-event-report__gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.yb-post-event-report__gallery a:hover img,
.yb-post-event-report__gallery a:focus-visible img { transform: scale(1.04); }

@media (max-width: 480px) {
    .yb-post-event-report__gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .yb-post-event-report__gallery img { height: 130px; }
	.yb-post-event-report > h2 {  font-size: 22px;}
	.yb-post-event-report > h3 { font-size: 20px; }
}

/* ---------------------------------------------------------------
   Lightbox (self-contained – ybmev-lightbox.js)
   --------------------------------------------------------------- */
.ybmev-lb {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .9);
    opacity: 0;
    transition: opacity .2s ease;
}
.ybmev-lb.is-open { opacity: 1; }

.ybmev-lb__img {
    max-width: 92vw;
    max-height: 86vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.ybmev-lb__caption {
    position: absolute;
    bottom: 1.25em;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80vw;
    color: #fff;
    font-size: 14px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

.ybmev-lb__btn {
    position: absolute;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.ybmev-lb__btn:hover,
.ybmev-lb__btn:focus-visible { background: rgba(0, 0, 0, .75); outline: none; }

.ybmev-lb__close { top: 16px; right: 16px; font-size: 20px; }
.ybmev-lb__prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.ybmev-lb__next  { right: 16px; top: 50%; transform: translateY(-50%); }

.ybmev-lb[data-single="1"] .ybmev-lb__prev,
.ybmev-lb[data-single="1"] .ybmev-lb__next { display: none; }

@media (max-width: 600px) {
    .ybmev-lb__btn { width: 38px; height: 38px; font-size: 20px; }
    .ybmev-lb__prev { left: 6px; }
    .ybmev-lb__next { right: 6px; }
}

/* Lock scroll while the lightbox is open */
body.ybmev-lb-open { overflow: hidden; }