﻿* {
  box-sizing: border-box;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 12px;
  color: #666;
  text-align: center;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  justify-items: center;
}

/* Small square days like screenshot */
.calendar-day {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #dfeecf; /* light green border */
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.12s ease;
  color: #1f4f2a;
  position: relative;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
  background: #f7ffec;
  border-color: #cfe8a8;
}

.calendar-day.disabled,
.calendar-day.other-month {
  background: #eceff1;
  color: #bfc6cb;
  border-color: #eceff1;
  cursor: default;
}

/* 'Today' small dot marker top-left */
.calendar-day.today::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
  position: absolute;
  left: 6px;
  top: 6px;
}

.calendar-day.selected {
  background: #f2ffd9; /* pale green fill */
  border-color: #d1f0a8;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
}

.sidebar-header p {
  margin: 6px 0 0 0;
  font-size: 12px;
  color: #555;
}

/* Steps Navigation */
.booking-steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.25s ease;
}

.step:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.step.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #999;
  padding-left: 10px;
}

.step-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.step-title {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

.step-toggle {
  font-size: 12px;
  color: #999;
}

/* Sidebar Footer */
.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: auto;
  font-size: 12px;
  color: #333;
}

.sidebar-footer p {
  margin: 6px 0;
  line-height: 1.4;
}

.sidebar-footer strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.collapse-toggle {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  background: #999;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.collapse-toggle:hover {
  background: #777;
}

/* Collapsed Sidebar */
.booking-sidebar.collapsed {
  width: 70px !important;
  flex: 0 0 70px !important;
  padding: 16px 10px !important;
}

.booking-sidebar.collapsed .sidebar-header,
.booking-sidebar.collapsed .step-title,
.booking-sidebar.collapsed .sidebar-footer {
  display: none;
}

.booking-sidebar.collapsed .step {
  justify-content: center;
  padding: 10px 6px;
}

.booking-sidebar.collapsed .step-icon {
  width: auto;
  margin: 0;
}

.booking-container.collapsed .booking-main {
  padding-left: 20px;
}

/* ===== MAIN FORM AREA ===== */
.booking-main {
  flex: 1;
  padding: 32px 36px;
  overflow-y: auto;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-step h3 {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 700;
  color: #1b5e20;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

/* Time slots grid */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.time-slot {
  padding: 16px 14px;
  border: 2px solid #dfeecf;
  background: #f9fff5;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #2f6b3a;
  transition: all 0.2s ease;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-slot:hover {
  background: #e8f8d8;
  border-color: #b8d89e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 107, 58, 0.1);
}

.time-slot.selected {
  background: #d4f4a0;
  border-color: #9fd06f;
  box-shadow: 0 4px 12px rgba(159, 208, 111, 0.25);
  font-weight: 700;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 2px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #17a2b8;
  box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

/* Calendar Section */
.calendar-section {
  padding: 18px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  margin-bottom: 20px;
}

.calendar-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-month,
.calendar-year {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  cursor: pointer;
}

.nav-prev,
.nav-next {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.nav-prev:hover,
.nav-next:hover {
  background: #f5f5f5;
  border-color: #999;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 12px;
  color: #666;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  color: #333;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
  border-color: #ffc107;
  background: #fffbf0;
}

.calendar-day.disabled,
.calendar-day.other-month {
  background: #fafafa;
  color: #ccc;
  cursor: not-allowed;
}

.calendar-day.selected {
  background: white;
  color: #333;
  border-color: #ffc107;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px #ffc107;
}

/* Service Description */
.service-description {
  margin-top: 10px;
  padding: 12px;
  background: #f5f5f5;
  border-left: 4px solid #17a2b8;
  border-radius: 4px;
  font-size: 13px;
  color: #555;
  display: none;
  line-height: 1.5;
}

.service-description.show {
  display: block;
}

/* Time Selection */
.time-input {
  max-width: 200px;
}

/* Addons Section */
.addon-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  background: #fafafa;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.addon-item:hover {
  background: #f5f5f5;
  border-color: #17a2b8;
}

.addon-item input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
  width: auto;
}

.addon-info {
  flex: 1;
}

.addon-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  font-size: 14px;
}

.addon-description {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}

.addon-price {
  font-weight: 700;
  color: #17a2b8;
  font-size: 15px;
  white-space: nowrap;
  margin-left: auto;
}

/* Booking Summary */
.booking-summary {
  padding: 16px;
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row span:first-child {
  color: #666;
}

.summary-row span:last-child {
  font-weight: 600;
  color: #333;
}

.summary-total {
  padding-top: 12px !important;
  border-top: 2px solid #ddd !important;
  font-size: 16px !important;
  color: #17a2b8 !important;
}

.summary-total span:last-child {
  font-size: 18px;
}

/* Buttons */
.button-group {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.btn-back,
.btn-continue,
.btn-book-now {
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back {
  background: #f0f0f0;
  color: #333;
  flex: 1;
}

.btn-back:hover {
  background: #e0e0e0;
}

.btn-continue {
  background: #17a2b8;
  color: white;
  flex: 1;
}

.btn-continue:hover {
  background: #138496;
}

.btn-book-now {
  background: #17a2b8;
  color: white;
  width: 100%;
  padding: 14px 28px;
  margin-top: 20px;
}

.btn-book-now:hover {
  background: #138496;
}

/* Messages */
.form-message {
  margin-top: 16px;
  padding: 14px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.form-message.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.form-message.loading {
  display: block;
  background: #cfe2ff;
  color: #084298;
  border: 1px solid #b6d4fe;
}

/* Responsive Design */
@media (max-width: 900px) {
  .booking-container {
    flex-direction: column;
  }

  .booking-sidebar {
    width: 100%;
    flex: 0 0 auto;
    min-height: auto;
  }

  .booking-sidebar.collapsed {
    width: 100% !important;
    flex: 0 0 auto !important;
  }

  .booking-main {
    padding: 24px;
  }

  .calendar-grid {
    gap: 6px;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .rental-booking-wrapper {
    margin: 15px auto;
    padding: 0 10px;
  }

  .booking-main {
    padding: 18px;
  }

  .booking-sidebar {
    padding: 18px;
  }

  .form-step h3 {
    font-size: 20px;
  }

  .calendar-controls {
    flex-wrap: wrap;
  }

  .nav-prev,
  .nav-next {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* ===== Calendar appearance overrides (improve sizing & contrast) ===== */
.calendar-section .calendar-grid {
  gap: 10px;
}

.calendar-section .calendar-day {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2f6b3a;
  border: 1px solid #e6e6e6;
  background: #ffffff;
  box-shadow: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.calendar-section .calendar-day.disabled,
.calendar-section .calendar-day.other-month {
  background: #f7f7f7;
  color: #bfbfbf;
  border-color: #f0f0f0;
  cursor: not-allowed;
}

.calendar-section .calendar-day:hover:not(.disabled):not(.other-month) {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  border-color: #cfe8a8;
  background: #f6fff0;
}

.calendar-section .calendar-day.selected {
  background: #2f6b3a;
  color: #ffffff;
  border-color: #254f2a;
  box-shadow: 0 8px 20px rgba(47, 107, 58, 0.14);
}

.calendar-section .calendar-controls .calendar-month,
.calendar-section .calendar-controls .calendar-year {
  font-weight: 600;
}

/* Support common third-party datepickers */
/* (Removed Flatpickr/ui-datepicker specific overrides — calendar now uses legacy renderer) */

@media (max-width: 900px) {
  .calendar-section .calendar-day {
    width: 40px;
    height: 40px;
  }
}
