/**
 * Room Booking Styles
 */

.room-booking-container {
  min-height: 100vh;
  background: #f8f9fa;
}

/* Room Cards */
.room-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  overflow: hidden;
}

.room-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.room-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.room-card .card-body {
  padding: 1.5rem;
}

.room-card .card-title {
  color: #333;
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.room-card .card-text {
  font-size: 0.9rem;
  line-height: 1.5;
}

.room-card .card-footer {
  border-top: 1px solid #e9ecef;
  padding: 1rem 1.5rem;
}

.booking-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Timetable */
.timetable {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
}

.time-slot {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.time-slot:last-child {
  border-bottom: none;
}

.time-slot:hover {
  background-color: #f8f9fa;
}

.time-label {
  min-width: 100px;
  font-size: 0.95rem;
  color: #495057;
}

.booking-info {
  flex: 1;
  margin-left: 1rem;
  padding: 0.75rem 1rem;
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 0.25rem;
}

.booked-slot {
  background-color: #fff8f0;
}

.booked-slot:hover {
  background-color: #fff3e0;
}

.past-slot {
  background-color: #f5f5f5;
  opacity: 0.7;
}

.past-slot:hover {
  background-color: #f5f5f5;
}

.booking-user {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.booking-reason {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.booking-time {
  color: #666;
  font-size: 0.85rem;
}

.booking-info i {
  width: 16px;
  text-align: center;
  margin-right: 0.25rem;
  color: #856404;
}

/* Tabs */
.nav-tabs .nav-link {
  color: #495057;
  font-weight: 500;
  border: none;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
  border-color: transparent;
  background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
  color: #007bff;
  background-color: transparent;
  border-bottom-color: #007bff;
}

.nav-tabs .nav-link i {
  margin-right: 0.5rem;
}

/* Booking Modal */
#bookingModal .modal-header {
  border-bottom: none;
}

#bookingModal .modal-body {
  padding: 1.5rem 2rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

#bookingModal .modal-body .alert-info {
  background-color: #e3f2fd;
  border-color: #2196f3;
  color: #1565c0;
  font-size: 0.95rem;
}

#bookingModal .modal-body .alert-info i {
  margin-right: 0.5rem;
}

#bookingModal .modal-body .alert-info strong {
  color: #0d47a1;
}

#bookingModal .form-group label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

#bookingModal .input-group-text {
  background-color: #e9ecef;
  font-weight: 500;
}

#bookingModal .modal-footer {
  border-top: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

/* Timetable Modal */
#timetableModal .modal-xl {
  max-width: 900px;
}

#timetableModal .modal-body {
  padding: 1.5rem 2rem;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

#timetableModal .modal-footer {
  border-top: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

/* Booking History */
#history_results .card {
  border: none;
  transition: all 0.3s ease;
}

#history_results .card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

#history_results .card-title {
  color: #007bff;
  font-weight: 600;
  margin-bottom: 1rem;
}

#history_results .card-body p {
  font-size: 0.9rem;
  line-height: 1.6;
}

#history_results .card-body i {
  width: 20px;
  text-align: center;
  color: #6c757d;
}

/* Alert Messages */
.alert {
  border-left: 4px solid;
  border-radius: 0.25rem;
}

.alert-info {
  border-left-color: #17a2b8;
  background-color: #d1ecf1;
}

.alert-success {
  border-left-color: #28a745;
  background-color: #d4edda;
}

.alert-danger {
  border-left-color: #dc3545;
  background-color: #f8d7da;
}

.alert-warning {
  border-left-color: #ffc107;
  background-color: #fff3cd;
}

/* Form Validation */
.is-invalid {
  border-color: #dc3545 !important;
}

.is-invalid:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Buttons */
.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-primary:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  transform: none;
  box-shadow: none;
}

.btn-block {
  width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .room-card .card-img-top {
    height: 150px;
  }

  .time-slot {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }

  .booking-info {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }

  .time-label {
    min-width: auto;
  }

  #timetableModal .modal-xl {
    max-width: 95%;
  }

  .modal-body {
    padding: 1rem !important;
  }
}

/* Loading States */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Success Modal */
#bookingSuccessModal .modal-header {
  border-bottom: none;
}

#bookingSuccessModal .modal-body {
  padding: 2rem;
}

#bookingSuccessModal .fa-calendar-check {
  color: #28a745;
}

/* Scrollbar Styling */
.timetable::-webkit-scrollbar,
#bookingModal .modal-body::-webkit-scrollbar,
#timetableModal .modal-body::-webkit-scrollbar {
  width: 8px;
}

.timetable::-webkit-scrollbar-track,
#bookingModal .modal-body::-webkit-scrollbar-track,
#timetableModal .modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.timetable::-webkit-scrollbar-thumb,
#bookingModal .modal-body::-webkit-scrollbar-thumb,
#timetableModal .modal-body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.timetable::-webkit-scrollbar-thumb:hover,
#bookingModal .modal-body::-webkit-scrollbar-thumb:hover,
#timetableModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Card Shadows */
.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Input Focus States */
.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Date Input Styling */
input[type="date"],
input[type="time"] {
  cursor: pointer;
}

/* Modal Header Icons */
.modal-title i {
  margin-right: 0.5rem;
}

/* Card Footer Styling */
.card-footer {
  background-color: transparent;
}

/* Utility Classes */
.text-primary {
  color: #007bff !important;
}

.text-success {
  color: #28a745 !important;
}

.text-danger {
  color: #dc3545 !important;
}

.text-muted {
  color: #6c757d !important;
}
