/**
 * Eva Course Bookings - Frontend Styles
 */

/* Slot Selection Container */
.eva-slot-selection {
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.eva-slot-title {
  margin: 0 0 20px 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #212529;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
}

/* Form Fields */
.eva-slot-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eva-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eva-field label {
  font-weight: 500;
  font-size: 14px;
  color: #495057;
}

/* Date Picker */
.eva-datepicker {
  width: fit-content;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.eva-datepicker:hover {
  border-color: #007bff;
}

.eva-datepicker:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* jQuery UI Datepicker overrides */
.ui-datepicker {
  width: auto !important;
  padding: 0 !important;
  background: #fff !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid #e9ecef !important;
  font-family: inherit !important;
  overflow: hidden !important;
}

.ui-datepicker-header {
  background: #007bff !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 15px 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
}

.ui-datepicker-title {
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  text-align: center !important;
  flex: 1 !important;
  margin: 0 50px !important;
}

.ui-datepicker-prev,
.ui-datepicker-next {
  cursor: pointer !important;
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 35px !important;
  height: 35px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px !important;
  transition: background-color 0.2s !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.ui-datepicker-prev {
  left: 10px !important;
}

.ui-datepicker-next {
  right: 10px !important;
}

.ui-datepicker-prev span,
.ui-datepicker-next span {
  background-image: none !important;
  display: none !important;
}

.ui-datepicker-prev:before {
  content: '‹' !important;
  color: #fff !important;
  font-weight: bold !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.ui-datepicker-next:before {
  content: '›' !important;
  color: #fff !important;
  font-weight: bold !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.ui-datepicker-calendar {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 0 !important;
  padding: 10px !important;
}

.ui-datepicker th {
  padding: 10px 5px !important;
  text-align: center !important;
  font-weight: 600 !important;
  color: #495057 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-bottom: 1px solid #e9ecef !important;
}

.ui-datepicker td {
  padding: 3px !important;
  text-align: center !important;
}

.ui-datepicker td a,
.ui-datepicker td span {
  padding: 10px 8px !important;
  text-align: center !important;
  border-radius: 6px !important;
  display: block !important;
  transition: all 0.2s !important;
  min-width: 36px !important;
  box-sizing: border-box !important;
}

.ui-datepicker td a.ui-state-default {
  background: #fff !important;
  border: 1px solid transparent !important;
  color: #212529 !important;
  font-weight: 500 !important;
}

.ui-datepicker td a.ui-state-default:hover {
  background: #e9ecef !important;
  border-color: #dee2e6 !important;
  transform: translateY(-1px) !important;
}

.ui-datepicker td a.ui-state-active,
.ui-datepicker td a.ui-state-highlight {
  background: #007bff !important;
  color: #fff !important;
  border-color: #007bff !important;
  font-weight: 600 !important;
}

.ui-datepicker td.ui-datepicker-other-month a {
  color: #adb5bd !important;
  opacity: 0.5 !important;
}

.ui-datepicker td.ui-datepicker-unselectable span {
  color: #adb5bd !important;
  background: #f8f9fa !important;
  cursor: not-allowed !important;
}

.ui-datepicker td.ui-datepicker-today a {
  background: #e7f3ff !important;
  border-color: #007bff !important;
  color: #007bff !important;
  font-weight: 600 !important;
}

.ui-datepicker td.ui-datepicker-today a.ui-state-active,
.ui-datepicker td.ui-datepicker-today a.ui-state-highlight {
  background: #007bff !important;
  color: #fff !important;
}

/* Time Slots */
.eva-time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.eva-time-slot {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 100px;
}

.eva-time-slot:hover {
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.eva-time-slot.selected {
  background: #007bff;
  border-color: #007bff;
  color: #fff;
}

.eva-time-slot-time {
  font-size: 16px;
  font-weight: 600;
}

/* Unavailable slots */
.eva-time-slot-unavailable {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f5f5f5;
  border-color: #d0d0d0;
  position: relative;
}

.eva-time-slot-unavailable:hover {
  border-color: #d0d0d0;
  transform: none;
  box-shadow: none;
}

.eva-time-slot-unavailable-label {
  display: block;
  font-size: 12px;
  color: #dc3545;
  font-weight: 500;
  margin-top: 4px;
  text-align: center;
}

/* Loading */
.eva-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #6c757d;
}

.eva-loading::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e9ecef;
  border-top-color: #007bff;
  border-radius: 50%;
  margin-right: 10px;
  animation: eva-spin 1s linear infinite;
}

@keyframes eva-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skip Slot Option */
.eva-skip-slot-option {
  background: #fff8e1;
  border: 1px solid #ffecb3;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 5px;
}

.eva-skip-slot-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  color: #795548;
}

.eva-skip-slot-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.eva-skip-slot-text {
  font-size: 15px;
}

.eva-skip-slot-description {
  margin: 10px 0 0 28px;
  font-size: 13px;
  color: #8d6e63;
  line-height: 1.5;
}

/* Skip Slot Summary */
.eva-skip-slot-summary {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 6px;
  padding: 15px;
}

.eva-skip-slot-summary .eva-summary-icon {
  font-size: 20px;
  color: #f57c00;
}

.eva-skip-slot-summary .eva-summary-text {
  color: #e65100;
}

/* Selected Summary */
.eva-selected-summary {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 15px;
}

.eva-summary-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eva-summary-icon {
  font-size: 18px;
  color: #28a745;
}

.eva-summary-text {
  font-weight: 500;
  color: #155724;
}

/* Validation Message */
.eva-validation-message {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 12px 15px;
  color: #856404;
  font-size: 14px;
}

/* No Slots Notice */
.eva-no-slots-notice {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.eva-no-slots-notice p {
  margin: 0 0 10px 0;
  color: #721c24;
}

.eva-no-slots-notice p:last-child {
  margin-bottom: 0;
}

/* Thank You Page & Order View */
.eva-thankyou-slot-info {
  margin-bottom: 30px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
}

.eva-thankyou-slot-info h2 {
  font-size: 1.3em;
  margin: 0 0 15px 0;
  color: #2e7d32;
}

.eva-thankyou-slot-info table {
  background: #fff;
  border-radius: 4px;
}

.eva-thankyou-slot-info table th,
.eva-thankyou-slot-info table td {
  padding: 12px 15px;
}

.eva-thankyou-slot-info table th {
  background: #f5f5f5;
  font-weight: 600;
}

.eva-thankyou-slot-info table td {
  border-bottom: 1px solid #eee;
}

.eva-thankyou-slot-info table tr:last-child td {
  border-bottom: none;
}

/* Responsive */
@media screen and (max-width: 600px) {
  .eva-slot-selection {
    padding: 15px;
  }

  .eva-time-slot {
    flex: 1 1 calc(50% - 5px);
    min-width: auto;
  }
}
