.booking-form {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.booking-form__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.booking-form__header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem 0;
}

.booking-form__apartment-title {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
}

.booking-form__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.booking-form__date-selection {
  margin-bottom: 1.5rem;
}

.booking-form__date-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.booking-form__date-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.booking-form__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.booking-form__date-display {
  padding: 12px 16px;
  font-size: 0.9375rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.booking-form__date-display:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.booking-form__calendars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 1.5rem;
}

.booking-calendar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.booking-calendar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.booking-calendar__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  text-transform: capitalize;
}

.booking-calendar__navigation {
  display: flex;
  gap: 8px;
}

.booking-calendar__nav-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking-calendar__nav-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.booking-calendar__nav-btn:active {
  transform: translateY(0);
}

.booking-calendar__container {
  width: 100%;
  flex: 1;
}

.booking-calendar__month {
  width: 100%;
}

.booking-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.booking-calendar__weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.booking-calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.booking-calendar__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  position: relative;
  min-height: 40px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
}

.booking-calendar__day--empty {
  border: none;
  background: transparent;
  visibility: hidden;
}

.booking-calendar__day--available {
  background-color: #e8f5e9;
  border-color: #4caf50;
  color: #2e7d32;
  cursor: pointer;
}

.booking-calendar__day--available:hover {
  background-color: #4caf50;
  border-color: #2e7d32;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
  z-index: 1;
}

.booking-calendar__day--pending {
  background-color: #fff8e1;
  border-color: #ffc107;
  color: #f57c00;
  cursor: pointer;
}

.booking-calendar__day--pending:hover {
  background-color: #ffc107;
  border-color: #f57c00;
  color: #fff;
}

.booking-calendar__day--booked {
  background-color: #ffebee;
  border-color: #f44336;
  color: #c62828;
  cursor: not-allowed;
  opacity: 0.7;
}

.booking-calendar__day--blocked {
  background-color: #fff3e0;
  border-color: #ff9800;
  color: #e65100;
  cursor: not-allowed;
  opacity: 0.7;
}

.booking-calendar__day--maintenance {
  background-color: #e3f2fd;
  border-color: #2196f3;
  color: #1565c0;
  cursor: not-allowed;
  opacity: 0.7;
}

.booking-calendar__day--past {
  background: var(--bg);
  border-color: var(--border);
  color: var(--muted);
  opacity: 0.5;
  cursor: not-allowed;
}

.booking-calendar__day--today {
  border-width: 2px;
  border-color: var(--accent);
  font-weight: 700;
}

.booking-calendar__day--selected-from {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(77, 163, 255, 0.5);
  z-index: 2;
}

.booking-calendar__day--selected-to {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(77, 163, 255, 0.5);
  z-index: 2;
}

.booking-calendar__day--in-range {
  background-color: rgba(77, 163, 255, 0.15);
  border-color: rgba(77, 163, 255, 0.3);
}

.booking-calendar__day--disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
}

.booking-calendar__day-number {
  font-size: 0.875rem;
  color: inherit;
  font-weight: inherit;
  line-height: 1;
}

.booking-form__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.booking-form__legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text);
  white-space: nowrap;
  font-weight: 500;
}

.booking-form__legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid transparent;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.booking-form__legend-color--available {
  background-color: #4caf50;
  border-color: #2e7d32;
}

.booking-form__legend-color--pending {
  background-color: #ffc107;
  border-color: #f57c00;
}

.booking-form__legend-color--booked {
  background-color: #f44336;
  border-color: #c62828;
}

.booking-form__legend-color--blocked {
  background-color: #ff9800;
  border-color: #f57c00;
}

.booking-form__legend-color--maintenance {
  background-color: #2196f3;
  border-color: #1565c0;
}

.booking-form__section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow-subtle);
}

.booking-form__section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem 0;
}

.booking-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.booking-form__hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.booking-form__input,
.booking-form__textarea {
  padding: 10px 12px;
  font-size: 0.9375rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  transition: all 0.2s ease;
}

.booking-form__input:focus,
.booking-form__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.1);
}

.booking-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.booking-form__long-term {
  margin-bottom: 1.5rem;
}

.booking-form__long-term-btn {
  width: 100%;
  padding: 14px 16px;
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-weight: 500;
}

.booking-form__long-term-btn:hover {
  border-color: var(--accent);
  background: rgba(77, 163, 255, 0.05);
  border-style: solid;
}

.booking-form__long-term-btn--active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  border-style: solid;
}

.booking-form__actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.booking-form__actions .btn {
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  .booking-calendar__day--available {
    background-color: rgba(76, 175, 80, 0.25);
    border-color: #4caf50;
    color: #a5d6a7;
  }
  
  .booking-calendar__day--available:hover {
    background-color: rgba(76, 175, 80, 0.5);
    border-color: #66bb6a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.6);
  }

  .booking-calendar__day--pending {
    background-color: rgba(255, 193, 7, 0.25);
    border-color: #ffc107;
    color: #ffd54f;
  }

  .booking-calendar__day--booked {
    background-color: rgba(244, 67, 54, 0.25);
    border-color: #f44336;
    color: #ef9a9a;
  }

  .booking-calendar__day--blocked {
    background-color: rgba(255, 152, 0, 0.25);
    border-color: #ff9800;
    color: #ffb74d;
  }

  .booking-calendar__day--maintenance {
    background-color: rgba(33, 150, 243, 0.25);
    border-color: #2196f3;
    color: #90caf9;
  }
}

.modal--booking {
  max-width: 900px !important;
}

.modal--booking .modal__body {
  padding: 0;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
}

.modal--booking .booking-form {
  padding: 24px;
}

.modal--booking .booking-form__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.modal--booking .booking-form__apartment-title {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.modal--booking .booking-form__section {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow-subtle);
  border-radius: 12px;
  padding: 20px;
}

.modal--booking .booking-form__section-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.modal--booking .booking-form__date-display {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  border-radius: 8px;
}

.modal--booking .booking-form__actions {
  padding-top: 20px;
  border-top: 2px solid var(--border);
  margin-top: 8px;
}

@media (max-width: 768px) {
  .booking-form {
    max-width: 100%;
  }

  .booking-form__date-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .booking-form__calendars {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .booking-form__header h2 {
    font-size: 1.25rem;
  }

  .booking-form__section {
    padding: 1rem;
  }

  .booking-form__actions {
    flex-direction: column-reverse;
  }

  .booking-form__actions .btn {
    width: 100%;
  }

  .modal--booking {
    max-width: 95% !important;
  }

  .modal--booking .booking-form {
    padding: 1rem;
  }

  .booking-calendar {
    padding: 16px;
  }

  .booking-calendar__day {
    min-height: 36px;
    font-size: 0.8125rem;
  }
}
