/* CSS file for appointment booking widget */

.rendezvous-section {
  padding: 80pxx 0 120px;
  background-color: #f8f9fa;
  min-height: calc(100vh - 120px);
}

.rendezvous-title {
  color: var(--heading-color);
  font-weight: 700;
  font-size: 2rem;
}

.rendezvous-subtitle {
  color: var(--default-color);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

/* Booking Card Container */
.booking-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  padding: 40px;
  border: 1px solid #edf2f7;
  transition: all 0.3s ease;
  margin-bottom: 40px;
  position: relative;
  isolation: isolate;
}

.booking-card .row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.booking-card .col-lg-7,
.booking-card .col-lg-5 {
  position: relative;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 992px) {
  .booking-card .col-lg-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  
  .booking-card .col-lg-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
}

.booking-section-title {
  color: var(--heading-color);
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 30px;
}

/* Calendar Month Nav */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 25px;
}

.calendar-btn {
  background: var(--surface-color);
  border: 1px solid #e2e8f0;
  color: var(--default-color);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-btn:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
  color: var(--heading-color);
}

.calendar-scroll-btn {
  width: 44px;
}

.calendar-scroll-btn i {
  font-size: 1.1rem;
}

.calendar-month-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading-color);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  min-width: 140px;
  text-align: center;
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  text-align: center;
}

.weekday-header {
  font-weight: 700;
  color: #718096;
  font-size: 0.85rem;
  padding-bottom: 10px;
  text-transform: uppercase;
}

.calendar-day {
  aspect-ratio: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #a0aec0;
  border-radius: 8px;
  user-select: none;
  background: transparent;
  border: 1px solid transparent;
}

.calendar-day.available {
  border: 1.5px solid var(--heading-color);
  color: var(--heading-color);
  font-weight: 700;
  background: var(--surface-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-day.available:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--contrast-color);
}

.calendar-day.selected {
  background: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: var(--contrast-color) !important;
}

.calendar-day.disabled {
  color: #cbd5e0;
  cursor: not-allowed;
}

/* Time Slots Component */
.slots-container {
  border-left: 1px solid #edf2f7;
  padding-left: 40px;
  min-height: 400px;
  position: relative;
  width: 100%;
  overflow: visible;
}

.no-date-selected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #a0aec0;
  text-align: center;
  padding: 40px 0;
}

#slots-list-view {
  display: none;
}

#slots-list-view:not(.d-none) {
  display: block !important;
}

.selected-day-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.selected-day-bar {
  width: 4px;
  height: 24px;
  background-color: var(--accent-color);
  margin-right: 12px;
  border-radius: 2px;
}

.selected-day-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading-color);
  text-transform: uppercase;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  width: 100%;
}

@media (max-width: 991px) {
  .slots-container {
    border-left: none;
    padding-left: 0;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #edf2f7;
  }
}

@media (max-width: 767px) {
  .booking-card {
    padding: 24px;
  }

  .appointment-card-popup {
    width: calc(100% - 24px);
  }
}

.slot-item {
  background: var(--surface-color);
  border: 1px solid #e2e8f0;
  color: var(--heading-color);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 10px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.slot-checkbox-input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.slot-item-text {
  display: inline-block;
}

.slot-item:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.slot-item.selected {
  border-color: var(--accent-color) !important;
  border-width: 1.5px !important;
  color: var(--contrast-color) !important;
  background: var(--accent-color) !important;
}

.slot-item.disabled {
  background: #f7fafc;
  color: #cbd5e0;
  border-color: #edf2f7;
  cursor: not-allowed;
  font-weight: 500;
}

.slot-item.disabled:hover {
  border-color: #edf2f7;
  color: #cbd5e0;
}

.no-date-selected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #a0aec0;
  text-align: center;
  padding: 40px 0;
}

.no-date-selected i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #cbd5e0;
}

.appointment-popup-backdrop {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.35);
  z-index: 10;
  pointer-events: auto;
}

.appointment-card-popup,
.appointment-popup-backdrop {
  display: none !important;
}

.appointment-card-popup:not(.d-none),
.appointment-popup-backdrop:not(.d-none) {
  display: block !important;
}

.appointment-card-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 32px));
  overflow: visible;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  z-index: 11;
  pointer-events: auto;
  animation: appointmentPopupIn 0.25s ease;
}

@keyframes appointmentPopupIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.appointment-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s ease;
}

.appointment-popup-close:hover {
  background: #e2e8f0;
  color: var(--accent-color);
}

.appointment-popup-title {
  padding-right: 36px;
  color: var(--heading-color);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.appointment-card-summary {
  margin-bottom: 16px;
}

.booking-summary-alert {
  background-color: #edf5ff;
  border: 1px solid #cce3ff;
  border-radius: 8px;
  padding: 14px 18px;
  color: #0c58c0;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}

.booking-summary-alert i {
  font-size: 1.15rem;
}

.appointment-details {
  display: grid;
  gap: 10px;
  margin-bottom: 25px;
}

.appointment-details div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.appointment-details span {
  color: #718096;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.appointment-details strong {
  color: var(--heading-color);
  font-weight: 700;
  text-align: right;
}

.appointment-card-popup label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #718096;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: block;
}

.appointment-card-popup .form-control {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: #2d3748;
  transition: all 0.2s ease;
  box-shadow: none !important;
}

.appointment-card-popup .form-control::placeholder {
  color: #a0aec0;
}

.appointment-card-popup .form-control:focus {
  border-color: var(--accent-color);
  background-color: var(--surface-color);
}

.appointment-card-popup textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.appointment-card-popup .btn-confirm {
  background-color: var(--heading-color);
  border: none;
  color: var(--contrast-color);
  width: 100%;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 20px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.appointment-card-popup .btn-confirm:hover {
  background-color: var(--accent-color);
}

.appointment-card-popup .btn-confirm:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
}

.appointment-card-popup .loading-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

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

.appointment-card-popup .error-message {
  display: none;
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
}

.appointment-card-popup .sent-message {
  display: none;
  color: #38a169;
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
}
