/**
 * BCC Booking Calendar Styles
 * Version: 2.0.0
 */

/* ===========================
   Base & Reset
=========================== */
.bcc-cal-root {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.bcc-cal-root * {
  box-sizing: border-box;
}

/* ===========================
   Layout
=========================== */
.bcc-elegant {
  max-width: 700px;
  text-align: center;
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 5px;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  display: flex;
}

@media (max-width: 768px) {
  .bcc-elegant {
    flex-direction: column;
  }
}

/* ===========================
   Header Section
=========================== */
.bcc-wrap-header {
  position: relative;
  width: 35%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  align-content: center;
}

.bcc-wrap-header::after {
  position: absolute;
  inset: 0;
  content: "";
  background: #000;
  opacity: 0.5;
  z-index: -1;
}

@media (max-width: 768px) {
  .bcc-wrap-header {
    width: 100%;
    padding: 20px 0;
  }
}

/* Reset Button */
.bcc-reset {
  display: block;
  position: absolute;
  right: 0.5em;
  top: 0.5em;
  z-index: 9;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0 0.5em;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  transition: 0.3s;
  text-transform: uppercase;
  font-size: 11px;
  user-select: none;
}

.bcc-reset:hover {
  color: #fff;
  border-color: #fff;
}

/* Header Info */
.bcc-header {
  width: 100%;
  position: relative;
  padding: 0 10px;
}

.bcc-head-day {
  font-size: 90px;
  line-height: 1;
  color: #fff;
}

.bcc-head-month {
  font-size: 16px;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

.bcc-head-range {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  margin-top: 10px;
}

/* ===========================
   Calendar Section
=========================== */
.bcc-calendar-wrap {
  width: 65%;
  background: #fff;
  padding: 40px 20px 20px;
}

@media (max-width: 768px) {
  .bcc-calendar-wrap {
    width: 100%;
  }
}

/* Month Navigation */
.bcc-button-wrap {
  position: relative;
  padding: 10px 0;
}

.bcc-prev,
.bcc-next {
  cursor: pointer;
  width: 0;
  height: 0;
  line-height: 1.6em;
  border-radius: 50%;
  position: absolute;
  top: 0;
  font-size: 40px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: color 0.3s;
}

.bcc-prev {
  left: 20px;
}

.bcc-next {
  right: 20px;
}

.bcc-prev:hover,
.bcc-next:hover {
  color: #111;
}

/* Calendar Table */
.bcc-calendar {
  width: 100%;
  border-collapse: collapse;
}

.bcc-calendar thead tr {
  color: #000;
  font-weight: 700;
}

.bcc-calendar th {
  padding: 6px 0;
  font-size: 12px;
}

.bcc-calendar td {
  width: 14%;
  height: 3em;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
  position: relative;
  z-index: 0;
}

.bcc-calendar td::after {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  content: "";
  width: 44px;
  height: 44px;
  margin: 0 auto;
  transform: translateY(-50%);
  border-radius: 50%;
  transition: 0.3s;
  z-index: -1;
}

.bcc-calendar td:hover {
  color: #fff;
}

.bcc-calendar td:hover::after {
  background: #99805f;
}

/* Calendar Cell States */
.bcc-empty {
  cursor: default;
}

.bcc-empty:hover {
  color: inherit;
}

.bcc-empty:hover::after {
  background: transparent;
}

.bcc-today {
  color: #fff;
}

.bcc-today::after {
  background: #99805f;
}

.bcc-booked {
  cursor: not-allowed;
  color: #c9c9c9;
}

.bcc-booked:hover {
  color: #c9c9c9;
}

.bcc-booked:hover::after {
  background: transparent;
}

.bcc-booked::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 1px;
  background: #c9c9c9;
  transform: translate(-50%, -50%) rotate(-18deg);
  opacity: 0.9;
}

.bcc-disabled {
  cursor: not-allowed;
  color: #c9c9c9;
}

.bcc-disabled:hover {
  color: #c9c9c9;
}

.bcc-disabled:hover::after {
  background: transparent;
}

.bcc-start,
.bcc-end {
  color: #fff;
}

.bcc-start::after,
.bcc-end::after {
  background: #99805f;
}

.bcc-inrange {
  color: #111;
}

.bcc-inrange::after {
  background: rgba(42, 50, 70, 0.18);
}

/* ===========================
   Actions Section
=========================== */
.bcc-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.bcc-selected {
  font-size: 13px;
  color: #333;
}

.bcc-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  background: #99805f;
  color: #fff;
  transition: 0.3s;
}

.bcc-btn:hover {
  background: #182e6f;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.2);
}

.bcc-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.2);
}

.bcc-btn:focus {
  outline: 2px solid #182e6f;
  outline-offset: 3px;
}

.bcc-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.bcc-msg {
  font-size: 12px;
  color: #b00020;
  min-height: 16px;
}

/* ===========================
   Modal
=========================== */
.bcc-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bcc-modal.is-open {
  display: block;
  animation: modalFadeIn 0.3s ease forwards;
}

.bcc-modal.is-closing {
  animation: modalFadeOut 0.25s ease forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes dialogSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dialogSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
  }
}

.bcc-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.bcc-modal__dialog {
  position: relative;
  width: min(760px, calc(100% - 24px));
  max-height: calc(100vh - 80px);
  margin: 40px auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: dialogSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.bcc-modal.is-closing .bcc-modal__dialog {
  animation: dialogSlideOut 0.25s ease forwards;
}

.bcc-modal__body {
  padding: 50px 30px 30px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  max-height: calc(100vh - 160px);
}

@media (max-width: 768px) {
  .bcc-modal__dialog {
    max-height: 95vh;
    margin: 2.5vh auto;
    border-radius: 12px;
  }
  
  .bcc-modal__body {
    padding: 55px 15px 40px;
    max-height: calc(95vh - 60px);
  }
}

/* Minimal Gold X - No Border, No Background */
.bcc-modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: transparent !important;
  cursor: pointer;
  font-size: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gold X symbol using pseudo-elements */
.bcc-modal__close::before,
.bcc-modal__close::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 3px;
  background: #99805f;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.bcc-modal__close::before {
  transform: rotate(45deg);
}

.bcc-modal__close::after {
  transform: rotate(-45deg);
}

.bcc-modal__close:hover {
  background: transparent !important;
  transform: rotate(90deg) scale(1.15);
}

.bcc-modal__close:hover::before,
.bcc-modal__close:hover::after {
  background: #6d5942;
  width: 22px;
}

.bcc-modal__close:active {
  transform: rotate(90deg) scale(1.0);
}

/* Focus state for accessibility */
.bcc-modal__close:focus {
  outline: none;
  background: rgba(153, 128, 95, 0.1);
  border-radius: 50%;
}

/* SUPER STRONG - Lock everything */
html.bcc-modal-open,
body.bcc-modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  touch-action: none !important;
  -webkit-overflow-scrolling: none !important;
  overscroll-behavior: none !important;
}

/* Extra iOS Safari lock */
@supports (-webkit-touch-callout: none) {
  html.bcc-modal-open,
  body.bcc-modal-open {
    position: fixed !important;
    overflow: hidden !important;
    width: 100% !important;
    height: 100% !important;
  }
}
