/* =========================================================
   TOTAL CLEAN — Wizard CSS (LIMPIO)
   Basado en ex-wizard.css actual, reorganizado y sin duplicados
   ========================================================= */

/* -------------------------
   Layout general
-------------------------- */
.ex-wizard2{
  max-width:1600px;
  margin:0 auto;
  padding:18px;
}

.ex-grid{
  display:grid;
  grid-template-columns:1.6fr .9fr;
  gap:22px;
  align-items:start;
}

@media (max-width:980px){
  .ex-grid{ grid-template-columns:1fr; }
  .ex-right{ position:static; }
}

/* Asegura que el contenido no fuerce overflow horizontal */
.ex-grid > *{ min-width:0; }

/* -------------------------
   Hero
-------------------------- */
.ex-hero{
  border-radius:18px;
  padding:34px;
  background:#2157e1;
  color:#fff;
  margin-bottom:22px;
}
.ex-hero h1{
  margin:0;
  font-size:44px;
  line-height:1.05;
}
.ex-hero p{
  margin-top:10px;
  opacity:.9;
  max-width:760px;
}

/* -------------------------
   Cards / steps
-------------------------- */
.ex-cardstep{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  padding:18px;
  box-shadow:0 6px 22px rgba(0,0,0,.05);
  margin:0 0 20px 0;
}

.ex-stephead{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.ex-stepnum{
  width:28px;
  height:28px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.06);
  font-weight:700;
}

.ex-row{ margin-top:12px; }
.ex-row label{
  display:block;
  font-weight:600;
  margin-bottom:6px;
}
.ex-row input,
.ex-row select{
  width:100%;
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
}

.ex-hint{ opacity:.75; margin-top:8px; }
.ex-muted{ opacity:.75; margin-top:6px; }
.ex-small{ font-size:12px; }

/* -------------------------
   Errores / mensajes
-------------------------- */
.ex-errors{
  margin-top:10px;
  padding:12px;
  border:1px solid rgba(200,0,0,.20);
  background:rgba(200,0,0,.05);
  border-radius:14px;
}

/* -------------------------
   Lightbox Catastro
-------------------------- */
.ex-lightbox{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.ex-lightbox.is-open{ display:flex; }
.ex-lightbox__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.35);
  backdrop-filter:blur(6px);
}
.ex-lightbox__panel{
  position:relative;
  background:#fff;
  border-radius:16px;
  padding:20px;
  width:min(920px, 92vw);
  max-height:86vh;
  overflow:auto;
  box-shadow:0 18px 50px rgba(0,0,0,.25);
}
.ex-lightbox__close{
  position:absolute;
  top:18px;
  right:18px;
  border:none;
  background:transparent;
  font-size:24px;
  cursor:pointer;
  width:36px;
  height:36px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  transition:background .2s ease, color .2s ease;
  z-index:2;
}

.ex-lightbox__close:hover{
  background:#f1f5f9;
  color:#0f172a;
}

.ex-catastro__steps{
  margin-right:52px;
}

/* -------------------------
   Lightbox (cambiar hora)
-------------------------- */
.ex-time-lightbox .ex-lightbox__panel{
  width: min(420px, 92vw);
  padding: 18px;
}

/* -------------------------
   Lightbox (continuar)
-------------------------- */
.ex-continue-lightbox .ex-lightbox__panel{
  width:min(560px, 92vw);
  padding:24px 22px 20px;
}

.ex-continue-modal__icon{
  width:38px;
  height:38px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e6f0ff;
  color:#2157e1;
  font-weight:700;
  margin-bottom:12px;
}

.ex-continue-lightbox h3{
  margin:0 0 8px 0;
}

.ex-continue-lightbox p{
  margin:0;
  color:#334155;
}

.ex-continue-modal__list{
  margin:14px 0 0;
  padding-left:18px;
  color:#1e293b;
}

.ex-continue-modal__list li{
  margin:0 0 6px;
}

.ex-continue-modal__actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
  flex-wrap:wrap;
}

.ex-continue-modal__btn{
  border-radius:12px;
  border:1px solid rgba(15,23,42,.14);
  padding:10px 14px;
  cursor:pointer;
  font-weight:600;
}

.ex-continue-modal__btn--ghost{
  background:#fff;
  color:#0f172a;
}

.ex-continue-modal__btn--primary{
  background:#2157e1;
  border-color:#2157e1;
  color:#fff;
}

.ex-availability-lightbox{
  z-index:10020;
}

.ex-availability-lightbox .ex-lightbox__panel{
  width:min(420px, 92vw);
  padding:20px;
}

.ex-availability-loader{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:10px;
}

.ex-availability-loader h3{
  margin:0;
  font-size:20px;
  color:#0f172a;
}

.ex-availability-loader p{
  margin:0;
  color:#475569;
}

.ex-availability-loader__spinner{
  width:44px;
  height:44px;
  border-radius:999px;
  border:4px solid #dbeafe;
  border-top-color:#2157e1;
  animation:ex-spin .8s linear infinite;
}

@keyframes ex-spin{
  from { transform:rotate(0deg); }
  to { transform:rotate(360deg); }
}

@media (max-width:640px){
  .ex-continue-modal__actions{
    display:grid;
    grid-template-columns:1fr;
  }
}

.ex-time-modal{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.ex-time-modal__choices{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.ex-time-modal__actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:4px;
}
.ex-time-select{
  width:auto;
  min-width:160px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
}

/* -------------------------
   Catastro (wizard)
-------------------------- */
.ex-catastro{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.ex-catastro__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.ex-catastro__body{
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:16px;
}

.ex-catastro__steps{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.ex-catastro__step{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:999px;
  background:#f3f4f6;
  color:#6b7280;
  font-size:12px;
  font-weight:600;
}

.ex-catastro__step span{
  width:22px;
  height:22px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e5e7eb;
  font-size:12px;
  font-weight:700;
  color:#6b7280;
}

.ex-catastro__step.is-active{
  background:#e8f2ff;
  color:#2157e1;
}

.ex-catastro__step.is-active span{
  background:#2157e1;
  color:#fff;
}

.ex-catastro__step.is-done{
  background:#ecfdf3;
  color:#15803d;
}

.ex-catastro__step.is-done span{
  background:#16a34a;
  color:#fff;
}

.ex-catastro__stage{
  display:none;
}

.ex-catastro__stage.is-active{
  display:block;
}

.ex-catastro__grid{
  grid-template-columns:1fr 1fr;
  gap:12px;
  align-items:end;
}

.ex-catastro label{
  font-weight:600;
  color:#0f172a;
}

.ex-catastro input,
.ex-catastro select,
.ex-catastro textarea{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.16);
  background:#fff;
  color:#0f172a;
  box-shadow:0 1px 0 rgba(15,23,42,.03);
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ex-catastro input:focus,
.ex-catastro select:focus,
.ex-catastro textarea:focus{
  outline:none;
  border-color:#2157e1;
  box-shadow:0 0 0 4px rgba(11,99,255,.12);
}

.ex-catastro input::placeholder{
  color:#94a3b8;
}

.ex-catastro .button{
  border-radius:12px;
  padding:10px 16px;
  font-weight:600;
  color:#0f172a !important;
  border:1px solid rgba(15,23,42,.14);
  background:#fff;
  box-shadow:0 4px 10px rgba(15,23,42,.06);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.ex-catastro .button:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(15,23,42,.12);
  border-color:rgba(15,23,42,.2);
}

.ex-catastro .button.button-primary{
  background:linear-gradient(135deg, #2157e1 0%, #1e88ff 100%);
  border-color:rgba(11,99,255,.3);
  color:#fff !important;
  box-shadow:0 10px 22px rgba(11,99,255,.22);
}

.ex-catastro .button.button-primary:hover{
  box-shadow:0 14px 26px rgba(11,99,255,.28);
}

.ex-catastro__nav{
  justify-content:space-between;
  margin-top:16px;
}

.ex-catastro__results{
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.08);
  background:#f9fafb;
}

.ex-catastro__picked input[readonly]{
  background:#f8fafc;
}

.ex-catastro__cons{
  margin-top:12px;
  font-size:0.9em;
  line-height:1.4;
}

.ex-catastro__details{
  margin-top:12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.08);
  padding:10px 12px;
  background:#fff;
}

.ex-catastro__details summary{
  cursor:pointer;
  font-weight:600;
}

.ex-catastro__details[open] summary{
  margin-bottom:10px;
}

.ex-catastro-launch{
  align-items:center;
  flex-wrap:wrap;
}

.ex-catastro-btn{
  background:linear-gradient(135deg, #2157e1 0%, #1e88ff 100%) !important;
  color:#fff !important;
  border:1px solid rgba(11, 99, 255, 0.2) !important;
  box-shadow:0 8px 18px rgba(11, 99, 255, 0.18);
  padding:10px 16px;
  border-radius:12px;
  font-weight:600;
}

.ex-catastro-btn:hover{
  box-shadow:0 10px 22px rgba(11, 99, 255, 0.25);
  transform:translateY(-1px);
}

.ex-catastro-btn:active{
  transform:translateY(0);
  box-shadow:0 6px 14px rgba(11, 99, 255, 0.18);
}

.ex-radius-alert{
  margin:10px 0 0 0;
  padding:12px 14px;
  border-radius:12px;
  background:rgba(239, 68, 68, 0.08);
  border:1px solid rgba(239, 68, 68, 0.35);
  color:#b91c1c;
  font-weight:700;
  font-size:13px;
  display:none;
}

.ex-radius-alert.is-active{
  display:block;
  animation:ex-radius-blink 1.4s ease-in-out infinite;
  box-shadow:0 0 0 0 rgba(239, 68, 68, 0.4);
}

@keyframes ex-radius-blink{
  0%{ box-shadow:0 0 0 0 rgba(239,68,68,0.45); opacity:1; }
  60%{ box-shadow:0 0 0 10px rgba(239,68,68,0); opacity:0.85; }
  100%{ box-shadow:0 0 0 0 rgba(239,68,68,0); opacity:1; }
}

@media (prefers-reduced-motion: reduce){
  .ex-radius-alert.is-active{ animation:none; }
}

@media (max-width:720px){
  .ex-catastro__grid{ grid-template-columns:1fr; }
  .ex-catastro__nav{ justify-content:flex-start; }
  .ex-catastro__nav .button{ width:100%; }
  .ex-catastro__steps{ width:100%; }
}

/* -------------------------
   Calendario: vacaciones
-------------------------- */
.ex-day.is-vacation{
  opacity:.35;
  pointer-events:none;
}

/* -------------------------
   Botones
-------------------------- */
.ex-cta{
  width:100%;
  margin-top:12px;
  padding:14px;
  border-radius:14px;
  border:none;
  background:#2157e1;
  color:#fff;
  cursor:pointer;
  font-weight:700;
}

.ex-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:14px;
}
.ex-actions button{
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
}
.ex-actions button#ex_next,
.ex-actions button#ex_next_2,
.ex-actions button#ex_next_3,
.ex-actions button#ex_next_4,
.ex-actions button#ex_confirm{
  background:#2157e1;
  color:#fff;
  border-color:transparent;
}

/* -------------------------
   Sidebar resumen
-------------------------- */
.ex-right{
  position:sticky;
  top:18px;
}

.ex-summarycard{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  padding:18px;
  box-shadow:0 6px 22px rgba(0,0,0,.05);
  margin:0 0 20px 0;
}

.ex-sumrows{ margin-top:14px; }

/* Compatibilidad: tu HTML actual usa .ex-srow/.ex-skey/.ex-sval */
.ex-srow{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:8px 0;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.ex-srow:last-child{ border-bottom:none; }

.ex-skey{
  font-size:13px;
  opacity:.75;
}
.ex-sval{
  font-size:13px;
  font-weight:700;
  text-align:right;
}

.ex-sumprice{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(0,0,0,.08);
  font-size:22px;
  font-weight:800;
}

/* Bloques de precio (si el JS los pinta) */
.ex-price-total{
  font-size:28px;
  font-weight:700;
  line-height:1.1;
}
.ex-price-sub{
  margin-top:6px;
  opacity:.7;
  font-size:13px;
  line-height:1.25;
}
.ex-price-unit{
  font-size:14px;
  font-weight:600;
  opacity:.75;
}

/* Desglose opcional */
#ex_side_price .ex-price-breakdown{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(0,0,0,.08);
  font-size:13px;
  line-height:1.25;
  opacity:.9;
}
#ex_side_price .ex-price-breakdown .ex-price-line{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin:4px 0;
}
#ex_side_price .ex-price-breakdown .ex-price-line span:first-child{
  opacity:.8;
  font-weight:500;
}
#ex_side_price .ex-price-breakdown .ex-price-line span:last-child{
  font-weight:600;
  white-space:nowrap;
}
#ex_side_price strong{ font-weight:600; }

/* -------------------------
   Módulo 1: Modalidad (segmentado)
-------------------------- */
.ex-mod .ex-modgrid{
  display:flex;
  gap:12px;
  margin-top:12px;
  padding:10px;
  background:#f1f4f8;
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
}

.ex-mod .ex-modopt{
  flex:1;
  margin:0;
  cursor:pointer;
}

.ex-mod .ex-modopt input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.ex-mod .ex-modbox{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  min-height:56px;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  transition: box-shadow .12s ease, border-color .12s ease, transform .12s ease;
}

.ex-mod .ex-modtitle{
  font-weight:700;
  line-height:1.1;
}

.ex-mod .ex-modtext{
  opacity:.70;
  font-size:13px;
  line-height:1.2;
}

.ex-mod .ex-modopt input:checked + .ex-modbox{
  border-color: #baf8ff;
  box-shadow: 0 0 0 3px rgba(11,99,255,.12);
}

.ex-mod .ex-modhint{
  margin-top:10px;
  font-size:13px;
  opacity:.75;
}

/* -------------------------
   Módulo 2: Espacios (cards)
-------------------------- */
.ex-spacegrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:12px;
}

/* En el wizard nuevo, el módulo espacios usa 3 columnas en desktop */
.ex-space .ex-spacegrid{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width:980px){
  .ex-space .ex-spacegrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width:520px){
  .ex-space .ex-spacegrid{ grid-template-columns: 1fr; }
}

.ex-spacecard{
  text-align:left;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  background:#fff;
  padding:10px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  position:relative;
  overflow:hidden;
}

.ex-spacecard:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  background:#d3d5d9;
}

.ex-spacecard.is-disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* Selección: soporta is-selected y is-active */
.ex-spacecard.is-selected,
.ex-spacecard.is-active{
  border-color:#2157e1;
  box-shadow: 0 0 0 3px rgba(11,99,255,.12);
  background:#f5f7fa;
}

/* Check esquina (sin iconos externos) */
.ex-spacecard.is-selected::after,
.ex-spacecard.is-active::after{
  content:"";
  position:absolute;
  top:12px;
  right:12px;
  width:24px;
  height:24px;
  border-radius:999px;
  background:#2157e1;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.ex-spacecard.is-selected::before,
.ex-spacecard.is-active::before{
  content:"";
  position:absolute;
  top:19px;
  right:19px;
  width:10px;
  height:6px;
  border-left:2px solid #fff;
  border-bottom:2px solid #fff;
  transform: rotate(-45deg);
  z-index:2;
}

.ex-spaceimg{
  width:100%;
  height:140px;
  border-radius:12px;
  background-size:cover;
  background-position:center;
  background-color:#f2f2f2;
  position:relative;
  overflow:hidden;
}

.ex-spaceimg__label{
  position:absolute;
  left:8px;
  right:8px;
  bottom:8px;
  background:rgba(0,0,0,.55);
  color:#fff;
  padding:6px 8px;
  border-radius:8px;
  font-size:13px;
  font-weight:600;
  text-shadow:0 1px 2px rgba(0,0,0,.25);
}

.ex-spacename{
  margin-top:10px;
  font-weight:700;
  text-align:center;
  color:#111827;
}
.ex-spacename__text{ color:#111827; }
.ex-space-sub{
  display:block;
  font-size:12px;
  font-weight:500;
  color:#6b7280;
  margin-top:4px;
}

/* -------------------------
   Tooltip (ÚNICO)
   Usa data-tip en el span.ex-tooltip
-------------------------- */
.ex-spacegrid,
.ex-spacecard,
.ex-spacename{
  overflow: visible;
}

.ex-tooltip{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(0,0,0,.06);
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
  z-index: 5;
}

.ex-tooltip::before{ content: "i"; }

.ex-tooltip::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(4px);
  width: 280px;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 999;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.ex-tooltip:hover::after,
.ex-tooltip:focus::after{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* -------------------------
   Módulo 3: Tipo de limpieza
-------------------------- */
.ex-choicegrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:12px;
}
@media (max-width:720px){
  .ex-choicegrid{ grid-template-columns:1fr; }
}

.ex-choice input{ display:none; }

.ex-choicebox{
  border:1px solid rgba(0,0,0,.12);
  border-radius:16px;
  padding:14px;
  cursor:pointer;
  min-height:120px;
}

.ex-choicetag{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
  font-weight:600;
  font-size:18px;
  margin-bottom:10px;
}

.ex-choicetext{ margin-top:6px; opacity:.75; }

.ex-choice input:checked + .ex-choicebox{
  border-color:#2157e1;
  box-shadow:0 0 0 3px rgba(11,99,255,.12);
}

/* -------------------------
   Calendario
-------------------------- */
.ex-cal{
  margin-top:12px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  padding:12px;
}

.ex-calhead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.ex-calnav button{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
}

.ex-calgrid{
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:8px;
}

.ex-day{
  padding:10px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  cursor:pointer;
  text-align:center;
  position: relative;
}

.ex-day.is-disabled{
  opacity:.35;
  cursor:not-allowed;
}

.ex-day.is-selected{
  border-color:#2157e1;
  box-shadow:0 0 0 3px rgba(11,99,255,.12);
}

/* Disponibilidad (colores suaves) */
#ex_cal_grid .ex-day.is-available{
  background:#DEF4F7;
  border-color:#b8d7ff;
}
#ex_cal_grid .ex-day.is-warning{
  background:#fff3e0;
  border-color:#ffd199;
}
#ex_cal_grid .ex-day.is-full{
  background:#ffe9e9;
  border-color:#ffb3b3;
}

.ex-day small{
  display:block;
  opacity:.7;
  margin-top:4px;
  font-size:11px;
}

/* -------------------------
   Citas (appointments)
-------------------------- */
.ex-appointments{ margin-top:14px; }

.ex-appt-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.ex-appt-row select{
  width:auto;
  min-width:140px;
}

.ex-check{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:12px;
}

/* -------------------------
   Mapa (Leaflet) — evitar que “se coma” capas externas
-------------------------- */
#ex_map,
#ex_map .leaflet-container{
  position: relative;
  z-index: 1;
}

#ex_map .leaflet-control-container{
  z-index: 2;
  position: relative;
}
/* =========================
   HARDENING Calendario + Citas
   (evita que el theme meta estilos rosa/outline)
========================= */

/* Calendario: asegurar estilo aunque sean botones sin clase */
#ex_cal_grid button,
#ex_cal_grid .ex-day{
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  color: inherit;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  line-height: 1.1;
  font: inherit;
}

#ex_cal_grid button:hover,
#ex_cal_grid .ex-day:hover{
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  transform: translateY(-1px);
}

#ex_cal_grid button:focus,
#ex_cal_grid .ex-day:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(11,99,255,.12);
}

/* Estado disabled: soporte para class o atributo */
#ex_cal_grid button.is-disabled,
#ex_cal_grid .ex-day.is-disabled,
#ex_cal_grid button:disabled{
  opacity: .35;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Estado seleccionado (class típica) */
#ex_cal_grid button.is-selected,
#ex_cal_grid .ex-day.is-selected{
  border-color:#2157e1;
  box-shadow: 0 0 0 3px rgba(11,99,255,.12);
}

/* Tooltip en días deshabilitados */
#ex_cal_grid .ex-day[data-tip]::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(4px);
  width: 240px;
  max-width: 240px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 12px 28px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

#ex_cal_grid .ex-day[data-tip]:hover::after,
#ex_cal_grid .ex-day[data-tip]:focus::after{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Si tu JS mete un <small> dentro */
#ex_cal_grid small{
  display:block;
  opacity:.7;
  margin-top:4px;
  font-size:11px;
}

/* Citas: maqueta robusta aunque el JS no ponga .ex-appt-row */
#ex_appointments_list > *{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

#ex_appointments_list .ex-appt-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

/* Si hay selects dentro (hora) */
#ex_appointments_list select{
  width:auto;
  min-width:140px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
}

/* Botón quitar: aunque venga sin clase */
#ex_appointments_list button{
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

#ex_appointments_list button:hover{
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  transform: translateY(-1px);
}
/* Selector hora (calendar) */
#ex_time_picker{
  margin: 10px 0 12px;
}

#ex_time_picker .ex-time-ui{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  flex-wrap:wrap;
}

#ex_time_picker .ex-time-title{
  font-weight:600;
  font-size:14px;
  color:#222;
  margin:0;
}

#ex_time_picker .ex-time-select{
  padding:8px 12px;
  font-size:14px;
  line-height:1;
  border-radius:12px;
  border:1px solid #e6e6e6;
  background:#fff;
  color:#222;
}

/* Móvil */
@media (max-width: 767px){
  #ex_time_picker .ex-time-ui{
    justify-content:space-between;
  }
  #ex_time_picker .ex-time-select{
    min-width:140px;
  }
}

/* -------------------------
   Ajustes móviles (evitar cards cortadas)
-------------------------- */
@media (max-width:720px){
  .ex-wizard2{ padding:12px; }
  .ex-cardstep,
  .ex-summarycard{
    padding:14px;
    border-radius:16px;
    box-sizing:border-box;
  }
  .ex-mod .ex-modgrid{ flex-direction:column; }
  .ex-mod .ex-modbox,
  .ex-choicebox{
    min-height:auto;
  }
  .ex-spaceimg{ height:120px; }
}

@media (max-width:520px){
  .ex-wizard2{ padding:10px; }
  .ex-cardstep,
  .ex-summarycard,
  .ex-spacecard,
  .ex-choicebox,
  .ex-mod .ex-modbox{
    width:100%;
    box-sizing:border-box;
  }
}
