﻿html.stellar-calendar-modal-open,
body.stellar-calendar-modal-open {
  overflow: hidden;
}

.stellar-numbered-slider-section__calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(12px, 2vw, 36px);

  @media (max-width: 768px) {
    align-items: flex-end;
  }
}

.stellar-numbered-slider-section__calendar-modal[hidden] {
  display: none;
}

.stellar-numbered-slider-section__calendar-dialog {
  position: relative;
  max-width: 1320px;
  width: 100%;
  max-height: 100%;
  border-radius: 55px !important;
  overflow-y: auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 17, 17, 0.35) transparent;
  overscroll-behavior: contain;

  @media (max-width: 768px) {
    border-radius: 34px !important;
    position: unset;
    max-height: 95%;
  }
}

.stellar-numbered-slider-section__calendar-dialog::-webkit-scrollbar {
  width: 8px;
}

.stellar-numbered-slider-section__calendar-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.stellar-numbered-slider-section__calendar-dialog::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.45), rgba(17, 17, 17, 0.25));
}

.stellar-numbered-slider-section__calendar-dialog::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.55), rgba(17, 17, 17, 0.35));
}

.stellar-numbered-slider-section__calendar-close {
  position: absolute;
  background-color: #ffffff !important;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  top: 5px;
  right: 30px;
  background: none;
  border: 0;
  color: #222;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 999;

  @media (max-width: 768px) {
    top: 10px;
    left: 10px;
  }
}

.stellar-numbered-slider-section__calendar-close:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.stellar-numbered-slider-section__calendar-heading {
  display: none;
}

.stellar-numbered-slider-section__calendar-content {
  overflow: visible;

  /* Variables */
  --stellar-calendar-accent: var(--stellar-panel-bg, #00B9F2);
  --stellar-calendar-surface: #fdfefe;
  --stellar-calendar-card: rgba(255, 255, 255, 0.94);
  --stellar-calendar-border: rgba(14, 23, 38, 0.1);
  --stellar-calendar-muted: rgba(14, 23, 38, 0.65);
  --stellar-calendar-ink: #0f1a2c;
  --stellar-calendar-shadow: 0 35px 80px rgba(15, 23, 42, 0.18);
  --stellar-calendar-bg-dark: #303030;

  @media (max-width: 765px) {
    padding: 0;
    background: transparent;
  }

  >* {
    width: 100%;
  }

  /* Shared Resets & Layouts */
  .booking_calendar_container,
  .wpdevart-booking-form-container,
  .wpdevart-check-section,
  .wpdevart-form-section {
    width: 100%;
    max-width: none;
  }

  .wpdevart-check-section,
  .wpdevart-form-section {
    margin: 0;
    float: none;
  }

  .wpdevart-form-section {
    * {
      margin: 0px !important
    }

    .wpdevart-fild-item-container {
      margin: 20px 0px !important;

      a {
        font-style: normal !important;
        text-decoration: underline;
        font-size: 13px !important;
      }
    }

    .wpdevart-fild-item-container:nth-child(8) {
      display: flex;
      flex-direction: row-reverse;
      justify-content: start;
    }
  }

  /* Main Containers */
  .booking_calendar_main_container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
    border: none;
    background-color: #ffffff;
    border-radius: 34px;

    @media (max-width: 768px) {
      border-radius: 0px;
    }
  }

  .booking_calendar_container {
    border-radius: 55px 55px 0 0;
    border-bottom: none;
    padding-bottom: clamp(24px, 3vw, 40px);
  }

  .wpdevart-booking-form-container {
    display: flex;
    padding: 20px;
    margin: 0 auto;
    border-radius: 24px;
    justify-content: center;
    position: relative;
    isolation: isolate;
    border: none;
    box-shadow: none;
    color: var(--stellar-calendar-ink);
  }

  .wpdevart-booking-form-container::after {
    content: none;
  }

  /* Calendar Head */
  .wpda-booking-calendar-head {
    padding: clamp(8px, 1.1vw, 17px) clamp(22px, 3vw, 40px);
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #0d1a2b, #182b44);
    border: none;
    margin: 0;

    * {
      white-space: nowrap;
    }
  }

  .wpda-previous,
  .wpda-next {
    padding-inline: 80px;

    @media (max-width: 768px) {
      padding-inline: 20px;
    }
  }

  .wpda-previous * {
    justify-content: flex-start;
  }

  .wpda-next * {
    justify-content: flex-end;
  }

  /* Calendar Grid */
  .wpdevart-calendar-container {
    padding: 0 0 clamp(24px, 3vw, 40px);
    background: #fff;
    border: none;

    >div {
      border-color: rgba(14, 23, 38, 0.2);

      &:nth-child(7n) {
        border-right: none;
      }

      &:nth-child(7n+1) {
        border-left: none;
      }

      &.week-day-name {
        border: none;
      }

      .wpda-day-header {
        padding: 12px 6px;
        font-weight: 600;
      }

      .wpda-day-number {
        font-size: 15px;
      }

      &:not(.week-day-name) {
        display: flex;
        flex-direction: column;
        min-height: 120px;

        .wpda-day-header {
          flex: 0 0 30%;
          display: flex;
          align-items: center;
          white-space: nowrap;
          overflow: hidden;
          padding: 8px 10px;

          @media (max-width: 768px) {
            font-size: 10px;
          }
        }

        @media (max-width: 768px) {
          min-height: 60px;
          height: 70px !important;
        }
      }
    }
  }

  /* Check Section */
  .wpdevart-check-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    border: none;
    border-radius: 20px;
    padding: clamp(12px, 1.8vw, 20px);
    background: rgba(255, 255, 255, 0.9);

    @media (max-width: 1024px) {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* Reservation Items */
  .res-item-container {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(220px, 1fr);
    gap: 6px 32px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(14, 23, 38, 0.08);

    &:last-child {
      border-bottom: 0;
    }

    .section-title,
    .res-item-value {
      float: none;
      width: 100%;
    }

    @media (max-width: 1024px) {
      grid-template-columns: 1fr;
    }
  }

  /* Booking Form */
  .wpdevart-booking-form {
    position: relative;
    margin: 0px !important;
    z-index: 1;
    background: #fff;
    border: none;
    border-radius: 44px;
    padding: 0;
    box-shadow: 0 30px 65px rgba(15, 23, 42, 0.12);
    width: 100%;

    @media (max-width: 768px) {
      border-radius: 21px;
    }

    form {
      display: grid;
      grid-template-columns: 1fr;
      gap: clamp(20px, 2vw, 32px);
      align-items: start;
      font-family: 'Poppins', sans-serif;
      width: min(100%, 960px);
      margin-inline: auto;
    }
  }

  /* Generic Form Sections */
  .wpdevart-form-section,
  .wpdevart_reservation_info,
  .wpdevart-order,
  .wpdevart-booking-legends,
  .wpdevart-extra-info {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: clamp(16px, 2vw, 24px);
    box-shadow: none;
  }

  .wpdevart-form-section h4,
  .wpdevart-reserv-info h4 {
    text-transform: uppercase;
    color: var(--stellar-calendar-ink) !important;
    font-style: normal !important;
    font-weight: 400;
  }

  /* Inputs & Fields */
  .wpdevart-fild-item-container,
  .wpdevart-field-item-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    border-radius: 18px;
    border: none;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);

    @media (max-width: 1024px) {
      &:nth-child(3) {
        grid-column-start: 1;
        grid-column-end: 3;
      }
    }

    label {
      margin: 0;
      font-weight: 600;
      text-transform: uppercase;
      color: var(--stellar-calendar-muted);
      display: flex;
      align-items: center;
      gap: 6px;
      font-style: normal !important;
      font-size: 13px !important;
    }

    input:is([type='text'], [type='email'], [type='tel'], [type='number'], [type='date'], [type='time']),
    select,
    textarea {
      width: 100%;
      border-radius: 18px;
      border: 1px solid rgba(15, 23, 42, 0.12);
      background: rgba(255, 255, 255, 0.95);
      padding: 14px 18px;
      font-size: 16px;
      font-weight: 500;
      color: var(--stellar-calendar-ink);
      transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);

      &::placeholder {
        color: rgba(15, 23, 42, 0.45);
      }

      &:focus {
        outline: none;
        border-color: var(--stellar-calendar-accent);
        box-shadow: 0 0 0 2px rgba(0, 185, 242, 0.25), 0 18px 32px rgba(15, 23, 42, 0.12);
      }
    }

    select {
      appearance: none;
      background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01)), url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 16px center;
      background-size: 12px 8px;
    }

    textarea {
      min-height: 120px;
      resize: vertical;
      border-radius: 24px;
    }

    input[type='checkbox'] {
      appearance: none;
      width: 20px;
      height: 20px;
      border-radius: 6px;
      border: 1px solid rgba(15, 23, 42, 0.3);
      background: rgba(255, 255, 255, 0.9);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
      position: relative;

      &::after {
        content: '';
        width: 6px;
        height: 12px;
        border: 2px solid #fff;
        border-top: none;
        border-left: none;
        transform: rotate(45deg);
        opacity: 0;
        transition: opacity 0.2s ease;
        position: absolute;
      }

      &:checked {
        background: var(--stellar-calendar-accent);
        border-color: transparent;
        box-shadow: 0 12px 24px rgba(0, 185, 242, 0.35);

        &::after {
          opacity: 1;
        }
      }
    }
  }

  .wpdevart-required {
    color: var(--stellar-calendar-accent);
  }

  .wpdevart-reserv-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .wpdevart-reserv-info-note {
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 11px !important;
    line-height: 1.5;
    color: #FD7C93;
    padding: 4px;
    align-self: flex-start;
    text-align: left;
    width: 100%;
    margin-bottom: 40px !important;
  }

  .check-info {
    border: 1px solid var(--stellar-calendar-border, rgba(15, 23, 42, 0.15));
    border-radius: 20px;
    padding: clamp(12px, 1.5vw, 18px);
    margin-bottom: clamp(12px, 1.5vw, 18px);
  }

  .reserv_info_row {
    display: flex;
    gap: 8px;
    padding: 20px;
    border-bottom: 1px solid var(--stellar-calendar-border);
    align-items: center;

    &:last-child {
      border-bottom: 0;

      .reserv_info_cell {
        text-align: right;
      }
    }

    .reserv_info_cell {
      font-size: 0.85rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--stellar-calendar-muted);
      font-weight: 600;
      display: flex;
      align-items: center;
    }

    .reserv_info_cell_value {
      font-size: 1.05rem;
      font-weight: 600;
      color: var(--stellar-calendar-ink);
      text-align: right;
    }
  }

  .wpdevart-total-price.reserv_info_row {
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px !important;
    background: var(--stellar-panel-bg, #00B9F2);
    box-shadow: 0 0 10px #00000020;

    .reserv_info_cell_value {
      font-size: 1.25rem;
    }
  }

  .wpdevart-booking-legends {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    font-style: normal;
    text-align: center;
    font-size: 1rem;

    >div {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0;
      border-radius: 0;
      background: transparent;
      border: none;
      box-shadow: none;
      font-size: 1rem;
      color: var(--stellar-calendar-ink);
    }
  }

  .wpdevart-submit {
    width: 100%;
    height: 45px;
    border: none;
    border-radius: 999px;
    background: #00baf2;
    color: #fff;
    font-size: 13px !important;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    &:hover {
      filter: brightness(0.95);
      transform: translateY(-1px);
    }

    .fa-spinner {
      font-size: 0.9em;
      color: rgba(255, 255, 255, 0.85);
    }

    i {
      margin-left: 6px;
    }
  }

  /* Order popup styles */
  .wpdevart_order {
    width: 100%;
    padding: clamp(16px, 2.5vw, 26px);
    border-top: none;
    background: var(--stellar-calendar-bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(12px, 1.5vw, 18px);

    form {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: clamp(12px, 1.5vw, 24px);
    }

    button {
      width: min(100%, 420px);
      min-height: 88px;
      margin: 0 auto;
      float: none;
      border-radius: 55px;
      padding: 0 clamp(30px, 5vw, 48px);
      font-size: 18px;
      font-weight: 600;
      text-transform: none;
      letter-spacing: 0.04em;
      background: #00B9F2;
      color: #ffffff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 14px;
      box-shadow: 0 28px 65px rgba(0, 90, 129, 0.35);

      img {
        max-height: 36px;
        width: auto;
        display: block;
      }

      &.with_image {
        background: #00B9F2;
        color: #ffffff;
        box-shadow: 0 28px 65px rgba(0, 90, 129, 0.35);
      }
    }
  }

  .wpdevart_order_wrap {
    display: none;
  }

  .wpdevart_order_content {
    position: static;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
    top: auto;
    left: auto;
    right: auto;
    padding: clamp(20px, 4vw, 34px);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 65px rgba(3, 14, 34, 0.25);
    overflow: visible;
    display: none;

    .wpdevart_order_container {
      padding: 0;
      max-height: none;
      overflow: visible;
    }

    .order_title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      font-size: 1.25rem;
      margin-bottom: clamp(14px, 2vw, 22px);
    }

    .wpdevart_close_popup {
      font-size: 1.25rem;
      line-height: 1;
      color: #1e1e1e;
      cursor: pointer;
    }

    .address_item {
      padding: clamp(14px, 2vw, 20px) 0;
      border-top: 1px solid rgba(17, 36, 56, 0.08);

      &:first-of-type {
        border-top: none;
      }
    }

    .wpdevart-submit.order-submit {
      width: 100%;
      margin-top: clamp(18px, 2vw, 26px);
    }
  }

  @media (max-width: 768px) {
    .wpdevart_order button {
      min-height: 56px;
    }

    .wpdevart_order_content {
      padding: clamp(18px, 6vw, 28px);
      border-radius: 22px;
    }
  }

  /* Specific ID overrides */
  #booking_calendar_container_1 {
    .successfully_text_container {
      display: none;
    }

    .wpdevart-calendar-container>div.past-day.wpdevart-available .wpda-day-header {
      background: #023646;
      color: #ffffff;
    }

    .wpda-day-number {
      font-size: 13px;
      font-weight: 400;
    }

    @media (max-width: 768px) {
      .wpda-day-header {
        .div-for-clear {
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          width: 100%;
        }

        .wpda-day-number {
          width: 100%;
          float: none;
          white-space: normal;
          overflow: visible;
          overflow-wrap: anywhere;
          word-break: break-word;
          line-height: 1.3;
        }
      }

      .day-availability .day-av {
        display: none;
      }
    }
  }
}