/* IPA Booking – Frontend (date & time step style) */
:root {
  --ipa-booking-accent: #ff000d;
  --ipa-booking-accent-hover: #e6000c;
  --ipa-booking-accent-light: #ffe8e9;
  --ipa-booking-border: #e0e0e0;
  --ipa-booking-text: #1a1a1a;
  --ipa-booking-muted: #6b7280;
  --ipa-booking-bg: #ffffff;
  --ipa-booking-radius: 12px;
  --ipa-booking-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Isolate plugin buttons from theme/Elementor – unique to IPA Booking */
#ipa-booking-root button,
#ipa-booking-root input[type="submit"],
#ipa-booking-root input[type="button"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background-image: none;
  box-shadow: none;
  outline: none;
}

#ipa-booking-root button:focus,
#ipa-booking-root input[type="submit"]:focus,
#ipa-booking-root input[type="button"]:focus {
  outline: none;
}

.ipa-booking {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ipa-booking-text);
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

.ipa-booking__card {
  background: var(--ipa-booking-bg);
  border-radius: var(--ipa-booking-radius);
  box-shadow: var(--ipa-booking-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  min-height: 520px;
}

/* Sidebar (~25%) – align to top so steps don't shift when main content height changes */
.ipa-booking__sidebar {
  width: 26%;
  min-width: 200px;
  padding: 1.75rem 1.5rem;
  background: var(--ipa-booking-bg);
  border-right: 1px solid var(--ipa-booking-border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-self: flex-start;
}

.ipa-booking__branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.ipa-booking__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.ipa-booking__logo-placeholder {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ipa-booking-accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 6px;
}

.ipa-booking__branding-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ipa-booking__company {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ipa-booking-accent);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ipa-booking__tagline {
  font-size: 0.75rem;
  color: var(--ipa-booking-muted);
}

.ipa-booking__provider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.ipa-booking__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.ipa-booking__avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--ipa-booking-border);
  color: var(--ipa-booking-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 600;
}

.ipa-booking__provider-title {
  font-size: 0.8rem;
  color: var(--ipa-booking-muted);
}

.ipa-booking__provider-name {
  font-weight: 700;
  font-size: 1rem;
}

/* Stepper (sidebar) – fixed position from top so it doesn't move down on last page */
.ipa-booking__stepper-wrap {
  margin-top: 1rem;
}

.ipa-booking .stepper-box {
  padding: 0 0;
  width: 100%;
  max-width: 100%;
}

.ipa-booking .stepper-step {
  display: flex;
  margin-bottom: 24px;
  position: relative;
}

.ipa-booking .stepper-step:last-of-type {
  margin-bottom: 0;
}

.ipa-booking .stepper-line {
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -24px;
  width: 2px;
  background-color: #e2e8f0;
  z-index: 1;
}

.ipa-booking .stepper-step:last-of-type .stepper-line {
  display: none;
}

.ipa-booking .stepper-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  z-index: 2;
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.ipa-booking .stepper-completed .stepper-circle {
  background-color: #0f172a;
  color: white;
  border: none;
}

.ipa-booking .stepper-active .stepper-circle {
  border: 2px solid #0f172a;
  color: #0f172a;
  background: white;
}

.ipa-booking .stepper-pending .stepper-circle {
  border: 2px solid #e2e8f0;
  color: #94a3b8;
  background: white;
}

.ipa-booking .stepper-content {
  flex: 1;
  min-width: 0;
}

.ipa-booking .stepper-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.ipa-booking .stepper-completed .stepper-title {
  color: #0f172a;
}

.ipa-booking .stepper-active .stepper-title {
  color: #0f172a;
}

.ipa-booking .stepper-pending .stepper-title {
  color: #94a3b8;
}

.ipa-booking .stepper-status {
  font-size: 13px;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 4px;
}

.ipa-booking .stepper-completed .stepper-status {
  background-color: #dcfce7;
  color: #166534;
}

.ipa-booking .stepper-active .stepper-status {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.ipa-booking .stepper-pending .stepper-status {
  background-color: #f1f5f9;
  color: #64748b;
}

.ipa-booking .stepper-time {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.ipa-booking .stepper-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

#ipa-booking-root .stepper-button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background-color: white;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
}

#ipa-booking-root .stepper-button:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

#ipa-booking-root .stepper-button-primary {
  background-color: #0f172a;
  color: white;
  border-color: #0f172a;
}

#ipa-booking-root .stepper-button-primary:hover:not(:disabled) {
  background-color: #1e293b;
  border-color: #1e293b;
}

#ipa-booking-root .stepper-button-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Completed step: checkmark in circle */
.ipa-booking .stepper-completed .stepper-circle-inner {
  font-size: 0;
  line-height: 0;
}

.ipa-booking .stepper-completed .stepper-circle-inner::before {
  content: "✓";
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

/* Main (~75%) */
.ipa-booking__main {
  flex: 1;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
}

.ipa-booking__header-badge {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  margin-bottom: 1rem;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--ipa-booking-muted);
}

.ipa-booking__heading {
  font-size: 1.8rem !important;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--ipa-booking-text);
}

.ipa-booking__heading--with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.ipa-booking__heading--with-icon::before {
  display: none;
}

.ipa-booking__panel {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ipa-booking__panel[hidden] {
  display: none !important;
}

/* Date & Time step: calendar (col 2) + times (col 3) side by side, no wrap */
.ipa-booking__datetime-title {
  margin-bottom: 1.25rem;
}

.ipa-booking__datetime-columns {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.ipa-booking__datetime-col {
  min-width: 0;
}

.ipa-booking__datetime-col--calendar {
  flex: 0 0 auto;
}

.ipa-booking__datetime-col--times {
  flex: 1 1 auto;
  min-width: 220px;
}

@media (max-width: 720px) {
  .ipa-booking__datetime-columns {
    flex-wrap: wrap;
  }
}

/* Calendar – smaller so times column sits nicely next to it */
.ipa-booking__calendar-wrap {
  margin: 0;
}

.ipa-booking__calendar {
  margin: 0;
  width: 100%;
  max-width: 20rem; /* 7×2.5rem + padding */
  padding: 1rem;
  border-radius: 1.5rem;
  background: #0d0d0d;
  font-size: 0;
  box-sizing: border-box;
}

.ipa-booking__calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.ipa-booking__cal-month {
  font-family: "Arimo", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #ccc;
  text-align: center;
  flex: 1;
}

#ipa-booking-root .ipa-booking__cal-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

#ipa-booking-root .ipa-booking__cal-btn:hover {
  background: rgba(255, 0, 0, 0.2);
  border-color: rgba(255, 0, 0, 0.5);
  color: #ff3333;
}

.ipa-booking__cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 2.5rem);
  gap: 0;
  margin-bottom: 0.2rem;
  text-align: center;
  justify-content: center;
}

.ipa-booking__cal-dow-item {
  font-family: "Arimo", sans-serif;
  font-size: 0.75rem;
  line-height: 2.5rem;
  color: #aaa;
  cursor: default;
  box-sizing: border-box;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.ipa-booking__cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 2.5rem);
  gap: 0;
  justify-content: center;
  align-items: center;
  justify-items: center;
}

#ipa-booking-root .ipa-booking__cal-day {
  font-family: "Arimo", sans-serif;
  font-size: 0.95rem;
  line-height: 1;
  color: #ccc;
  text-align: center;
  box-sizing: border-box;
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  min-height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: default;
  background: transparent;
  transition: border-color 0.2s ease-in-out, background 0.2s ease-in-out, color 0.2s ease-in-out;
}

#ipa-booking-root .ipa-booking__cal-day--other-month {
  color: #999;
}

#ipa-booking-root .ipa-booking__cal-day--available {
  cursor: pointer;
  color: #ccc;
}

#ipa-booking-root .ipa-booking__cal-day--available:hover {
  border-color: rgba(255, 0, 0, 0.6);
  background: rgba(255, 0, 0, 0.15);
  color: #ff6666;
}

#ipa-booking-root .ipa-booking__cal-day--selected {
  background: #cc0000 !important;
  border-color: #cc0000 !important;
  color: #fff !important;
  font-weight: 600;
}

#ipa-booking-root .ipa-booking__cal-day--selected:hover {
  background: #e60000 !important;
  border-color: #e60000 !important;
  color: #fff !important;
}

#ipa-booking-root .ipa-booking__cal-day--past {
  opacity: 0.5;
  cursor: default;
}

/* Time slots */
.ipa-booking__times-heading {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  color: var(--ipa-booking-text);
}

.ipa-booking__times-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ipa-booking__times-list--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.ipa-booking__time-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#ipa-booking-root .ipa-booking__time-slot {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 0.0rem 0.1rem;
  border: 1px solid var(--ipa-booking-border);
  border-radius: 8px !important; /* Rectangular only – override theme/Elementor circle */
  background: #fff;
  font-size: 0.8rem;
  color: var(--ipa-booking-text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

#ipa-booking-root .ipa-booking__time-slot:hover {
  background: var(--ipa-booking-accent-light);
  border-color: var(--ipa-booking-accent);
}

#ipa-booking-root .ipa-booking__time-slot--selected {
  background: var(--ipa-booking-accent-light) !important;
  border-color: var(--ipa-booking-accent) !important;
  color: var(--ipa-booking-accent) !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

#ipa-booking-root .ipa-booking__time-slot--booked {
  background: #fef9c3;
  border-color: #e4d44c;
  color: #854d0e;
  cursor: not-allowed;
  opacity: 0.95;
  pointer-events: none;
  border-radius: 8px !important;
}

.ipa-booking__utc-note {
  font-size: 0.8rem;
  color: var(--ipa-booking-muted);
  margin: 1rem 0 0;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.ipa-booking__utc-note--top {
  margin: 0 0 1rem;
}

.ipa-booking__utc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--ipa-booking-border);
  color: var(--ipa-booking-muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
  flex-shrink: 0;
}

.ipa-booking__required {
  color: var(--ipa-booking-accent);
}

#ipa-booking-root .ipa-booking__btn {
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

#ipa-booking-root .ipa-booking__btn--primary {
  background: var(--ipa-booking-accent);
  color: #fff;
  align-self: flex-start;
}

#ipa-booking-root .ipa-booking__btn--primary:hover:not(:disabled) {
  background: var(--ipa-booking-accent-hover);
}

.ipa-booking__back-wrap {
  margin: 0 0 1.25rem;
  display: block;
}

.ipa-booking__panel--info .ipa-booking__back-wrap {
  margin-bottom: 1.5rem;
}

#ipa-booking-root .ipa-booking__btn--back {
  background: #fff;
  color: var(--ipa-booking-text);
  border: 1px solid var(--ipa-booking-border);
  margin-bottom: 0;
  display: inline-block;
}

#ipa-booking-root .ipa-booking__btn--back:hover {
  background: var(--ipa-booking-accent-light);
  color: var(--ipa-booking-accent);
  border-color: var(--ipa-booking-accent);
}

#ipa-booking-root .ipa-booking__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form (step 2) */
.ipa-booking__summary {
  font-size: 0.95rem;
  color: var(--ipa-booking-muted);
  margin: 0 0 1.25rem;
}

.ipa-booking__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 560px;
}

.ipa-booking__form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.ipa-booking__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ipa-booking__field-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ipa-booking-text);
}

.ipa-booking__form input,
.ipa-booking__form textarea {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--ipa-booking-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.ipa-booking__form input:focus,
.ipa-booking__form textarea:focus {
  outline: none;
  border-color: var(--ipa-booking-accent);
  box-shadow: 0 0 0 2px var(--ipa-booking-accent-light);
}

/* Success */
.ipa-booking__panel--success {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.ipa-booking__success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ipa-booking-accent);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.ipa-booking__success-text {
  font-size: 1.1rem;
  color: var(--ipa-booking-text);
  margin: 0 0 2rem;
}

.ipa-booking__success-actions {
  width: 100%;
  text-align: center;
  margin-top: 0;
}

.ipa-booking__panel--success .ipa-booking__btn--outlook,
#ipa-booking-root .ipa-booking__btn--outlook {
  margin-top: 0;
  display: inline-block;
  align-self: center;
}

.ipa-booking__loading,
.ipa-booking__muted {
  font-size: 0.9rem;
  color: var(--ipa-booking-muted);
}

/* CAPTCHA */
.ipa-booking__captcha {
  margin-top: 0.5rem;
}

.ipa-booking__captcha-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.ipa-booking__captcha-row .ipa-booking__captcha-code {
  margin-bottom: 0;
}

.ipa-booking__captcha-code {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  background: #f3f4f6;
  border: 2px dashed var(--ipa-booking-border);
  border-radius: 8px;
  color: var(--ipa-booking-accent);
  font-family: ui-monospace, monospace;
  user-select: none;
}

/* Input matches code box: same size, dotted border, background */
.ipa-booking__captcha-input {
  padding: 0.6rem 1rem;
  min-width: 8rem;
  box-sizing: border-box;
  background: #f3f4f6;
  border: 2px dashed var(--ipa-booking-border);
  border-radius: 8px;
  color: var(--ipa-booking-text);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-family: ui-monospace, monospace;
}

.ipa-booking__captcha-input::placeholder {
  color: var(--ipa-booking-muted);
  font-weight: 500;
}

.ipa-booking__captcha-input:focus {
  border-color: var(--ipa-booking-accent);
  background: #fff;
}

.ipa-booking__btn--captcha {
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 720px) {
  .ipa-booking__card {
    flex-direction: column;
  }

  .ipa-booking__sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--ipa-booking-border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }

  .ipa-booking__stepper-wrap {
    margin-top: 1rem;
  }

  .ipa-booking .stepper-box {
    padding: 20px 16px;
  }

  .ipa-booking__main {
    padding: 1.25rem;
  }

  .ipa-booking__form-row {
    grid-template-columns: 1fr;
  }

  .ipa-booking__captcha-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
