/* ================================================= */
/* Calendario Flux Agency — Dark Theme               */
/* Colores: #267985 teal, #e8622a coral, #000 bg     */
/* ================================================= */

/* ── Variables ─────────────────────────────────── */
.flux-cal {
  --cal-primary:     #267985;
  --cal-primary-hov: #1e6370;
  --cal-mint:        #b2dfda;
  --cal-coral:       #e8622a;
  --cal-coral-hov:   #d4551f;
  --cal-bg:          #000000;
  --cal-surface:     rgba(255,255,255,0.025);
  --cal-border:      rgba(178,223,218,0.1);
  --cal-border-dim:  rgba(178,223,218,0.06);
  --cal-text:        #ffffff;
  --cal-text-dim:    rgba(255,255,255,0.45);
  --cal-text-muted:  rgba(255,255,255,0.25);
  --cal-error:       #f87171;
  --cal-radius:      18px;
  --cal-input-h:     50px;
  --cal-font:        'Inter', sans-serif;
  --cal-font-brand:  'Sora', sans-serif;
  font-family: var(--cal-font);
}

/* ── Wrapper ────────────────────────────────────── */
.flux-cal {
  width: 100%;
  background: var(--cal-surface);
  border: 1px solid var(--cal-border);
  border-radius: var(--cal-radius);
  overflow: hidden;
  position: relative;
}

/* ── Header bar ─────────────────────────────────── */
.flux-cal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--cal-border-dim);
  background: rgba(255,255,255,0.015);
}
.flux-cal-header-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.flux-cal-header-title {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(178,223,218,0.5);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--cal-font-brand);
}

/* ── Pasos ──────────────────────────────────────── */
.paso-calendario {
  padding: 24px 24px 28px;
  animation: flux-step-in 0.28s cubic-bezier(0.4,0,0.2,1) both;
}
.paso-calendario.oculto   { display: none; }
.paso-calendario.saliendo { animation: flux-step-out 0.28s cubic-bezier(0.4,0,0.2,1) both; }

@keyframes flux-step-in  { from { opacity:0; transform:translateX(14px); } to { opacity:1; transform:none; } }
@keyframes flux-step-out { from { opacity:1; transform:none; } to { opacity:0; transform:translateX(-14px); } }

/* ── Título de paso ─────────────────────────────── */
.flux-paso-titulo {
  font-size: 15px;
  font-weight: 700;
  color: var(--cal-text);
  margin: 0 0 18px;
  font-family: var(--cal-font-brand);
}
.flux-paso-titulo span {
  color: var(--cal-mint);
}

/* ── Navegación mes ─────────────────────────────── */
.flux-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.flux-cal-mes-texto {
  font-size: 14px;
  font-weight: 600;
  color: var(--cal-text);
  letter-spacing: 0.02em;
}
.flux-cal-nav-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--cal-surface);
  border: 1px solid var(--cal-border-dim);
  color: var(--cal-text-dim);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
  line-height: 1;
}
.flux-cal-nav-btn:hover {
  border-color: var(--cal-primary);
  color: var(--cal-mint);
  background: rgba(38,121,133,0.08);
}

/* ── Días de la semana ──────────────────────────── */
.flux-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.flux-cal-weekday {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--cal-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 0;
}

/* ── Grid de días ───────────────────────────────── */
.flux-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.dia-celda {
  aspect-ratio: 1;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cal-text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s ease;
  font-family: var(--cal-font);
  position: relative;
}
.dia-celda:not(.pasado):not(.vacio):hover {
  background: rgba(38,121,133,0.15);
  color: var(--cal-mint);
}
.dia-celda.hoy {
  border: 1px solid rgba(38,121,133,0.45);
  color: var(--cal-mint);
}
.dia-celda.seleccionado {
  background: var(--cal-primary) !important;
  color: #ffffff !important;
  font-weight: 700;
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(38,121,133,0.4);
}
.dia-celda.pasado {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
  text-decoration: line-through;
}
.dia-celda.vacio {
  cursor: default;
  pointer-events: none;
}
.dia-celda.bloqueado {
  opacity: 0.18;
  cursor: default;
  pointer-events: none;
}

/* ── Horarios ───────────────────────────────────── */
.flux-horarios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.flux-horarios-grid::-webkit-scrollbar { width: 4px; }
.flux-horarios-grid::-webkit-scrollbar-track { background: transparent; }
.flux-horarios-grid::-webkit-scrollbar-thumb { background: rgba(38,121,133,0.4); border-radius: 4px; }

.horario-btn {
  padding: 10px 6px;
  background: var(--cal-surface);
  border: 1px solid var(--cal-border-dim);
  border-radius: 10px;
  color: var(--cal-text-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  font-family: var(--cal-font);
}
.horario-btn:hover {
  border-color: var(--cal-primary);
  color: var(--cal-mint);
  background: rgba(38,121,133,0.08);
}
.horario-btn.seleccionado {
  background: var(--cal-primary);
  border-color: var(--cal-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(38,121,133,0.35);
}

/* ── Confirmación chip ──────────────────────────── */
.flux-confirm-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(38,121,133,0.1);
  border: 1px solid rgba(38,121,133,0.25);
  border-radius: 100px;
  padding: 8px 16px;
  margin-bottom: 20px;
}
.flux-confirm-chip-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cal-primary);
  animation: flux-pulse 2s ease-in-out infinite;
}
.flux-confirm-chip-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--cal-mint);
}

@keyframes flux-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.5; transform:scale(0.7); }
}

/* ── Volver ─────────────────────────────────────── */
.flux-btn-volver {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--cal-text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  transition: color 0.2s;
  font-family: var(--cal-font);
}
.flux-btn-volver:hover { color: var(--cal-text); }
.flux-btn-volver svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Botón acción principal ─────────────────────── */
.flux-btn-accion {
  width: 100%;
  padding: 14px;
  background: var(--cal-coral);
  border: none;
  border-radius: 100px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  margin-top: 20px;
  font-family: var(--cal-font);
  box-shadow: 0 0 16px rgba(232,98,42,0.3);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.flux-btn-accion:hover:not(:disabled) {
  background: var(--cal-coral-hov);
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(232,98,42,0.45);
}
.flux-btn-accion:disabled {
  opacity: 0.38;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* ── Spinner ────────────────────────────────────── */
.flux-btn-accion.loading .btn-texto::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: flux-spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes flux-spin { to { transform:rotate(360deg); } }

/* ── Formulario ─────────────────────────────────── */
.flux-form-grupo {
  margin-bottom: 16px;
}
.flux-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 7px;
}
.flux-form-label span.requerido { color: var(--cal-coral); margin-left: 2px; }

.flux-input,
.flux-select,
.flux-textarea {
  width: 100%;
  min-height: var(--cal-input-h);
  background: #0a1214 !important;
  border: 1px solid rgba(178,223,218,0.12);
  border-radius: 12px;
  color: #ffffff !important;
  font-size: 14px;
  font-family: var(--cal-font);
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.flux-input::placeholder,
.flux-textarea::placeholder {
  color: rgba(255,255,255,0.2) !important;
}
.flux-input:focus,
.flux-select:focus,
.flux-textarea:focus {
  border-color: rgba(38,121,133,0.6);
  box-shadow: 0 0 0 3px rgba(38,121,133,0.12);
}
.flux-input.error,
.flux-select.error {
  border-color: rgba(248,113,113,0.45);
  box-shadow: 0 0 0 3px rgba(248,113,113,0.06);
}
/* Override browser autofill white background */
.flux-input:-webkit-autofill,
.flux-input:-webkit-autofill:hover,
.flux-input:-webkit-autofill:focus,
.flux-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 100px #0a1214 inset !important;
  box-shadow: 0 0 0 100px #0a1214 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
}

.flux-select {
  background-color: #0a1214 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(178,223,218,0.45)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.flux-select option {
  background: #0a1214;
  color: #ffffff;
}
.flux-wa-prefix {
  background: #0a1214 !important;
}

.flux-textarea { min-height: 90px; resize: vertical; }

.flux-error-msg {
  font-size: 11px;
  color: var(--cal-error);
  margin-top: 5px;
  display: none;
}
.flux-error-msg.visible { display: block; }

/* ── Grid 2 cols ────────────────────────────────── */
.flux-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .flux-form-row { grid-template-columns: 1fr; }
}

/* ── Servicios checkboxes ───────────────────────── */
.flux-servicios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 400px) {
  .flux-servicios-grid { grid-template-columns: 1fr; }
}

.flux-checkbox-item {
  position: relative;
}
.flux-checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.flux-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(178,223,218,0.07);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
}
.flux-checkbox-label::before {
  content: '';
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 1.5px solid rgba(178,223,218,0.2);
  border-radius: 5px;
  background: rgba(255,255,255,0.03);
  transition: all 0.18s ease;
  margin-top: 1px;
}
.flux-checkbox-item input:checked + .flux-checkbox-label {
  border-color: rgba(38,121,133,0.4);
  background: rgba(38,121,133,0.08);
  color: var(--cal-text);
}
.flux-checkbox-item input:checked + .flux-checkbox-label::before {
  background: var(--cal-primary);
  border-color: var(--cal-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ── Prefijo WhatsApp ───────────────────────────── */
.flux-input-whatsapp-wrap {
  display: flex;
  gap: 0;
  align-items: stretch;
}
.flux-wa-prefix {
  background: rgba(38,121,133,0.08);
  border: 1px solid rgba(178,223,218,0.1);
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 12px 14px;
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  display: flex; align-items: center;
  white-space: nowrap;
  font-family: var(--cal-font);
}
.flux-wa-input {
  border-radius: 0 12px 12px 0 !important;
  flex: 1;
}

/* ── Divider ────────────────────────────────────── */
.flux-divider {
  height: 1px;
  background: var(--cal-border-dim);
  margin: 20px 0;
}

/* ── Mensaje éxito ──────────────────────────────── */
#flux-mensaje-exito {
  padding: 36px 24px;
  text-align: center;
}
.flux-exito-icono {
  width: 64px; height: 64px;
  background: rgba(38,121,133,0.12);
  border: 1px solid rgba(38,121,133,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  animation: flux-bounce-in 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}
.flux-exito-icono svg {
  width: 28px; height: 28px;
  stroke: var(--cal-mint);
  fill: none; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}
@keyframes flux-bounce-in {
  from { opacity:0; transform:scale(0.4); }
  to   { opacity:1; transform:scale(1); }
}
.flux-exito-titulo {
  font-size: 20px;
  font-weight: 700;
  color: var(--cal-text);
  margin: 0 0 8px;
  font-family: var(--cal-font-brand);
}
.flux-exito-sub {
  font-size: 14px;
  color: var(--cal-text-dim);
  margin: 0 0 6px;
  line-height: 1.6;
}
.flux-exito-email {
  font-size: 13px;
  color: var(--cal-mint);
  font-weight: 500;
}
.flux-btn-cerrar-exito {
  margin-top: 24px;
  padding: 10px 28px;
  background: transparent;
  border: 1px solid rgba(178,223,218,0.2);
  border-radius: 100px;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--cal-font);
  transition: all 0.2s;
}
.flux-btn-cerrar-exito:hover {
  border-color: rgba(178,223,218,0.4);
  color: var(--cal-text);
}

/* ── Tooltip botón ──────────────────────────────── */
.flux-tooltip-wrap { position: relative; }
.flux-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  background: rgba(13,26,28,0.97);
  border: 1px solid var(--cal-border-dim);
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.flux-tooltip-wrap:hover .flux-tooltip:not(:empty) { opacity: 1; }

/* ── Sección "otro negocio" ─────────────────────── */
.oculto { display: none !important; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 360px) {
  .paso-calendario { padding: 18px 16px 22px; }
  .flux-horarios-grid { grid-template-columns: repeat(2, 1fr); }
  .flux-servicios-grid { grid-template-columns: 1fr; }
}
