@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Base styles for the hidden invoice email field */
.invoice-email-field {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.invoice-email-field.visible {
  opacity: 1;
  transform: translateY(0);
}

.invoice-section {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.invoice-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* The Modal (background) */
.modal-product {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0px;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Modal Content */
.modal-content-product {
  background-color: #f1f2ed;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #888;
  width: 70%;
  overflow: auto;
  max-height: 700px;
  max-width: 100%;
  margin: 8% auto;
}

/* Close button */
.closes {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.closes:hover,
.closes:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.date-range-selected a {
  background-color: rgba(46, 111, 64, 0.18) !important;
  color: #1a1a1a !important;
}

body.modal-open {
  overflow: hidden;
}

/* Modal Container */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

/* Modal Content */
.modal-content {
  background-color: white;
  margin: auto;
  padding: 20px;
  border-radius: 8px;
  width: 50%;
  max-width: 600px;
  position: relative;
}

/* Close button */
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 25px;
  cursor: pointer;
}

/* Modal Buttons */
.modal-actions {
  margin-top: 15px;
  gap: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-actions button#accept-terms {
  background-color: #2E6F40;
  color: white;
  border: 1px solid #2E6F40;
  border-radius: 5px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

.modal-actions button#accept-terms:hover {
  background-color: #245534;
  color: white;
  border: 1px solid #245534;
}

.modal-actions button#accept-terms:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ui-datepicker-calendar {
  table-layout: fixed;
  width: 200px;
}

.cbp-booking-form label {
  font-weight: 400;
}

.ui-datepicker-inline {
  border: 0 !important;
  padding: 0px;
}

#ui-datepicker-div {
  z-index: 10;
}

.booking-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.booking-form-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 60%;
  box-shadow: 0px 0px 2px 2px #ddd;
  padding: 20px;
  height: 100%;
  position: sticky;
  top: 120px;
}

.ui-datepicker-row-break {
  display: none;
}

.cbp-booking-form {
  border: 0;
  padding: 0px;
  margin-top: 0px;
}

.ui-datepicker-prev.ui-corner-all,
.ui-datepicker-next.ui-corner-all {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}

.ui-datepicker-calendar th {
  font-weight: 600;
  color: #888;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media only screen and (max-width: 767px) {
  .booking-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .cbp-booking-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .booking-form-container {
    width: 100%;
  }

  #cbp-view-calendar .ui-datepicker-inline {
    width: 100% !important;
    display: block !important;
  }

  #cbp-view-calendar .ui-datepicker-title {
    font-size: 0.8em !important;
    padding: 10px 0;
  }

  .modal-content {
    width: 100%;
    margin: 0 10px;
  }

  .modal-product {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 80px;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
  }

  .modal-content-product {
    background-color: #f1f2ed;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    overflow: auto;
    max-height: 700px;
    max-width: 100%;
    margin: 5% auto;
  }

  .terms-container {
    height: 400px !important;
  }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .booking-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .cbp-booking-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .booking-form-container {
    width: 100%;
  }

  .modal-product {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 80px;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
  }

  .modal-content-product {
    background-color: #f1f2ed;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    overflow: auto;
    max-height: 700px;
    max-width: 100%;
    margin: 5% auto;
  }
}

.booked .ui-state-default {
  background: #fef1f4;
  border-color: #fef1f4;
  color: red;
}

#cbp-booking-form select {
  border: 1px solid #545456;
  background-color: transparent;
  border-radius: 0;
}

#cbp-booking-form input {
  background-color: transparent;
  border-bottom: 1px solid #545456;
  border-radius: 0;
}

#cbp-view-calendar {
  font-size: 18px;
  margin: 0 auto;
  width: 100%;
}

#cbp-view-calendar .ui-datepicker td {
  aspect-ratio: 1 / 1;
  padding: 4px;
}

#cbp-view-calendar .ui-datepicker td a {
  aspect-ratio: 1 / 1;
  padding: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  border-radius: 6px;
  color: #1a1a1a;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#cbp-view-calendar .ui-datepicker td a:hover {
  background-color: #2E6F40;
  color: white;
}

.ui-state-active {
  color: white;
}

.booked .ui-state-default {
  color: black !important;
  background-image: linear-gradient(
    45deg,
    #ddd 25%,
    transparent 25%,
    transparent 50%,
    #ddd 50%,
    #ddd 75%,
    transparent 75%,
    transparent
  );
  background-size: 10px 10px;
}

.ui-state-default {
  color: #1a1a1a;
  aspect-ratio: 1 / 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
}

.ui-state-disabled .ui-state-default {
  color: #bbb;
}

.ui-state-active {
  border: 1px solid #2E6F40 !important;
  background-color: #2E6F40 !important;
  color: white !important;
  border-radius: 6px;
}

#cbp-view-calendar .ui-datepicker-header {
  font-size: 20px;
  background-color: transparent !important;
  border-radius: 0px;
  border: 0 !important;
  padding: 0px 0px 12px !important;
  border-bottom: 1px solid #e8e8e8 !important;
  margin-bottom: 8px;
}

#cbp-view-calendar .ui-datepicker-prev,
#cbp-view-calendar .ui-datepicker-next {
  font-size: 1.5em;
  border: 1px solid #e0e0e0 !important;
  border-radius: 6px !important;
  background: #f5f5f5;
  cursor: pointer;
  transition: background 0.2s ease;
}

#cbp-view-calendar .ui-datepicker-prev:hover,
#cbp-view-calendar .ui-datepicker-next:hover {
  background: #2E6F40 !important;
  border-color: #2E6F40 !important;
}

#cbp-view-calendar .ui-datepicker-prev:hover span,
#cbp-view-calendar .ui-datepicker-next:hover span {
  border-color: white;
}

#cbp-view-calendar .ui-datepicker-title {
  font-size: 1.3em;
  font-weight: 600;
  padding: 10px 0;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.02em;
  color: #1a1a1a;
}

#cbp-view-calendar .ui-datepicker th {
  font-size: 13px;
  padding: 10px;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#cbp-view-calendar .ui-datepicker-inline {
  width: 100% !important;
  gap: 20px;
  background-color: transparent !important;
}
