/**
 * Estilos base para reservas públicas
 * Variables CSS, reset, layout principal
 */

:root {
  /* Colores */
  --bg-white: #ffffff;
  --bg-gray-50: #f9fafb;
  --bg-gray-100: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --accent-blue: #054496;
  --accent-blue-light: #e8eef7;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
  background: var(--bg-gray-50);
}

/* Layout principal estilo Cal.com */
.calcom-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
  background: var(--bg-white);
}

/* Sidebar del negocio */
.business-sidebar {
  background: #054496;
  border-right: 1px solid var(--border-color);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.business-logo {
  width: 160px;
  height: auto;
}

.service-title {
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.2;
}

.service-duration {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.service-duration .material-icons {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.service-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.6;
}

/* Layout de la sección de reserva */
.booking-main {
  display: grid;
  grid-template-columns: 1fr 400px;
}

/* Loading y No slots */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.loading .material-icons {
  font-size: 36px;
}

.loading p {
  font-size: 14px;
}

.no-slots {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.no-slots .material-icons {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.no-slots p {
  font-size: 14px;
  line-height: 1.6;
}

/* Animaciones */
.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

/* === MODO EXPRESS (Landing Page Simplificada) === */
body.mode-express .business-sidebar,
body.mode-express .calendar-section {
  display: none !important;
}

body.mode-express .calcom-container {
  display: flex !important;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--bg-gray-50);
  background-image:
    radial-gradient(at 0% 0%, rgba(5, 68, 150, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(5, 68, 150, 0.05) 0px, transparent 50%);
  padding: 20px;
}

body.mode-express .booking-main {
  display: block !important;
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 20px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 20px 25px -5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin: 0;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.mode-express .slots-header {
  background: var(--bg-white);
  color: var(--text-primary);
  padding: 24px 24px 12px;
  text-align: center;
  border-bottom: none;
}

/* Header con logo inyectado */
.express-logo-header {
  background: var(--accent-blue);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.express-logo-header img {
  height: 32px;
  width: auto;
  display: block;
}

body.mode-express #diaSeleccionado {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: capitalize;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

/* Subtítulo dinámico */
body.mode-express .slots-header::after {
  content: "Horarios Disponibles";
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
}

body.mode-express .slots-list {
  padding: 0 24px 32px;
}

/* Diseño de botones de hora estilo App Nativz */
body.mode-express .time-slot-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.mode-express .time-slot-btn::after {
  content: "Reservar";
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-blue);
  background: var(--accent-blue-light);
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s ease;
}

body.mode-express .time-slot-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 16px -4px rgba(5, 68, 150, 0.1);
}

body.mode-express .time-slot-btn:hover::after {
  background: var(--accent-blue);
  color: white;
}

/* Estado Loading centrado y elegante */
body.mode-express .loading {
  padding: 60px 20px;
  min-height: 300px;
}

body.mode-express .loading p {
  color: var(--text-secondary);
  font-weight: 500;
}

@media (max-width: 640px) {
  body.mode-express .calcom-container {
    padding: 0;
    background: white;
  }

  body.mode-express .booking-main {
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}