/* Subtle refinements that preserve the original iBookMo facility-view design. */
body { color: #164863; font-family: Poppins, sans-serif; background: #f7fbfc; }
.calendar-container { max-width: 1320px; margin-top: 76px; padding: 16px; gap: 14px; border-radius: 12px; background: #f2f6f7; }
.main .calendar-container { display:grid !important; grid-template-columns:215px minmax(0, 1fr) 215px !important; align-items:stretch !important; max-width:1320px; }
.main .trending-list-container,
.main .information-section { width:auto !important; min-width:0; height:100% !important; align-self:stretch !important; box-sizing:border-box; }
.main .calendar-wrapper { min-width:0; height:100% !important; align-self:stretch !important; box-sizing:border-box; }
.main .trending-list-container,
.main .calendar-wrapper,
.main .information-section { transition:min-height .18s ease; }
.trending-list-container { width: 23%; margin: 0; padding: 9px; border: 1px solid #b9e5ef; border-radius: 10px; background: #78cee3; }
.trending-list-container h3,
.information-section h3 { margin: 0 0 8px; padding: 2px 4px; font-size: 17px; letter-spacing: .04em; }
.trending-items { gap: 4px; padding: 0; }
.trending-item { min-height:48px; margin:0; padding:7px 9px; border:1px solid rgba(72,137,207,.08); border-radius:8px; box-shadow:none; }
.trending-item:hover { transform: none; border-color: #8fcedd; border-radius: 8px; }
.trending-item.active { border-color:#e9b77e; background:#f8e1cc; }
.facility-img { width:34px; height:34px; margin-right:10px; border-radius:7px; object-fit:contain; }
.facility-names { margin-left:0; color:#315d74; font-size:13px; line-height:1.3; }
.facility-names.active { color: #164863; }
.calendar-wrapper { margin:0; padding:8px; border:1px solid #b9e5ef; border-radius:10px; background:#78cee3; box-shadow:0 5px 14px rgba(22,72,99,.08); }
.calendar-wrapper .header { display:block; height:auto !important; margin:0; }
.month-container { position: relative; padding: 0; }
#calendarTitle { display:none !important; height:0 !important; margin:0 !important; }
.title-flex-container { position:relative; display:flex; align-items:center; justify-content:flex-start; width:100%; min-height:68px; margin:0 0 7px; padding:7px 170px 7px 8px; gap:10px; border:1px solid rgba(22,72,99,.10); border-radius:9px; background:#d2f6ff; text-align:left; box-sizing:border-box; }
.image-wrapper { display:flex; align-items:center; justify-content:center; width:50px; height:50px; flex:0 0 50px; padding:5px; border:1px solid #bde6ef; border-radius:9px; background:#eef9fb; box-shadow:0 3px 8px rgba(22,72,99,.09); }
.image-wrapper .facility-image { width:100%; height:100%; object-fit:contain; }
.title-text { display:flex; align-items:center; justify-content:flex-start; min-width:0; }
.facility-name { display:flex; align-items:center; justify-content:flex-start; margin:0 !important; color:#164863; font-size:20px; font-weight:700; line-height:1.15; letter-spacing:-.015em; text-align:left; white-space:normal; }
.public-facility-meta { display:flex; align-items:center; gap:6px 16px; margin-top:4px; color:#4d7182; font-size:10px; }
.public-facility-meta span + span { position:relative; }
.public-facility-meta span + span::before { content:'•'; position:absolute; left:-10px; color:#4889cf; }
.public-facility-back { position:absolute; top:50%; right:13px; padding:7px 5px; border:0; background:transparent; color:#4d7182; font-size:11px; font-weight:500; transform:translateY(-50%); }
.public-facility-back:hover { color:#164863; }
.dropdown-arrow { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-left: 6px; border-radius: 8px; color: #164863; font-size: 24px; line-height: 1; transition: background-color .18s ease; }
.dropdown-arrow:hover { background: rgba(210,246,255,.75); }
.facility-dropdown { top: 56px; left: 50%; display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: min(570px, calc(100% - 40px)); max-height: none; margin: 0; padding: 10px; overflow: visible; border: 1px solid #9edbe8; border-radius: 12px; background: #effbfe; box-shadow: 0 18px 42px rgba(22,72,99,.24); transform: translateX(-50%); }
.facility-dropdown[style*="block"] { display: grid !important; }
.facility-dropdown__header { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; gap: 12px; padding: 5px 5px 10px; border-bottom: 1px solid #c7e7ee; }
.facility-dropdown__header strong { color: #164863; font-size: 14px; }
.facility-dropdown__header span { color: #6d8793; font-size: 10px; }
.facility-dropdown .dropdown-item { display: flex; align-items: center; min-width: 0; min-height: 50px; padding: 7px 9px; overflow: hidden; border: 1px solid transparent; border-radius: 9px; color: #315d74; font-size: 12px; line-height: 1.25; white-space: normal; transition: background-color .16s ease, border-color .16s ease; }
.facility-dropdown .dropdown-item img { flex: 0 0 auto; width: 34px !important; height: 34px !important; margin-right: 9px !important; border-radius: 7px; object-fit: contain; }
.facility-dropdown .dropdown-item:hover { border-color: #a8dce8; background: #d2f6ff; color: #164863; }
.facility-dropdown .dropdown-item.active { border-color: #e9b77e; background: #f8e1cc; color: #164863; font-weight: 600; }
.year-navigation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; gap: 10px; margin: 1px 0 7px; padding: 5px 8px; border: 0; border-radius: 8px; background: #d2f6ff; }
.period-nav-item { display: inline-flex; align-items: center; justify-content: center; min-width: 0; height: 30px; margin: 0; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #668492; font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1; text-align: center; }
#calendarMonth.period-nav-item.current { min-width: 154px; padding: 0 18px; background: #f8e1cc; color: #164863 !important; font-size: 14px; font-weight: 700; }
.period-current-group { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.year-jump-btn { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #668492; font-family: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.year-jump-btn:hover { background: #eaf6f9; color: #164863; }
button.period-nav-item:first-child { justify-self: start; }
button.period-nav-item:last-child { justify-self: end; }
button.period-nav-item { cursor: pointer; }
button.period-nav-item:hover { background: #eaf6f9; color: #164863; }
.period-arrow { margin: 0 7px; color: #87a6b4; font-size: 17px; font-weight: 400; }
.month-list-container { margin-bottom: 10px; padding: 4px; border: 0; border-radius: 8px; background: #d2f6ff; }
.month-item { position: relative; height: 30px; border-radius: 6px; background: transparent; color: #315d74; font-size: 11px; font-weight: 600; }
.month-item:hover { background: #eaf6f9; color: #164863; }
.month-item.selected { background: #f8e1cc; color: #164863; }
#dpMonth { width:100%; overflow:hidden; border:1px solid #d0e3e8; border-radius:8px; background:#fff; }
.month_default_cell_inner { border-color: #e4ecef !important; }
.month_default_cell_inner { transition:background-color .15s ease; }
.month_default_cell_inner:hover { background:#f3fbfd !important; }
.month_default_cell_header_inner { padding:6px 7px !important; color:#164863; font-weight:600; }
.month_default_header_inner { border-color: #dbe7ea !important; }
.outside-month-cell { background: #fafcfc !important; }
.outside-month-cell .month_default_cell_header { color: #aab7bd !important; }
.month_default_event_inner { left:3px !important; right:3px !important; padding:3px 4px !important; border-radius:3px !important; }
#buttonHome { margin-top: 9px; padding: 8px 13px; border-radius: 7px; }
.information-section { width: 21%; margin: 0; padding: 9px; border: 1px solid #b9e5ef; border-radius: 10px; background: #78cee3; }
.accordion-item { margin-bottom: 7px; border-radius: 8px; }
.accordion-button { min-height: 42px; height: auto; padding: 8px 11px; border: 1px solid rgba(72,137,207,.1); border-radius: 8px; color: #164863; font-size: 13px; text-align: left; }
.accordion-button:not(.collapsed) { background: #f8e1cc; color: #164863; }
.accordion-body { max-width: none; padding: 12px; color: #315d74; font-size: 12px; line-height: 1.55; }
.content-wrapper { width: 100%; }

/* Public facility image carousel */
.facility-gallery { width:calc(100% - 32px) !important; max-width:1320px !important; margin:10px auto 24px; padding:8px; border:1px solid #b9e5ef; border-radius:10px; background:#78cee3; box-shadow:0 4px 12px rgba(22,72,99,.07); box-sizing:border-box; }
.facility-gallery__heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:8px; color:#164863; }
.facility-gallery__heading span { display:block; margin-bottom:2px; color:#356f9f; font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.facility-gallery__heading h2 { margin:0; color:#164863; font-size:16px; font-weight:700; }
.facility-gallery__heading strong { padding:5px 9px; border-radius:999px; background:#d2f6ff; color:#315d74; font-size:11px; font-weight:600; white-space:nowrap; }
.facility-carousel { overflow:hidden; border:1px solid rgba(22,72,99,.12); border-radius:11px; background:#eff7f9; }
.facility-carousel .carousel-item { padding:8px; background:#eff7f9; }
.facility-carousel-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; min-height:145px; }
.facility-photo-card { position:relative; min-width:0; height:145px; margin:0; overflow:hidden; border:1px solid #d6e5e9; border-radius:7px; background:#fff; }
.facility-photo-card img { width:100%; height:100%; object-fit:cover; }
.facility-photo-card figcaption { position:absolute; right:9px; bottom:9px; margin:0; padding:4px 8px; border-radius:999px; background:rgba(22,72,99,.76); color:#fff; font-size:10px; font-weight:600; }
.facility-carousel .carousel-control-prev,
.facility-carousel .carousel-control-next { top:50%; width:44px; height:44px; margin:0 14px; border:0; border-radius:50%; background:rgba(22,72,99,.72); transform:translateY(-50%); opacity:1; }
.facility-carousel .carousel-control-next { left:auto; }
.facility-carousel .carousel-indicators { margin-bottom:12px; }
.facility-carousel .carousel-indicators button { width:8px; height:8px; border:0; border-radius:50%; background-color:#fff; opacity:.65; }
.facility-carousel .carousel-indicators button.active { opacity:1; }

.facility-photo-slider { position:relative; width:100%; padding:0; overflow:hidden; border-radius:7px; background:#eff7f9; }
.facility-photo-page { display:none; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:7px; padding:7px; }
.facility-photo-page.active { display:grid; }
.facility-photo-page .facility-photo-card { width:100%; height:140px; margin:0; overflow:hidden; border:1px solid #d6e5e9; border-radius:6px; background:#fff; box-sizing:border-box; }
.facility-photo-page .facility-photo-card img { display:block; width:100%; height:100%; object-fit:cover; }
.facility-photo-control { position:absolute; z-index:2; top:50%; width:34px; height:34px; padding:0; border:0; border-radius:50%; background:rgba(22,72,99,.72); color:#fff; font-size:23px; line-height:1; transform:translateY(-50%); }
.facility-photo-control.previous { left:12px; }
.facility-photo-control.next { right:12px; }
.facility-photo-dots { position:absolute; z-index:2; right:0; bottom:7px; left:0; display:flex; justify-content:center; gap:6px; }
.facility-photo-dots button { width:7px; height:7px; padding:0; border:0; border-radius:50%; background:#164863; opacity:.35; }
.facility-photo-dots button.active { opacity:1; }

/* Event details dialog */
.swal2-popup.ibook-event-popup { width: min(440px, calc(100vw - 28px)); padding: 0; overflow: hidden; border: 1px solid #a9dce7; border-radius: 16px; background: #fff; box-shadow: 0 24px 65px rgba(22,72,99,.28); }
.ibook-event-popup .swal2-title { margin: 0; padding: 22px 24px 17px; background: #78cee3; color: #164863; font-family: Poppins, sans-serif; font-size: 21px; font-weight: 700; line-height: 1.3; text-align: left; }
.ibook-event-popup .swal2-html-container { margin: 0; padding: 20px 24px 8px; color: #315d74; text-align: left; }
.event-detail-kicker { display: inline-block; margin-bottom: 8px; color: #4889cf; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.event-detail-grid { display: grid; gap: 9px; }
.event-detail-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e1eef2; }
.event-detail-row:last-child { border-bottom: 0; }
.event-detail-label { color: #6b8794; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.event-detail-value { color: #164863; font-size: 13px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.ibook-event-popup .swal2-actions { width: 100%; margin: 8px 0 0; padding: 14px 24px 20px; }
.ibook-event-popup .swal2-confirm { width: 100%; margin: 0; padding: 10px 18px; border: 0; border-radius: 9px; background: #4889cf !important; box-shadow: none !important; color: #fff; font-family: Poppins, sans-serif; font-size: 13px; font-weight: 600; }
.ibook-event-popup .swal2-confirm:hover { background: #356fae !important; }
.ibook-event-popup .swal2-close { color: #164863; }

@media (max-width: 767px) {
    .calendar-container { margin-top: 70px; padding: 10px; gap: 12px; }
    .calendar-wrapper { padding: 10px; }
    .title-flex-container { margin-left: 0; }
    .facility-name { font-size: 18px; }
    .title-flex-container { align-items:flex-start; flex-wrap:wrap; padding:10px; }
    .public-facility-back { position:static; width:100%; padding:4px 0 0 66px; text-align:left; transform:none; }
    .public-facility-meta { align-items:flex-start; flex-direction:column; gap:2px; }
    .public-facility-meta span + span::before { display:none; }
    .facility-dropdown { top: 56px; left: 50%; grid-template-columns: 1fr; width: 100%; max-height: 360px; overflow-y: auto; }
    .facility-dropdown__header { align-items: flex-start; flex-direction: column; gap: 2px; }
    .information-section { margin-top: 0; padding: 9px; }
    .main .trending-list-container,
    .main .calendar-wrapper,
    .main .information-section { height:auto !important; }
    .facility-gallery { width:calc(100% - 20px) !important; margin-top:12px; padding:9px; }
    .facility-gallery__heading { align-items:flex-start; }
    .facility-gallery__heading h2 { font-size:17px; }
    .facility-carousel-grid { grid-template-columns:1fr; min-height:0; }
    .facility-photo-card { height:160px; }
    .facility-photo-page { grid-template-columns:1fr; }
    .facility-photo-page .facility-photo-card { height:150px; }
}

/* Stack the public calendar before desktop sidebars squeeze its seven days. */
@media (max-width: 1100px) {
    .main .calendar-container { grid-template-columns:minmax(0, 1fr) !important; }
    .main .trending-list-container { display:none; }
    .main .calendar-wrapper,
    .main .information-section { min-height:0 !important; height:auto !important; width:100% !important; }
    .main .information-section { margin:0; }
}
@media (max-width: 767px) {
    .main { padding:0; }
    .main .calendar-container { padding:8px; margin-top:76px; }
    .main .calendar-wrapper { padding:8px; }
    .title-flex-container .title-text { flex:1; }
    .public-facility-meta { overflow-wrap:anywhere; }
    .year-navigation { grid-template-columns:44px minmax(0, 1fr) 44px; gap:2px; padding:4px; }
    #previousMonthLabel, #nextMonthLabel { display:none; }
    .year-navigation .period-nav-item { padding:0; height:44px; }
    .year-navigation .period-arrow { margin:0; font-size:24px; }
    .period-current-group { min-width:0; gap:0; }
    #calendarMonth.period-nav-item.current { min-width:0; padding:0 5px; font-size:12px; flex:1; white-space:nowrap; }
    .year-jump-btn { flex:0 0 28px; height:44px; }
    .month-list-container { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:2px; }
    .month-item { width:100%; height:40px; font-size:11px; }
    #dpMonth .month_default_header_inner { font-size:10px; overflow:hidden; }
    #dpMonth .month_default_cell_header { padding:2px; font-size:10px; overflow:hidden; white-space:nowrap; }
    .facility-dropdown { z-index:1050; max-height:60vh; }
    .facility-gallery { margin-bottom:60px; }
    .information-section .accordion-body { overflow-wrap:anywhere; }
}
