/* ==========================================================================
   Responsive Styles for Court Booking System
   ========================================================================== */

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  /* General layout adjustments */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Header and navigation */
  .navbar-brand img {
    max-width: 120px;
  }

  /* Booking page */
  .time-slot {
    padding: 8px 4px;
    font-size: 12px;
    height: 50px;
  }

  .time-slots .col-6 {
    padding: 0 4px;
  }

  .time-slot-container {
    max-height: 200px;
  }

  .banner-ad.large {
    margin-bottom: 15px;
  }

  /* Date picker style */
  #selected-dates .badge {
    margin-right: 5px;
    margin-bottom: 10px;
    padding: 8px;
  }

  /* Form elements */
  .form-control, .btn {
    font-size: 12px;
    padding: 15px 15px;
    margin: 1px;
  }

  /* Improve spacing */
  .mb-4 {
    margin-bottom: 15px !important;
  }

  /* Improve court image display on small screens */
  .banner-ad .swiper-slide img {
    height: 200px;
    object-fit: cover;
  }

  /* Better form layout on small screens */
  .card-body {
    padding: 15px;
  }

  /* Fix time slot legend on small screens */
  .time-slot-legend {
    flex-wrap: wrap;
  }
  
  .time-slot-legend > div {
    margin-right: 12px;
    margin-bottom: 8px;
  }
  
  /* Improve calendar input */
  input[type="date"] {
    font-size: 14px;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Booking page */
  .banner-ad.large {
    margin-bottom: 20px;
  }

  .time-slot {
    padding: 10px 6px;
    font-size: 12px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Booking page - better layout on tablets */
  .col-md-6 .swiper-slide img {
    max-height: 350px;
    object-fit: cover;
  }

  /* Keep the court details card alongside the image */
  .col-md-6 {
    width: 100%;
  }
}

/* Time slot improvements for all screens */
.time-slot {
  transition: all 0.2s ease;
  text-align: center;
  border-radius: 6px;
  margin: 2px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
}

.time-slot.available {
  background-color: #e9f7ef;
  color: #2ecc71;
  border: 1px solid #2ecc71;
}

.time-slot.selected {
  background-color: #2ecc71;
  color: white;
  border: 1px solid #27ae60;
}

.time-slot.booked {
  background-color: #f8d7da;
  color: #dc3545;
  border: 1px solid #dc3545;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Legend boxes for time slots */
.legend-box {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
}

.legend-box.available {
  background-color: #e9f7ef;
  border: 1px solid #2ecc71;
}

.legend-box.selected {
  background-color: #2ecc71;
  border: 1px solid #27ae60;
}

.legend-box.booked {
  background-color: #f8d7da;
  border: 1px solid #dc3545;
}

/* Improve form elements */
.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.25);
  border-color: #2ecc71;
}

/* Improve buttons */
.btn-primary {
  background-color: #582FD6;
  border-color: #582FD6;
}

.btn-primary:hover {
  background-color: #4920b5;
  border-color: #4920b5;
}

/* Fix navbar on mobile */
@media (max-width: 991.98px) {
  .navbar-collapse {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* Enhance time slot display */
.col-6.mb-2 {
  padding: 0 5px;
}

/* Style the estimated price for better visibility */
#estimated-price {
  color: #2ecc71;
  font-size: 1.1em;
}

/* Make form look better on all screen sizes */
.form-label {
  font-weight: 400;
  margin-bottom: 0.5rem;
  font-size: 14px;
}

/* Enhance card styles */
.card {
  border-radius: 10px;
  overflow: hidden;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-title {
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* Improve court selection experience */
.court-details {
  border-top: 1px solid #eee;
  padding-top: 15px;
  margin-top: 15px;
}

/* Make the booking summary stand out */
.selected-summary {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  border-left: 4px solid #582FD6;
} 