/* ICESCO Venues Calendar */
.icesco-venues-page {
  --teal: var(--icesco-venues-teal, #00968b);
  --teal-dark: var(--icesco-venues-teal-dark, #007a70);
  --teal-xlight: var(--icesco-venues-teal-xlight, #f0faf9);
  --teal-light: var(--icesco-venues-teal-light, #d4f0ed);
  --teal-mid: rgba(0, 150, 139, 0.1);
  --navy: var(--icesco-venues-navy, #062f42);
  --navy-mid: #0d3d55;
  --gold: var(--icesco-venues-gold, #c59d46);
  --gold-light: var(--icesco-venues-gold-light, #fdf5e4);
  --gold-border: var(--icesco-venues-gold-border, #e8d5a0);
  --muted: var(--icesco-venues-muted, #7a8694);
  --border: var(--icesco-venues-border, #e3e8ec);
  --border-soft: #eef1f4;
  --bg: var(--icesco-venues-bg, #f4f7f9);
  --card: var(--icesco-venues-card, #ffffff);
  --booked-bg: var(--icesco-venues-booked, #fdecea);
  --booked-text: var(--icesco-venues-booked-text, #a93226);

  font-family: "BwGradual", Sans-serif;
  color: var(--navy);
  max-width: var(--icesco-venues-max-width, 1300px);
  margin: 0 auto;
}

.icesco-venues-page * {
  box-sizing: border-box;
}

.icesco-venues-page [hidden] {
  display: none !important;
}

.icesco-venues-page--booting [data-role="main"],
.icesco-venues-page--booting [data-role="note-line"],
.icesco-venues-page--booting [data-role="gallery"] {
  display: none !important;
}

.icesco-venues-page--booting [data-role="loading"] {
  display: flex;
}

.icesco-venues-page--editor [data-role="loading"] {
  display: none !important;
}

.venues-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 0;
  gap: 16px;
  color: var(--muted);
  font-size: 15px;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 2.5px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: icesco-venues-spin 0.7s linear infinite;
}

@keyframes icesco-venues-spin {
  to {
    transform: rotate(360deg);
  }
}

.icesco-venues__error {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: #c0392b;
  text-align: center;
}

.intro-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 28px;
}

.intro-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border: 1.5px solid var(--gold-border);
  color: var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.intro-box p {
  margin: 0 0 6px;
  color: #334e5e;
  font-size: 15px;
  line-height: 1.7;
}

.intro-box p:last-child {
  margin: 0;
}

.venue-main {
  display: grid;
  grid-template-columns: 1fr var(--icesco-venues-sidebar-width, 300px);
  gap: 20px;
  align-items: start;
  margin-bottom: 10px;
}

.venue-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.venue-top {
  display: grid;
  grid-template-columns: var(--icesco-venues-image-width, 380px) 1fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.venue-image-wrap {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.venue-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.venue-image-wrap:hover img {
  transform: scale(1.04);
}

.venue-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 70%, rgba(255, 255, 255, 0.15));
  pointer-events: none;
}

.venue-info {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.venue-category-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  background: var(--gold-light);
  color: #8a6a1a;
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.venue-category-badge:empty {
  display: none;
}

.venue-info h2 {
  font-size: 26px;
  line-height: 1.25;
  margin: 0;
  font-weight: 700;
  color: var(--navy);
}

.venue-desc {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.venue-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.venue-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-xlight);
  color: var(--teal-dark);
  border: 1px solid var(--teal-light);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
}

.event-numbers-section {
  display: block;
}

.event-numbers-section[hidden] {
  display: none !important;
}

.event-numbers-heading {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.event-numbers-heading[hidden] {
  display: none !important;
}

.event-numbers {
  display: grid;
  gap: var(--icesco-venues-event-numbers-gap, 12px);
}

.event-numbers--fixed {
  grid-template-columns: repeat(var(--icesco-venues-event-numbers-columns, 3), minmax(0, 1fr));
}

.event-numbers--auto {
  grid-template-columns: repeat(auto-fit, minmax(var(--icesco-venues-event-numbers-min-width, 150px), 1fr));
}

.event-number-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 10px;
  padding: 16px 18px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.event-number-value {
  color: var(--teal-dark);
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.event-number-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.calendar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--teal-xlight);
}

.calendar-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
}

.calendar-header-left h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-nav .icesco-venues-arrow-btn,
.calendar-nav button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transition: all 0.18s;
  line-height: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.icesco-venues-arrow-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.icesco-venues-arrow-btn__icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.calendar-nav .icesco-venues-arrow-btn__icon svg {
  width: 14px;
  height: 14px;
}

.calendar-nav .icesco-venues-arrow-btn:hover,
.calendar-nav button:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.calendar-nav strong {
  font-size: 14px;
  font-weight: 700;
  min-width: 110px;
  text-align: center;
  color: var(--navy);
  padding: 0 4px;
}

.calendar-body {
  padding: 16px 20px 20px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}

.calendar-weekdays span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-align: center;
  padding: 6px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  border-radius: 6px;
  transition: transform 0.12s;
  color: var(--navy);
}

.cal-day.free {
  background: transparent;
  color: var(--navy);
}

.cal-day.free:hover {
  background: var(--teal-xlight);
  color: var(--teal-dark);
}

.cal-day.booked,
.cal-day.booked-range,
.cal-day.booked-start,
.cal-day.booked-end,
.cal-day.booked-single {
  background: var(--booked-bg);
  color: var(--booked-text);
  font-weight: 600;
}

.cal-day.booked-range {
  border-radius: 0;
}

.cal-day.booked-start {
  border-radius: 6px 0 0 6px;
}

.cal-day.booked-end {
  border-radius: 0 6px 6px 0;
}

.cal-day.booked-single {
  border-radius: 6px;
}

.cal-day.today {
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 0 0 2px var(--teal-light);
}

.cal-day.empty {
  background: transparent;
  pointer-events: none;
}

.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.leg-booked {
  background: #e74c3c;
}

.leg-today {
  background: var(--teal);
}

.leg-free {
  background: #bdc3c7;
}

.icesco-venues-enquire {
  display: flex;
  flex-shrink: 0;
}

.icesco-venues-enquire .icesco-waitlist-button-wrap {
  display: flex;
}

.calendar-footer .icesco-venues-enquire {
  margin-left: auto;
}

.venue-tabs-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  position: sticky;
  top: 24px;
}

.tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--teal-xlight);
}

.tabs-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.venue-count-badge {
  background: var(--teal);
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

.venue-tabs-list {
  display: flex;
  flex-direction: column;
  max-height: 540px;
  overflow-y: auto;
  padding: 8px;
  gap: 4px;
}

.venue-tabs-list::-webkit-scrollbar {
  width: 3px;
}

.venue-tabs-list::-webkit-scrollbar-thumb {
  background: var(--teal-light);
  border-radius: 3px;
}

.venue-tab {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 44px 1fr var(--icesco-venues-tab-arrow-width, 20px);
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s;
}

.venue-tab:hover {
  background: var(--teal-xlight);
  border-color: var(--teal-light);
}

.venue-tab.active {
  background: var(--navy);
  border-color: var(--navy);
}

.tab-thumb {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.tab-thumb-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--teal-xlight);
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 20px;
  flex-shrink: 0;
}

.tab-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tab-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  word-break: break-word;
  white-space: normal;
}

.venue-tab.active .tab-name {
  color: #fff;
}

.tab-date {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.venue-tab.active .tab-date {
  color: rgba(255, 255, 255, 0.6);
}

.tab-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--icesco-venues-tab-arrow-width, 20px);
  height: var(--icesco-venues-tab-arrow-width, 20px);
  flex-shrink: 0;
  justify-self: center;
  align-self: center;
  color: var(--muted);
  transition: transform 0.18s, color 0.18s;
}

.tab-arrow svg {
  display: block;
  width: var(--icesco-venues-tab-arrow-size, 14px);
  height: var(--icesco-venues-tab-arrow-size, 14px);
  fill: currentColor;
}

.venue-tab.active .tab-arrow {
  color: var(--gold);
  transform: translateX(2px);
}

.note-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 22px;
  color: var(--muted);
  font-size: 13.5px;
}

.note-line svg {
  color: var(--teal);
  flex-shrink: 0;
}

.venue-gallery {
  padding-bottom: 10px;
}

.gallery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.gallery-heading h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--navy);
}

.gallery-controls {
  display: flex;
  gap: 8px;
}

.gallery-arrow {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transition: all 0.18s;
  line-height: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.gallery-arrow:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.gallery-arrow .icesco-venues-arrow-btn__icon svg {
  width: 18px;
  height: 18px;
}

.gallery-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
}

.gallery-track::-webkit-scrollbar {
  height: 3px;
}

.gallery-track::-webkit-scrollbar-thumb {
  background: var(--teal-light);
  border-radius: 3px;
}

.gallery-card {
  min-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  transition: transform 0.22s;
}

.gallery-card:hover {
  transform: translateY(-3px);
}

.venue-gallery--lightbox .gallery-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}

.venue-gallery--lightbox .gallery-card-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.gallery-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.gallery-card-label {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.venue-fade {
  animation: icesco-venues-fade 0.3s ease;
}

@keyframes icesco-venues-fade {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .icesco-venues-page {
    padding: 24px 20px 48px;
  }

  .venue-main {
    grid-template-columns: 1fr;
  }

  .venue-tabs-panel {
    position: static;
  }

  .venue-tabs-list {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
  }

  .venue-tab {
    width: calc(50% - 2px);
  }
}

@media (max-width: 767px) {
  .icesco-venues-page {
    padding: 18px 14px 40px;
  }

  .intro-box {
    flex-direction: column;
  }

  .intro-icon {
    display: none;
  }

  .venue-top {
    grid-template-columns: 1fr;
  }

  .venue-image-wrap {
    height: 220px;
  }

  .venue-tab {
    width: 100%;
  }

  .calendar-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
