/* BRB Appointments - Frontend Styles */

/* Botón de reserva */
.brb-appt-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: #123A5A;
  color: #fff;
  text-align: center;
  border-radius: 25px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.3s ease;
  border: none;
  cursor: pointer;
  margin: 0;
}

.brb-appt-btn:hover {
  background: #00b0f0;
}

/* Modal */
.brb-appt-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
}

.brb-appt-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.brb-appt-modal-content {
  position: relative;
  background: #fff;
  max-width: 600px;
  margin: 50px auto;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  z-index: 1000000;
}

.brb-appt-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 10;
}

.brb-appt-modal-close:hover {
  color: #333;
}

.brb-appt-modal-header {
  padding: 30px 30px 20px 30px;
  border-bottom: 1px solid #e9ecef;
}

.brb-appt-modal-header h2 {
  margin: 0 0 10px 0;
  color: #123A5A;
  font-size: 24px;
}

.brb-appt-doctor-name {
  color: #666;
  margin: 0;
  font-size: 14px;
}

.brb-appt-modal-body {
  padding: 30px;
}

/* Pasos */
.brb-appt-step {
  display: none;
}

.brb-appt-step.active {
  display: block;
}

.brb-appt-step h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

/* Calendario */
.brb-appt-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.brb-appt-calendar-day {
  padding: 12px;
  text-align: center;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.brb-appt-calendar-day:hover:not(.disabled) {
  border-color: #00b0f0;
  background: #f0f9ff;
}

.brb-appt-calendar-day.selected {
  background: #00b0f0;
  color: #fff;
  border-color: #00b0f0;
}

.brb-appt-calendar-day.disabled {
  background: #f8f9fa;
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.brb-appt-calendar-day-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: #666;
}

.brb-appt-calendar-day-number {
  font-size: 16px;
  font-weight: 600;
}

/* Slots de horario */
.brb-appt-slots-container {
  min-height: 200px;
}

.brb-appt-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.brb-appt-slot {
  padding: 12px;
  text-align: center;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  font-weight: 600;
  color: #333;
}

.brb-appt-slot:hover {
  border-color: #00b0f0;
  background: #f0f9ff;
}

.brb-appt-slot.selected {
  background: #00b0f0;
  color: #fff;
  border-color: #00b0f0;
}

/* Loading */
.brb-appt-loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

/* Formulario */
.brb-appt-form-group {
  margin-bottom: 20px;
}

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

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

.brb-appt-form-group input:focus,
.brb-appt-form-group textarea:focus {
  outline: none;
  border-color: #00b0f0;
}

/* Resumen */
.brb-appt-summary {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 6px;
  margin: 20px 0;
}

.brb-appt-summary p {
  margin: 8px 0;
  color: #333;
}

/* Acciones del formulario */
.brb-appt-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.brb-appt-back-btn,
.brb-appt-submit-btn,
.brb-appt-close-btn {
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 14px;
}

.brb-appt-back-btn {
  background: #e9ecef;
  color: #333;
}

.brb-appt-back-btn:hover {
  background: #dee2e6;
}

.brb-appt-submit-btn {
  background: #00b0f0;
  color: #fff;
  flex: 1;
}

.brb-appt-submit-btn:hover {
  background: #123A5A;
}

.brb-appt-close-btn {
  background: #123A5A;
  color: #fff;
  width: 100%;
  margin-top: 20px;
}

.brb-appt-close-btn:hover {
  background: #00b0f0;
}

/* Paso de éxito */
.brb-appt-step-success {
  text-align: center;
  padding: 40px 20px;
}

.brb-appt-success-icon {
  width: 80px;
  height: 80px;
  background: #28a745;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto 20px auto;
}

.brb-appt-step-success h3 {
  color: #28a745;
  margin-bottom: 16px;
}

.brb-appt-step-success p {
  color: #666;
  margin: 10px 0;
}

/* Error */
.brb-appt-error {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
  border: 1px solid #f5c6cb;
}

/* Sin slots */
.brb-appt-no-slots {
  text-align: center;
  padding: 40px 20px;
}

.brb-appt-no-slots p {
  color: #666;
  margin-bottom: 20px;
}

/* Página de cancelación */
.brb-appt-cancellation-page {
  padding: 60px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.brb-appt-cancellation-page h1 {
  color: #123A5A;
  margin-bottom: 30px;
}

.brb-appt-cancel-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.brb-appt-cancel-info p {
  margin: 8px 0;
  color: #333;
}

.brb-appt-cancel-warning {
  color: #856404;
  background: #fff3cd;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 20px 0;
  border: 1px solid #ffeeba;
}

.brb-appt-cancel-form {
  display: flex;
  gap: 16px;
  margin-top: 30px;
  align-items: center;
}

.brb-appt-cancel-btn {
  background: #dc3545;
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.brb-appt-cancel-btn:hover {
  background: #c82333;
}

.brb-appt-back-link,
.brb-appt-home-link {
  color: #123A5A;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.brb-appt-back-link:hover,
.brb-appt-home-link:hover {
  color: #00b0f0;
}

.brb-appt-success-message,
.brb-appt-error-message {
  text-align: center;
  padding: 40px 20px;
}

.brb-appt-success-message h1 {
  color: #28a745;
}

.brb-appt-error-message h1 {
  color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
  .brb-appt-modal-content {
    margin: 20px;
    max-height: calc(100vh - 40px);
  }

  .brb-appt-calendar {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }

  .brb-appt-calendar-day {
    padding: 8px 4px;
  }

  .brb-appt-calendar-day-name {
    font-size: 9px;
  }

  .brb-appt-calendar-day-number {
    font-size: 14px;
  }

  .brb-appt-slots {
    grid-template-columns: repeat(2, 1fr);
  }

  .brb-appt-modal-header,
  .brb-appt-modal-body {
    padding: 20px;
  }

  .brb-appt-cancel-form {
    flex-direction: column;
  }

  .brb-appt-cancel-btn {
    width: 100%;
  }
}
