.tdm-auto-calendar-wrap {
  margin-bottom: 1.375rem;
}

.tdm-reservation-widget {
  display: grid;
  grid-template-columns: minmax(17.5rem, 1.2fr) minmax(16.25rem, 1fr);
  gap: 1.5rem;
  padding: 1.25rem;
  border: 0.0625rem solid #e4e6eb;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  max-width: 67.5rem;
  margin: 0 auto;

  & .tdm-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
  }

  & .tdm-month-label {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
  }

  & .tdm-nav-btn {
    width: 2.25rem;
    height: 2.25rem;
    border: 0.0625rem solid #d1d5db;
    border-radius: 0.625rem;
    background: #ffffff;
    cursor: pointer;
    font-size: 1rem;
  }

  & .tdm-weekdays,
  & .tdm-days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
  }

  & .tdm-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
  }

  & .tdm-day {
    min-height: 3.5rem;
    border: 0.0625rem solid #e5e7eb;
    border-radius: 0.625rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover {
      border-color: #1d4ed8;
    }

    &.is-selected {
      border-color: #1d4ed8;
      box-shadow: 0 0 0 0.125rem rgba(29, 78, 216, 0.15);
    }

    &.is-disabled,
    &:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }

    &.is-full-booked {
      background: #fee2e2;
      border-color: #ef4444;
      position: relative;
      overflow: hidden;

      &::after {
        content: '';
        position: absolute;
        top: 50%;
        left: -10%;
        width: 120%;
        height: 0.125rem;
        background-color: #ef4444;
        transform: translateY(-50%) rotate(-45deg);
        z-index: 10;
      }
    }

    &.is-partial-booked {
      background: #fff7ed;
      border-color: #f97316;
    }
  }

  & .tdm-day-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
  }

  & .tdm-day-badges {
    display: inline-flex;
    gap: 0.1875rem;

    & span {
      width: 1.125rem;
      height: 1.125rem;
      border-radius: 62.5rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.625rem;
      font-weight: 700;
      color: #991b1b;
      background: #fecaca;
    }
  }

  & .tdm-empty {
    border: 0;
    background: transparent;
    min-height: 3.5rem;
    pointer-events: none;
  }

  & .tdm-booking-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: #ffffff;
    border: 0.0625rem solid #e5e7eb;
  }

  & .tdm-selected-date,
  & .tdm-price {
    margin: 0;
    color: #111827;
    font-size: 1.1rem;
  }

  & .tdm-slots {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  & .tdm-slot-btn {
    border: 0.0625rem solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 1rem;
    border-radius: 0.625rem;
    padding: 0.625rem 0.75rem;
    font-weight: 600;
    cursor: pointer;

    &.is-selected {
      border-color: #2563eb;
      background: #dbeafe;
      color: #1e3a8a;
    }

    &.is-blocked,
    &.is-blocked:disabled {
      border-color: #dc2626;
      background: #fee2e2;
      color: #7f1d1d;
      cursor: not-allowed;
    }
  }

  & .tdm-reserve-btn {
    border: 0;
    border-radius: 0.625rem;
    padding: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    background: #111827;
    cursor: pointer;

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  & .tdm-message {
    margin: 0;
    min-height: 1.25rem;
    font-size: 0.8125rem;
    color: #374151;

    &.is-error {
      color: #b91c1c;
    }

    &.is-success {
      color: #047857;
    }
  }
}

.tdm-banner-calendar {
  max-width: 26.875rem;
  margin: 0 auto;

  & .tdm-reservation-widget {
    max-width: 26.875rem;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.875rem 0.875rem 1rem;
    border-radius: 1.75rem;
    border-color: #d8b4c5;
    background: #f8eef3;
  }

  & .tdm-calendar-header {
    margin-bottom: 0.5rem;
  }

  & .tdm-month-label {
    font-size: 1.125rem;
    text-transform: capitalize;
  }

  & .tdm-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 62.5rem;
    border-color: #d7a9bf;
    background: #d8afc0;
    color: #1f2433;
  }

  & .tdm-weekdays,
  & .tdm-days-grid {
    gap: 0.4375rem;
  }

  & .tdm-weekday {
    font-size: 0.6875rem;
    color: #6d6370;
  }

  & .tdm-day {
    min-height: 2.75rem;
    border-radius: 62.5rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-color: #d9c2cd;
    background: #e6d4dc;

    &.is-selected {
      border-color: #9f6b86;
      box-shadow: 0 0 0 0.125rem rgba(159, 107, 134, 0.2);
      background: #d7afc0;
    }

    &.is-full-booked {
      border-color: #cc3f4d;
      background: #f6ccd3;
      position: relative;
      overflow: hidden;

      &::after {
        content: '';
        position: absolute;
        top: 50%;
        left: -10%;
        width: 120%;
        height: .4rem;
        background-color: #cc3f4d;
        transform: translateY(-50%) rotate(-45deg);
        z-index: 10;
      }
    }

    &.is-partial-booked {
      border-color: #f97316;
      background: #fed7aa;
    }
  }

  & .tdm-day-number {
    font-size: 1rem;
  }

  & .tdm-day-badges {
    display: none;
  }

  & .tdm-booking-panel {
    border: 0;
    background: transparent;
    padding: 0;
    gap: 0.625rem;
  }

  & .tdm-slot-btn {
    border-radius: 62.5rem;
    border-color: #d4a8bc;
    background: #d8b1c1;
    color: #1f2433;
    padding: 0.625rem 0.75rem;

    &.is-selected {
      border-color: #95607c;
      background: #c99db0;
      color: #1f2433;
    }

    &.is-blocked,
    &.is-blocked:disabled {
      background: #f5c9d2;
      border-color: #cb3f50;
      color: #7f1d1d;
    }
  }

  & .tdm-reserve-btn {
    border-radius: 62.5rem;
    background: #d2aabc;
    color: #ffffff;
  }
}

@media (max-width: 56.25rem) {
  .tdm-reservation-widget {
    grid-template-columns: 1fr;
  }

  .tdm-banner-calendar,
  .tdm-banner-calendar .tdm-reservation-widget {
    max-width: 100%;
  }
}
