.cdp-confirm .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cdp-booking {
  margin: 0 0 32px;
  padding: 20px 24px 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 58, 108, 0.12);
}

.cdp-booking__title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 800;
}

.cdp-booking__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.cdp-booking .search__filters {
  display: contents;
}

.cdp-booking .custom-select {
  flex: 1 1 180px;
  min-width: 0;
}

.custom-select.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.cdp-booking__row p {
  margin: 0;
  flex: 1 1 160px;
}

.cdp-booking label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.cdp-booking select,
.professional-profile__agenda select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 8px 40px 8px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background-color: #dce6f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23223d6b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M3.2 5.8 8 10.4l4.8-4.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  color: var(--azul-texto, #1e3a6c);
  font: inherit;
  cursor: pointer;
}

.cdp-booking select:focus,
.professional-profile__agenda select:focus {
  outline: 2px solid var(--azul-boton, #2a6fbe);
  outline-offset: 2px;
}

.cdp-booking__submit {
  flex: 0 0 auto;
}

.cdp-results {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cdp-result {
  display: grid;
  gap: 20px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 58, 108, 0.12);
}

.cdp-result img {
  width: 160px;
  height: 200px;
  object-fit: cover;
  object-position: top center;
  border-radius: 14px;
}

/* Loader del calendario: visible mientras el iframe carga o cambia de src. */
.cdp-calendar {
  position: relative;
}

.cdp-calendar__loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 12px;
  background: var(--azul-hielo, #f4f8fc);
  color: #5f6c8b;
  font-size: 13px;
  font-weight: 500;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Cuando el iframe ya cargó, el loader se oculta. */
.cdp-calendar.is-loaded .cdp-calendar__loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cdp-calendar__spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(27, 45, 89, 0.15);
  border-top-color: #3466b0;
  animation: cdp-calendar-spin 0.8s linear infinite;
}

.cdp-calendar__loader-text {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
}

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

@media (prefers-reduced-motion: reduce) {
  .cdp-calendar__spinner {
    animation-duration: 2.4s;
  }
}

.cdp-calendar iframe {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 12px;
  background: var(--azul-hielo, #f4f8fc);
}

.professional-card--listing .cdp-calendar {
  --cdp-calendar-height: 520px;
  position: relative;
  height: var(--cdp-calendar-height);
  min-height: 0;
  overflow: hidden;
}

.professional-card--listing .cdp-calendar iframe {
  width: 100%;
  height: var(--cdp-calendar-height);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  transform: none;
  background: var(--blanco, #fff);
}

.professional-card--listing .cdp-calendar.is-booking-form,
.professional-card--listing .cdp-calendar.is-booking-form iframe {
  overflow-x: hidden;
  overflow-y: auto;
}

.cdp-confirm {
  max-width: 640px;
  margin: 0 auto 48px;
  padding: 28px 28px 24px;
  border-radius: 22px;
  background: var(--blanco, #fff);
  color: var(--azul-texto, #1e3a6c);
  box-shadow: 0 10px 28px rgba(30, 58, 108, 0.12);
}

.cdp-confirm__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
}

.cdp-confirm__lead {
  margin: 0 0 20px;
  color: var(--azul-suave, #5d7aa0);
}

.cdp-confirm__list {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

.cdp-confirm__list > div {
  display: grid;
  gap: 2px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(34, 61, 107, 0.12);
}

.cdp-confirm__list dt {
  font-size: 13px;
  font-weight: 700;
}

.cdp-confirm__list dd {
  margin: 0;
  font-size: 16px;
}

.cdp-confirm__empty {
  margin: 0 0 20px;
}

.cdp-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cdp-confirm__email {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1 1 240px;
}

.cdp-confirm__email input[type="email"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 180px;
  min-height: 46px;
  padding: 8px 16px;
  border: 1px solid #c5d4e8;
  border-radius: 999px;
  background: var(--azul-hielo, #f4f8fc);
  color: var(--azul-texto, #1e3a6c);
  font: inherit;
}

.cdp-confirm__status {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.professional-profile__agenda .cdp-agenda-select {
  position: relative;
  z-index: 4;
  width: 100%;
}

@media (min-width: 768px) {
  .cdp-result {
    grid-template-columns: 160px 1fr minmax(280px, 1fr);
    align-items: start;
  }
}

@media (max-width: 767px) {
  .cdp-confirm__actions,
  .cdp-confirm__email {
    flex-direction: column;
    align-items: stretch;
  }
}

@media print {
  .site-header,
  .site-footer,
  .nav,
  .cookies,
  .cdp-confirm__actions,
  .cdp-confirm__lead,
  .cdp-confirm__status,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .cdp-confirm {
    box-shadow: none;
    max-width: none;
  }
}
