/**
 * Iunia Premium Booking — EmpirePsi ultra-compact v1.3.0
 */

/* Vars on overlay AND inline desk — dialog is moved out of .ib-overlay in page mode */
.ib-overlay,
.ib-inline-desk,
.ib-dialog {
  --ib-plum: var(--eps-plum, #4e2a4e);
  --ib-plum-deep: var(--eps-plum-deep, #3a1f3a);
  --ib-ink: var(--eps-text, #3a2a38);
  --ib-muted: var(--eps-muted, #6b5a68);
  --ib-mauve: var(--eps-mauve, #c18da2);
  --ib-border: var(--eps-mauve-soft, #e8d5dc);
  --ib-cream: var(--eps-cream, #faf6f4);
  --ib-cream-deep: var(--eps-cream-deep, #f3ebe7);
  --ib-blush: rgba(193, 141, 162, 0.16);
  --ib-font: var(--eps-font-body, "Outfit", system-ui, sans-serif);
  --ib-serif: var(--eps-font-display, "Fraunces", Georgia, serif);
  --ib-ease: var(--eps-ease, cubic-bezier(0.22, 1, 0.36, 1));
  --ib-day: 24px;
  --ib-ctl: 32px;
  --ib-slot: 20px;
  --ib-pad: 6px;
  --ib-gap: 6px;
}

.iunia-booking-trigger {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--ib-plum, #4e2a4e);
  color: #fff;
  padding: 12px 18px;
  font: 600 14px/1.2 var(--eps-font-body, "Outfit", system-ui, sans-serif);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(78, 42, 78, 0.16);
  transition: transform 0.18s ease, background 0.18s ease;
}
.iunia-booking-trigger:hover {
  background: var(--eps-plum-deep, #3a1f3a);
  transform: translateY(-1px);
}

.ib-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  justify-items: center;
  align-content: center;
  padding: 12px;
  padding-top: calc(12px + var(--wp-admin--admin-bar--height, 0px));
  background:
    radial-gradient(ellipse at 12% 18%, rgba(232, 160, 188, 0.22), transparent 42%),
    radial-gradient(ellipse at 88% 82%, rgba(196, 93, 138, 0.16), transparent 48%),
    rgba(42, 26, 40, 0.58);
  /* no backdrop-filter — blurs warp the page behind and look like distortion */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  overflow: hidden;
}
.ib-overlay[hidden] {
  display: none !important;
}
.ib-overlay.is-open {
  display: grid;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* Reserve scrollbar space so opening the modal does not shove the page left. */
html {
  scrollbar-gutter: stable;
}
html.ib-lock,
body.ib-lock {
  overflow: hidden !important;
}
body.ib-lock {
  padding-right: var(--ib-sb, 0px);
}

/* Touch scroll must work inside the open booking modal on tablet/mobile. */
.ib-overlay.is-open .ib-dialog,
.ib-overlay.is-open .ib-flow,
.ib-overlay.is-open .ib-slots-scroll,
.ib-overlay.is-open .ib-form-card {
  touch-action: pan-y;
}
/* Fixed chrome must follow the same scrollbar compensation */
body.ib-lock .eps-header,
body.ib-lock .eps-topbar {
  padding-right: var(--ib-sb, 0px);
}

/* Floral atmosphere behind dialog */
.ib-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ib-atmosphere__bloom {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}
.ib-atmosphere__bloom--a {
  width: min(48vw, 360px);
  height: min(48vw, 360px);
  top: -8%;
  left: -6%;
  background: radial-gradient(circle, rgba(243, 196, 212, 0.7), transparent 68%);
  animation: ib-aurora 14s ease-in-out infinite;
}
.ib-atmosphere__bloom--b {
  width: min(40vw, 300px);
  height: min(40vw, 300px);
  right: -8%;
  bottom: -4%;
  background: radial-gradient(circle, rgba(196, 93, 138, 0.35), transparent 70%);
  animation: ib-aurora 16s ease-in-out infinite reverse;
}
.ib-atmosphere__bloom--c {
  width: min(28vw, 200px);
  height: min(28vw, 200px);
  left: 42%;
  top: 38%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 70%);
  animation: ib-aurora 12s ease-in-out infinite;
}
.ib-atmosphere__petal {
  position: absolute;
  width: 14px;
  height: 20px;
  border-radius: 60% 60% 55% 55%;
  background: radial-gradient(circle at 30% 30%, #f3c4d4, #c45d8a 75%);
  opacity: 0.55;
  animation: ib-petal 16s linear infinite;
}
.ib-atmosphere__petal--1 { top: 16%; left: 18%; animation-delay: 0s; }
.ib-atmosphere__petal--2 { top: 28%; right: 14%; width: 11px; height: 16px; animation-delay: 3s; animation-duration: 18s; }
.ib-atmosphere__petal--3 { bottom: 22%; left: 12%; width: 10px; height: 15px; animation-delay: 6s; }
.ib-atmosphere__petal--4 { top: 58%; right: 22%; width: 9px; height: 13px; animation-delay: 9s; animation-duration: 17s; }
.ib-atmosphere__mark {
  position: absolute;
  inset: 0;
  background-size: min(72vw, 720px) auto;
  background-repeat: no-repeat;
  background-position: center 42%;
  opacity: 0.07;
  filter: grayscale(0.05);
  transition: opacity 0.25s ease;
}
.ib-overlay.is-done .ib-atmosphere__mark {
  opacity: 0 !important;
  visibility: hidden !important;
  background-image: none !important;
}
.ib-overlay.is-done .ib-atmosphere__petal {
  opacity: 0;
  animation: none;
}

@keyframes ib-aurora {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(16px, -12px, 0) scale(1.06); }
}
@keyframes ib-petal {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.6; }
  80% { opacity: 0.25; }
  100% { transform: translate3d(36px, 100px, 0) rotate(42deg); opacity: 0; }
}

.ib-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(980px, calc(100vw - 24px));
  max-width: 980px;
  margin: 0 auto;
  max-height: calc(100dvh - 20px - var(--wp-admin--admin-bar--height, 0px));
  overflow: hidden;
  overscroll-behavior: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(165deg, rgba(255, 252, 250, 0.97) 0%, rgba(250, 246, 244, 0.98) 48%, rgba(243, 235, 231, 0.98) 100%);
  color: var(--ib-ink);
  font-family: var(--ib-font);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45) inset,
    0 22px 56px rgba(58, 31, 58, 0.3);
  scrollbar-width: thin;
  scrollbar-color: rgba(193, 141, 162, 0.65) transparent;
  transform: translateY(10px);
  opacity: 0.92;
  transition: transform 0.28s var(--ib-ease), opacity 0.28s ease;
}
.ib-overlay.is-open .ib-dialog {
  transform: none;
  opacity: 1;
}
.ib-dialog * {
  box-sizing: border-box;
}

/* Right-edge gem — removed */
.ib-gem {
  display: none !important;
}

.ib-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 7;
  width: 36px;
  height: 36px;
  margin: 0;
  border: 1px solid var(--ib-border);
  border-radius: 999px;
  background: rgba(250, 246, 244, 0.92);
  color: var(--ib-plum);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(78, 42, 78, 0.08);
  transition: transform 0.16s var(--ib-ease), background 0.16s ease;
}
.ib-close:hover {
  transform: scale(1.05);
  background: #fff;
}
.ib-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

/* —— Header + floral watermark —— */
.ib-flow {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 95, 120, 0.55) transparent;
}

.ib-header {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: 8px 40px 4px;
  overflow: hidden;
  flex: 0 0 auto;
}
.ib-flora {
  display: none !important;
}
.ib-flora::after {
  content: none;
}
.ib-header h2,
.ib-header__lead,
.ib-stepper {
  position: relative;
  z-index: 1;
}
.ib-eyebrow {
  display: none !important;
}
.ib-header h2 {
  margin: 0;
  font-family: var(--ib-serif);
  font-size: clamp(18px, 1.9vw, 22px);
  line-height: 1.08;
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--ib-plum);
}

.ib-header__lead {
  margin: 0.12rem 0 0;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ib-muted);
}

.ib-dates-title,
.ib-form-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--ib-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ib-dates-title::before,
.ib-dates-title::after,
.ib-form-card__title::before,
.ib-form-card__title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--ib-border);
}

.ib-form-card__title {
  margin-bottom: 10px;
}

/* —— Stepper + floral vine —— */
.ib-stepper {
  width: min(280px, 100%);
  margin: 4px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: start;
  gap: 2px;
}
.ib-stepper > i {
  display: none;
}
.ib-step-vine {
  display: block;
  height: 22px;
  margin-top: 1px;
  min-width: 0;
}
.ib-step-vine svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ib-step-vine__path {
  fill: none;
  stroke: url(#ibVineGrad);
  stroke: #d4a8b8;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-dasharray: 3 5;
  animation: ib-vine-draw 2.8s ease-in-out infinite alternate;
}
.ib-step-vine__bud {
  fill: #c45d8a;
  opacity: 0.85;
}
@keyframes ib-vine-draw {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 12; }
}
.ib-step {
  min-width: 52px;
  text-align: center;
  color: var(--ib-muted);
}
.ib-step span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 auto 5px;
  border: 1.5px solid var(--ib-border);
  border-radius: 50%;
  background: var(--ib-cream);
  font-size: 12px;
  font-weight: 700;
  color: var(--ib-ink);
  box-shadow: 0 2px 8px rgba(78, 42, 78, 0.06);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ib-step b {
  display: block;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.ib-step.is-active {
  color: var(--ib-plum);
}
.ib-step.is-active span {
  background: linear-gradient(145deg, #5a3358, var(--ib-plum-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(78, 42, 78, 0.22);
}

/* —— Layout —— */
.ib-main {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: var(--ib-gap);
  align-items: stretch;
  padding: 0 var(--ib-pad) var(--ib-pad);
  flex: 1 1 auto;
  min-height: auto;
  overflow: visible;
  align-items: start;
}
.ib-card {
  min-width: 0;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid var(--ib-border);
  border-radius: 14px;
  background: rgba(250, 246, 244, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.ib-calendar-card {
  background: rgba(250, 246, 244, 0.78);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.ib-form-card {
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.ib-form-card form {
  min-height: 0;
}

/* —— Calendar —— */
.ib-calendar-head {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.ib-calendar-head h3 {
  margin: 0;
  text-align: center;
  font-family: var(--ib-serif);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 560;
  color: var(--ib-plum);
  text-transform: capitalize;
}
.ib-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--ib-border);
  border-radius: 50%;
  background: var(--ib-cream);
  color: var(--ib-plum);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ib-icon-btn:hover {
  background: #f6ecef;
}
.ib-icon-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ib-weekdays,
.ib-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
}
.ib-weekdays {
  margin-bottom: 2px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(232, 213, 220, 0.85);
}
.ib-weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ib-muted);
  line-height: 22px;
  border-radius: 6px;
}
/* SÂ + DU labels — text only, no column strip */
.ib-weekdays span:nth-child(6),
.ib-weekdays span:nth-child(7) {
  color: #9a5f78;
  background: transparent;
}
.ib-day {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 8px;
  height: var(--ib-day);
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ib-ink);
  font-size: 12px;
  font-weight: 560;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.ib-day:hover:not(:disabled) {
  background: rgba(193, 141, 162, 0.22);
  color: var(--ib-plum);
}
.ib-day.is-weekend:not(.is-selected) {
  background: rgba(243, 196, 212, 0.42);
  color: #7a4f68;
}
.ib-day.is-selected {
  background: var(--ib-plum) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(78, 42, 78, 0.2);
}
.ib-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px rgba(193, 141, 162, 0.8);
}
.ib-day:disabled {
  opacity: 0.28;
  cursor: default;
}
.ib-day.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.ib-times-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
  color: var(--ib-muted);
  font-size: 11px;
  font-weight: 650;
}
.ib-times-title::before,
.ib-times-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--ib-border);
}
.ib-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.ib-slots-scroll-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ib-slots-hint {
  display: none;
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ib-muted);
  text-align: center;
}

.ib-slots-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 95, 120, 0.72) rgba(232, 213, 220, 0.45);
  padding: 4px 6px 4px 4px;
  border: 1px solid rgba(232, 213, 220, 0.95);
  border-radius: 10px;
  background: rgba(255, 252, 250, 0.72);
}

.ib-slots-scroll::-webkit-scrollbar {
  width: 8px;
}

.ib-slots-scroll::-webkit-scrollbar-track {
  background: rgba(232, 213, 220, 0.45);
  border-radius: 999px;
}

.ib-slots-scroll::-webkit-scrollbar-thumb {
  background: rgba(154, 95, 120, 0.72);
  border-radius: 999px;
  border: 2px solid rgba(250, 246, 244, 0.85);
}

.ib-slots-scroll-wrap::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 10px;
  bottom: 1px;
  height: 18px;
  border-radius: 0 0 9px 9px;
  background: linear-gradient(180deg, rgba(255, 252, 250, 0), rgba(250, 246, 244, 0.96));
  pointer-events: none;
}

.ib-slots--compact {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
.ib-slots--compact .ib-slot {
  height: var(--ib-slot);
  font-size: 8.5px;
  letter-spacing: 0;
  border-radius: 5px;
  padding: 0 1px;
}
.ib-slot {
  height: var(--ib-slot);
  border: 1px solid var(--ib-border);
  border-radius: 9px;
  background: var(--ib-cream);
  color: var(--ib-ink);
  font: 650 11px/1 var(--ib-font);
  letter-spacing: 0.02em;
  cursor: pointer;
  min-width: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ib-slot:hover {
  border-color: var(--ib-mauve);
  background: #f6ecef;
}
.ib-slot.is-selected {
  background: var(--ib-plum);
  border-color: var(--ib-plum);
  color: #fff;
}
.ib-slot.is-taken,
.ib-slot:disabled {
  background: #f0e8eb;
  color: #9a8792;
  border-color: #e4d5db;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  cursor: not-allowed;
  opacity: 0.68;
  pointer-events: none;
}
.ib-slot.is-taken.is-selected,
.ib-slot:disabled.is-selected {
  background: #f0e8eb;
  color: #9a8792;
  border-color: #e4d5db;
}

/* —— Form —— */
.ib-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-content: start;
}
.ib-span-2 {
  grid-column: 1 / -1;
}
.ib-field {
  display: block;
  min-width: 0;
  margin: 0;
}
.ib-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 5px;
  min-height: 18px;
}
.ib-field > span:first-child:not(.ib-field__head):not(.ib-control),
.ib-field__label {
  display: block;
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--ib-plum);
}
.ib-field__head .ib-field__label {
  flex: 1 1 auto;
  min-width: 0;
}
.ib-field em {
  font-style: normal;
  color: var(--ib-mauve);
}
.ib-control {
  position: relative;
  display: block;
}
.ib-opt {
  position: static;
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 8px;
  border: 1px solid rgba(107, 90, 104, 0.22);
  border-radius: 999px;
  background: rgba(250, 246, 244, 0.92);
  color: #8a7a86;
  font-style: normal;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: center;
  text-transform: lowercase;
  white-space: nowrap;
  pointer-events: none;
}
.ib-field__hint {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.35;
  color: var(--ib-muted);
}

.ib-overlay[data-ib-intro-only="1"] .ib-field:has([data-ib-select]) .ib-field__hint {
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.3;
}
.ib-field textarea {
  width: 100%;
  min-height: 58px;
  max-height: 72px;
  border: 1px solid var(--ib-border);
  border-radius: 10px;
  background: var(--ib-cream);
  color: var(--ib-ink);
  padding: 10px 12px;
  font: 500 13px/1.45 var(--ib-font);
  outline: 0;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ib-field textarea::placeholder {
  color: #a3969f;
}
.ib-field textarea:focus {
  border-color: var(--ib-plum);
  box-shadow: 0 0 0 3px rgba(78, 42, 78, 0.1);
  background: #faf6f4;
}
.ib-req {
  position: static;
  top: auto;
  right: auto;
  z-index: 1;
  transform: none;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 2px 8px;
  border: 1px solid rgba(196, 93, 138, 0.38);
  border-radius: 999px;
  background: linear-gradient(165deg, #fff 0%, #faf6f4 100%);
  color: #9a5f78;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: center;
  text-transform: lowercase;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(78, 42, 78, 0.07);
  pointer-events: none;
}
.ib-field input {
  width: 100%;
  height: var(--ib-ctl);
  border: 1px solid var(--ib-border);
  border-radius: 10px;
  background: var(--ib-cream);
  color: var(--ib-ink);
  padding: 0 12px;
  font: 500 13px/1.2 var(--ib-font);
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, font-size 0.12s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ib-field input[data-ib-fit] {
  font-size: var(--ib-fit-size, 13px);
}
.ib-field.is-required input {
  padding-right: 12px;
}
.ib-field input::placeholder {
  color: #a3969f;
}
.ib-field input:focus {
  border-color: var(--ib-plum);
  box-shadow: 0 0 0 3px rgba(78, 42, 78, 0.1);
  background: #faf6f4;
}
.ib-field input:-webkit-autofill,
.ib-field input:-webkit-autofill:hover,
.ib-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ib-ink);
  caret-color: var(--ib-ink);
  box-shadow: 0 0 0 1000px #faf6f4 inset;
  transition: background-color 99999s ease-out;
  animation-name: ib-onautofill;
}
@keyframes ib-onautofill {
  from {
    opacity: 0.99;
  }
  to {
    opacity: 1;
  }
}

/* Custom service select — matches form glass design */
.ib-select {
  position: relative;
  z-index: 4;
}
.ib-select__btn {
  appearance: none;
  width: 100%;
  min-height: var(--ib-ctl);
  margin: 0;
  border: 1px solid var(--ib-border);
  border-radius: 10px;
  background: var(--ib-cream);
  color: var(--ib-ink);
  padding: 0 36px 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 500 13px/1.25 var(--ib-font);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ib-select__btn:hover,
.ib-select.is-open .ib-select__btn,
.ib-select__btn:focus-visible {
  border-color: var(--ib-plum);
  box-shadow: 0 0 0 3px rgba(78, 42, 78, 0.1);
  background: #faf6f4;
  outline: 0;
}
.ib-select__btn span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ib-select__btn span.is-placeholder {
  color: #a3969f;
}
.ib-select__btn svg {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  flex: 0 0 auto;
  fill: none;
  stroke: var(--ib-plum);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}
.ib-select.is-open .ib-select__btn svg {
  transform: translateY(-50%) rotate(180deg);
}
.ib-select__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: min(240px, 42vh);
  overflow: auto;
  border: 1px solid rgba(193, 141, 162, 0.45);
  border-radius: 12px;
  background:
    linear-gradient(165deg, rgba(255, 252, 250, 0.96) 0%, rgba(250, 246, 244, 0.98) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 16px 36px rgba(58, 31, 58, 0.18);
  scrollbar-width: thin;
  scrollbar-color: rgba(193, 141, 162, 0.65) transparent;
}
.ib-select__menu[hidden] {
  display: none !important;
}
.ib-select__menu li {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ib-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.ib-select__menu li:hover,
.ib-select__menu li:focus-visible {
  background: rgba(243, 196, 212, 0.42);
  color: var(--ib-plum);
  outline: 0;
}
.ib-select__menu li.is-active {
  background: linear-gradient(145deg, #5a3358, var(--ib-plum-deep));
  color: #fff;
}
.ib-select-wrap {
  display: none;
}

.ib-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 0;
  padding: 11px 12px;
  border: 1px solid var(--ib-border);
  border-radius: 12px;
  background: rgba(255, 252, 250, 0.85);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ib-ink);
  cursor: pointer;
  order: 40;
}
.ib-submit {
  order: 50;
}
.ib-security {
  order: 60;
}
.ib-message {
  order: 70;
}
.ib-consent input {
  appearance: none;
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin: 0;
  border: 1.5px solid #b5a4b0;
  border-radius: 4px;
  background: var(--ib-cream);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.ib-consent input:checked {
  background: var(--ib-plum);
  border-color: var(--ib-plum);
}
.ib-consent input:checked::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.ib-consent a {
  color: var(--ib-plum);
  font-weight: 650;
  text-underline-offset: 2px;
}

.ib-captcha {
  display: flex;
  justify-content: flex-start;
  transform: scale(0.92);
  transform-origin: left center;
  min-height: 68px;
}
.ib-human__card {
  position: relative;
  overflow: hidden;
  padding: 12px 12px 14px;
  border: 1px solid rgba(193, 141, 162, 0.35);
  border-radius: 14px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.72) 0%, rgba(250, 246, 244, 0.94) 48%, rgba(241, 228, 232, 0.88) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 24px rgba(61, 33, 49, 0.06);
}
.ib-human__card::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 141, 162, 0.22), transparent 68%);
  pointer-events: none;
}
.ib-human__intro {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
}
.ib-human__icon {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #6b3558;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.95), transparent 55%),
    linear-gradient(145deg, rgba(241, 228, 232, 0.95), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(193, 141, 162, 0.35);
  box-shadow: 0 4px 12px rgba(78, 42, 78, 0.07);
}
.ib-human__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}
.ib-human__intro p {
  margin: 0.15rem 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
  color: #5a4a50;
}
.ib-human__row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 132px);
  gap: 10px;
  align-items: center;
}
.ib-human__q {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ib-ctl);
  padding: 0 14px;
  border: 1px solid rgba(193, 141, 162, 0.4);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ib-plum);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.ib-human__answer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}
.ib-human__eq {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 700;
  color: #9a5f78;
  line-height: 1;
}
.ib-human__answer input {
  width: 100%;
  min-width: 0;
  height: var(--ib-ctl);
  border: 1px solid var(--ib-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ib-ink);
  padding: 0 10px;
  font: 700 16px/1 var(--ib-font);
  text-align: center;
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ib-human__answer input:focus {
  border-color: var(--ib-plum);
  box-shadow: 0 0 0 3px rgba(78, 42, 78, 0.1);
}
.ib-human__answer input::-webkit-outer-spin-button,
.ib-human__answer input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ib-human__answer input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.ib-submit {
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--ib-plum, #4e2a4e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 650 13px/1 var(--ib-font, "Outfit", system-ui, sans-serif);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(78, 42, 78, 0.16);
  transition: background 0.15s ease, transform 0.15s ease;
}
.ib-submit:hover {
  background: var(--ib-plum-deep, #3a1f3a);
  transform: translateY(-1px);
}
.ib-submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}
.ib-submit svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ib-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  color: var(--ib-muted);
  text-align: center;
}
.ib-security svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--ib-mauve);
  stroke-width: 1.5;
  flex-shrink: 0;
}
.ib-message {
  min-height: 0;
  font-size: 12px;
  font-weight: 650;
  color: #9b365b;
  text-align: center;
}
.ib-message:not(:empty) {
  padding-top: 2px;
}

.ib-flow[hidden] {
  display: none !important;
}

.ib-dialog.is-done {
  width: min(440px, calc(100vw - 24px));
  max-height: min(520px, calc(100dvh - 24px - var(--wp-admin--admin-bar--height, 0px)));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ib-success {
  display: none;
  flex: 1;
  min-height: min(420px, calc(100dvh - 48px - var(--wp-admin--admin-bar--height, 0px)));
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(28px, 6vw, 48px) clamp(18px, 5vw, 36px);
}
.ib-dialog.is-done .ib-success,
.ib-overlay.is-done .ib-success:not([hidden]) {
  display: flex;
}
.ib-success[hidden] {
  display: none !important;
}
.ib-success__inner {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: ib-success-in 0.45s var(--ib-ease) both;
}
@keyframes ib-success-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.ib-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.55), transparent 55%),
    rgba(193, 141, 162, 0.2);
  color: var(--ib-plum);
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(78, 42, 78, 0.12);
}
.ib-success-icon svg {
  width: 40px;
  height: 40px;
}
.ib-success__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ib-mauve);
}
.ib-success h3 {
  margin: 0 0 10px;
  font-family: var(--ib-serif);
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight: 650;
  line-height: 1.2;
  color: var(--ib-plum);
}
.ib-success p:not(.ib-success__eyebrow) {
  max-width: 280px;
  margin: 0 0 22px;
  color: var(--ib-muted);
  font-size: 14px;
  line-height: 1.5;
}
.ib-success__btn {
  min-width: 148px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--ib-plum);
  color: #fff;
  font-weight: 650;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(78, 42, 78, 0.18);
  transition: background 0.15s ease, transform 0.15s ease;
}
.ib-success__btn:hover {
  background: var(--ib-plum-deep);
  transform: translateY(-1px);
}
.ib-secondary {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--ib-border);
  border-radius: 10px;
  background: var(--ib-cream);
  color: var(--ib-plum);
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
}

.ib-hp {
  position: absolute !important;
  left: -99999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-height: 800px) and (min-width: 768px) {
  .ib-overlay {
    padding: 8px;
    padding-top: calc(8px + var(--wp-admin--admin-bar--height, 0px));
  }
  .ib-dialog {
    --ib-day: 28px;
    --ib-ctl: 36px;
    --ib-slot: 22px;
    --ib-pad: 8px;
    --ib-gap: 7px;
    max-height: calc(100dvh - 12px - var(--wp-admin--admin-bar--height, 0px));
    width: min(1220px, calc(100vw - 16px));
  }
  .ib-flow {
    overflow-y: auto !important;
  }
  .ib-slots--compact {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .ib-header {
    padding: 10px 42px 6px;
  }
  .ib-header h2 {
    font-size: 24px;
  }
  .ib-stepper {
    margin-top: 8px;
  }
  .ib-step span {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
  }
  .ib-step-vine {
    height: 24px;
  }
  .ib-card {
    padding: 10px;
  }
  .ib-flora {
    opacity: 0.1;
  }
  .ib-captcha {
    transform: scale(0.84);
    min-height: 58px;
  }
  .ib-submit {
    height: 40px;
  }
  .ib-close {
    width: 32px;
    height: 32px;
  }
}

@media (min-width: 1101px) {
  .ib-dialog {
    width: min(1220px, calc(100vw - 20px));
  }
  .ib-flow {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: pan-y;
  }
  .ib-main {
    overflow: visible !important;
    min-height: auto;
  }
  .ib-calendar-card,
  .ib-form-card {
    overflow: visible !important;
    max-height: none !important;
  }
  .ib-slots-scroll-wrap,
  .ib-slots-scroll {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0;
    padding: 0;
    background: transparent;
  }
  .ib-slots-scroll-wrap::after {
    display: none;
  }
  .ib-slots--compact {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

/* Tablet + mobile: scroll întreg modalul (nu casetă mică) — funcționează pe touch */
@media (max-width: 1100px) {
  .ib-dialog {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    max-height: calc(100dvh - 10px - var(--wp-admin--admin-bar--height, 0px));
  }
  .ib-header {
    flex: 0 0 auto;
  }
  .ib-flow {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .ib-main {
    overflow: visible !important;
    min-height: auto;
  }
  .ib-calendar-card,
  .ib-form-card {
    overflow: visible !important;
    max-height: none !important;
  }
  .ib-slots-scroll-wrap,
  .ib-slots-scroll {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    flex: none !important;
    border: 0;
    padding: 0;
    background: transparent;
  }
  .ib-slots-scroll-wrap::after {
    display: none;
  }
  .ib-slots-hint {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .ib-dialog {
    width: min(980px, calc(100vw - 12px));
  }
  .ib-main {
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  }
  .ib-slots--compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ib-main {
    grid-template-columns: 1fr;
  }
  .ib-dialog {
    width: min(680px, calc(100vw - 12px));
  }
  .ib-slots--compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .ib-gem {
    display: none;
  }
}

@media (min-width: 901px) {
  .ib-human__intro {
    display: none;
  }
  .ib-human__card {
    padding: 8px 10px;
  }
  .ib-human__row {
    margin-top: 0;
  }
  .ib-captcha {
    transform: scale(0.84);
    min-height: 56px;
  }
}

@media (max-width: 767px) {
  .ib-overlay {
    padding: 0;
    align-items: end;
  }
  .ib-overlay.is-done {
    align-items: center;
    padding: 16px;
    padding-top: calc(16px + var(--wp-admin--admin-bar--height, 0px));
  }
  .ib-dialog {
    width: 100%;
    height: min(94dvh, calc(100dvh - env(safe-area-inset-top, 0px)));
    max-height: min(94dvh, calc(100dvh - env(safe-area-inset-top, 0px)));
    border-radius: 18px 18px 0 0;
  }
  .ib-slots--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .ib-dialog.is-done {
    width: min(420px, calc(100vw - 32px));
    max-height: min(480px, calc(100dvh - 32px - var(--wp-admin--admin-bar--height, 0px)));
    border-radius: 20px;
    margin: 0 auto;
  }
  .ib-header {
    padding: 12px 44px 8px;
  }
  .ib-main {
    display: block;
    padding: 0 10px max(12px, env(safe-area-inset-bottom));
  }
  .ib-card {
    margin-bottom: 8px;
  }
  .ib-day {
    height: 36px;
  }
  .ib-captcha {
    transform: scale(0.88);
    transform-origin: left top;
  }
}

@media (max-width: 560px) {
  .ib-form-grid {
    grid-template-columns: 1fr;
  }
  .ib-span-2 {
    grid-column: auto;
  }
  .ib-human__row {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 118px);
    gap: 8px;
  }
  .ib-human__q {
    font-size: 15px;
  }
  .ib-header h2 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ib-overlay,
  .ib-close,
  .ib-day,
  .ib-slot,
  .ib-submit,
  .iunia-booking-trigger,
  .ib-atmosphere__bloom,
  .ib-atmosphere__petal,
  .ib-step-vine__path {
    transition: none !important;
    animation: none !important;
  }
}

/* —— Inline desk (Programări page) —— */
.ib-overlay.ib-overlay--page-shell {
  position: fixed !important;
  width: 0 !important;
  height: 0 !important;
  inset: auto !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: none !important;
}

.ib-inline-desk {
  position: relative;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  scroll-margin-top: 6rem;
}

.ib-dialog.ib-dialog--inline {
  height: auto;
  max-height: none;
}

.ib-dialog.ib-dialog--inline .ib-flow {
  overflow: visible !important;
}

.ib-dialog.ib-dialog--inline {
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  transform: none;
  opacity: 1;
  overflow: visible;
  border-radius: 22px;
  border: 1px solid rgba(255, 248, 251, 0.18);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(250, 246, 244, 0.98) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 28px 64px rgba(12, 4, 18, 0.42);
}

.ib-dialog.ib-dialog--inline .ib-close {
  display: none !important;
}

.ib-dialog.ib-dialog--inline .ib-main {
  align-items: start;
}

@media (max-width: 820px) {
  .ib-dialog.ib-dialog--inline {
    border-radius: 18px;
  }
}
