/* Livewell corporate event & booking UI
   Load AFTER Bootstrap/Tailwind/the existing site stylesheet.
   Scope is limited to .lw-corporate elements and shared booking dialogs. */

#registerPasswordFields input[aria-invalid="true"] {
  border-color: #b91c1c;
  outline: 2px solid #b91c1c;
  outline-offset: 1px;
}

/* The page is locked while this dialog is open; its contents must scroll
   within the visible viewport, including when mobile browser bars resize it. */
#accountDashboardModal {
  padding: 1rem;
}
#accountDashboardModal .account-dashboard-panel {
  margin: 0;
  max-height: 100%;
}
#accountDashboardModal .account-dashboard-header {
  flex-shrink: 0;
}
#accountDashboardModal [data-account-panel] {
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 767px) {
  #accountDashboardModal .account-dashboard-panel {
    height: 85vh;
    height: 85dvh;
  }
  #accountDashboardModal .account-tabs-wrap {
    flex-shrink: 0;
  }
  #accountDashboardModal .account-tabs-popout {
    max-height: max(3rem, calc(85vh - 12rem));
    max-height: max(3rem, calc(85dvh - 12rem));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
}
@media (min-width: 768px) {
  #accountDashboardModal .account-tabs-wrap {
    min-height: 0;
    flex-shrink: 0;
    overflow-y: auto;
  }
}

.lw-corporate {
  --lw-ink: #16263c;
  --lw-muted: #64748b;
  --lw-blue: #58c4e5;
  --lw-blue-ink: #123c4c;
  --lw-link: var(--lw-blue);
  --lw-blue-hover: #37b1d5;
  --lw-blue-soft: #e7f8fc;
  --lw-line: #e2e8f0;
  --lw-bg: #f5f8fc;
  color: var(--lw-ink);
}

/* Shared brand strip: add to both event and booking pages. */
.lw-corporate .lw-corp-brand-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 18px 22px;
  border: 1px solid var(--lw-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(19, 47, 85, .055);
}
.lw-corporate .lw-corp-provider,
.lw-corporate .lw-corp-partner {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}
/* Use Livewell's official horizontal logo, rather than a text recreation. */
.lw-corporate .lw-corp-livewell-logo {
  display: block;
  width: min(230px, 100%);
  height: auto;
  max-height: 68px;
  object-fit: contain;
  object-position: left center;
}
.lw-corporate .lw-corp-partner-logo {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 172px;
  min-height: 62px;
  padding: 10px 14px;
  border: 1px dashed #aabbd0;
  border-radius: 12px;
  background: #f7fbfd;
  color: #71829a;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.lw-corporate .lw-corp-partner-logo.has-logo {
  border: 1px solid var(--lw-line);
  background: #fff;
}
.lw-corporate .lw-corp-partner-logo img {
  display: block;
  max-width: 100%;
  max-height: 45px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Event landing page: book.livewellhealth.co.uk/commercial/event.php */
body.lw-corporate-event {
  background: radial-gradient(circle at 95% 0%, #dcf5fb 0, transparent 30%), var(--lw-bg);
  min-height: 100vh;
}
body.lw-corporate-event .event-card {
  max-width: 760px;
  margin: 36px auto 56px;
  padding: 26px !important;
  border: 1px solid #e5ebf3;
  border-radius: 20px;
  box-shadow: 0 22px 65px rgba(20, 45, 73, .075) !important;
}
body.lw-corporate-event .lw-corp-brand-strip { margin-bottom: 28px; }
/* Event intro: title and host on the left, date and navigation on the right. */
body.lw-corporate-event .lw-corp-event-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 275px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 28px;
}
body.lw-corporate-event .lw-corp-event-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 0;
}
body.lw-corporate-event .lw-corp-event-heading h4 {
  margin: 0 0 22px !important;
  line-height: 1.12;
}
body.lw-corporate-event .lw-corp-event-host { margin: 0; }
body.lw-corporate-event .lw-corp-detail-label {
  display: block;
  margin-bottom: 6px;
  color: #687990;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .075em;
  text-transform: uppercase;
}
body.lw-corporate-event .lw-corp-host-value {
  display: block;
  color: #4f647c;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body.lw-corporate-event .lw-corp-event-info {
  min-width: 0;
  padding: 16px;
  border: 1px solid #cde8f2;
  border-radius: 14px;
  background: #f0faff;
}
body.lw-corporate-event .lw-corp-event-date {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
}
body.lw-corporate-event .lw-corp-date-icon {
  display: flex;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #10759b;
  background: #d9f4fc;
}
body.lw-corporate-event .lw-corp-date-icon svg { width: 20px; height: 20px; }
body.lw-corporate-event .lw-corp-event-date strong {
  display: block;
  color: #20364e;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 750;
}
body.lw-corporate-event .lw-corp-upcoming-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 13px;
  border-top: 1px solid #d7eaf2;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  text-decoration: none;
}
body.lw-corporate-event .lw-corp-upcoming-link:hover { text-decoration: underline; }
body.lw-corporate-event .lw-corp-upcoming-link span { font-size: 19px; line-height: 1; }
body.lw-corporate-event .event-card h4 {
  margin: 12px 0 6px !important;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 750;
  letter-spacing: -.035em;
  color: var(--lw-ink);
}
body.lw-corporate-event .event-card .text-muted { color: var(--lw-muted) !important; }
body.lw-corporate-event .event-card h6 {
  margin-bottom: 12px !important;
  color: #52657d !important;
  font-weight: 800;
  letter-spacing: .09em;
}
body.lw-corporate-event .event-card .table {
  overflow: hidden;
  border: 1px solid var(--lw-line);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
}
body.lw-corporate-event .event-card .table th,
body.lw-corporate-event .event-card .table td {
  padding: 12px 14px;
  vertical-align: middle;
  border: 0;
  border-bottom: 1px solid var(--lw-line);
}
body.lw-corporate-event .event-card .table tr:last-child td { border-bottom: 0; }
body.lw-corporate-event .event-card .table thead th {
  background: #eff9fc;
  color: #51647c;
  font-size: 12px;
}
body.lw-corporate-event .event-card .staff-grid > div {
  border: 1px solid var(--lw-line);
  background: #f8fafd !important;
  border-radius: 12px !important;
}
body.lw-corporate-event .event-card .btn-primary {
  padding: 13px 18px;
  border-color: var(--lw-blue);
  border-radius: 11px;
  background: var(--lw-blue);
  font-size: 15px;
  font-weight: 750;
  color: #fff;
}
body.lw-corporate-event .event-card .btn-primary:hover {
  border-color: var(--lw-blue-hover);
  background: var(--lw-blue-hover);
}
body.lw-corporate-event .event-card a:not(.btn) { color: var(--lw-link); }
body.lw-corporate-event .event-card a:focus-visible,
body.lw-corporate-event .event-card .btn:focus-visible {
  outline: 3px solid var(--lw-blue);
  outline-offset: 3px;
}

/* Corporate slot booking page: book.livewellhealth.co.uk/corporate.php */
#bookingMeta.lw-corporate-booking { max-width: 1120px; }
#bookingMeta.lw-corporate-booking .lw-corp-brand-strip { margin-bottom: 20px; }
#bookingMeta.lw-corporate-booking #bookingContent > .flex.items-center.justify-between.relative {
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px;
  border: 1px solid var(--lw-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(19,47,85,.04);
}
#bookingMeta.lw-corporate-booking #bookingContent > .flex.items-center.justify-between.relative > .relative {
  flex-shrink: 0;
}
#bookingMeta.lw-corporate-booking #bookingContent > .flex.items-center.justify-between.relative h1 {
  color: var(--lw-ink);
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 750;
  letter-spacing: -.03em;
}
#bookingMeta.lw-corporate-booking #bookingContent > .flex.items-center.justify-between.relative p {
  margin-top: 3px;
  line-height: 1.45;
}
#bookingMeta.lw-corporate-booking #availabilityContainer > .bg-white,
#bookingMeta.lw-corporate-booking #selectedSlotCard,
#bookingMeta.lw-corporate-booking #cartCard,
#bookingMeta.lw-corporate-booking #confirmationSection {
  border: 1px solid var(--lw-line);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(19,47,85,.04);
}
#bookingMeta.lw-corporate-booking #availabilityContainer .day-card > .border {
  border-color: var(--lw-line);
  border-radius: 13px;
  overflow: visible;
}
#bookingMeta.lw-corporate-booking #availabilityContainer .day-card > .border > .border-b {
  padding: 13px 15px;
  border-color: var(--lw-line);
  background: #eff9fc;
  border-radius: 12px 12px 0 0;
  color: var(--lw-ink);
  font-size: 14px;
  font-weight: 750;
}
#bookingMeta.lw-corporate-booking .book-slot-btn {
  min-height: 62px;
  border: 1px solid #cbd8e7;
  border-radius: 10px;
  background: #fff;
  color: var(--lw-ink);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
#bookingMeta.lw-corporate-booking .book-slot-btn:hover {
  border-color: var(--lw-blue);
  background: var(--lw-blue-soft);
  box-shadow: 0 2px 8px rgba(88, 195, 229, .20);
}
#bookingMeta.lw-corporate-booking .book-slot-btn:focus-visible {
  outline: 3px solid var(--lw-blue);
  outline-offset: 2px;
}
#bookingMeta.lw-corporate-booking .book-slot-btn[aria-pressed='true'],
#bookingMeta.lw-corporate-booking .book-slot-btn.is-selected,
#bookingMeta.lw-corporate-booking .book-slot-btn.selected {
  border-color: var(--lw-blue);
  background: #dff5fb;
  box-shadow: inset 0 0 0 1px var(--lw-blue);
}
#bookingMeta.lw-corporate-booking .availability-slot-grid > .flex.flex-col > .cursor-not-allowed {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f2f5f9;
}
#bookingMeta.lw-corporate-booking #availabilityContainer .bg-slate-200.rounded-full {
  background: #e7f8fc;
  color: #176b86;
  border: 1px solid #bcebf6;
}
#bookingMeta.lw-corporate-booking #accountButton,
#bookingMeta.lw-corporate-booking #cartButton {
  border-radius: 10px;
}
/* Accent important booking actions in Livewell blue. */
#bookingMeta.lw-corporate-booking #accountButton:hover,
#bookingMeta.lw-corporate-booking #cartButton:hover {
  border-color: var(--lw-blue);
  background: var(--lw-blue-soft);
}
#bookingMeta.lw-corporate-booking #selectedSlotCard button,
#bookingMeta.lw-corporate-booking #cartCard #checkoutBtn,
#bookingMeta.lw-corporate-booking #cartCard #payNowBtn,
#bookingMeta.lw-corporate-booking #cartCard #continueToCartBtn,
#bookingMeta.lw-corporate-booking #confirmationSection .btn-primary {
  background: var(--lw-blue) !important;
  border-color: var(--lw-blue) !important;
  color: #fff !important;
}
#bookingMeta.lw-corporate-booking #selectedSlotCard button:hover,
#bookingMeta.lw-corporate-booking #cartCard #checkoutBtn:hover,
#bookingMeta.lw-corporate-booking #cartCard #payNowBtn:hover {
  background: var(--lw-blue-hover) !important;
}
@media (max-width: 640px) {
  body.lw-corporate-event .lw-corp-event-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 26px;
  }
  body.lw-corporate-event .lw-corp-event-heading { padding: 0; }
  body.lw-corporate-event .lw-corp-event-heading h4 { margin-bottom: 14px !important; }
  body.lw-corporate-event .lw-corp-event-info { padding: 15px; }
  .lw-corporate .lw-corp-brand-strip { padding: 15px; gap: 15px; }
  .lw-corporate .lw-corp-partner { margin-left: auto; }
  .lw-corporate .lw-corp-livewell-logo { width: min(182px, 100%); }
  .lw-corporate .lw-corp-partner-logo { width: 145px; min-height: 54px; }
  body.lw-corporate-event .event-card {
    margin: 16px auto 32px;
    padding: 16px !important;
    border-radius: 16px;
  }
  #bookingMeta.lw-corporate-booking #bookingContent > .flex.items-center.justify-between.relative {
    padding: 16px;
    flex-direction: column-reverse;
    align-items: flex-end;
  }
  #bookingMeta.lw-corporate-booking #bookingContent > .flex.items-center.justify-between.relative > :first-child {
    align-self: stretch;
  }
}

/* Preview pairs both brands; booking content centers the partner. */
.lw-corporate .lw-corp-brand-paired {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lw-corporate .lw-corp-brand-paired .lw-corp-partner {
  justify-self: end;
  max-width: 100%;
  text-align: right;
}
.lw-corporate .lw-corp-brand-centered {
  justify-content: center;
  text-align: center;
}
.lw-corporate .lw-partner-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 300px);
  max-height: 90px;
  object-fit: contain;
}
.lw-corporate .lw-partner-name {
  font-size: 22px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
body.lw-booking-page {
  background: radial-gradient(circle at 95% 0%, #dcf5fb 0, transparent 30%), #f5f8fc;
}
/* Keep the parent site's high header/menu layers below booking dialogs (50+). */
body.lw-booking-page > .lw-site-chrome {
  position: relative;
  z-index: 30;
}
#bookingMeta.lw-corporate-booking #filtersPanel,
#bookingMeta.lw-corporate-booking #bookingContent > .bg-white {
  border: 1px solid var(--lw-line);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(19,47,85,.04);
}
#bookingMeta.lw-corporate-booking .btn-brand {
  background: var(--lw-blue);
  border-color: var(--lw-blue);
  color: #fff;
  border-radius: 10px;
}
#bookingMeta.lw-corporate-booking .btn-brand:hover {
  background: var(--lw-blue-hover);
  border-color: var(--lw-blue-hover);
}
#bookingMeta.lw-corporate-booking :is(input:not([type='checkbox']):not([type='radio']), select, textarea) {
  border-radius: 10px;
}
#bookingMeta.lw-corporate-booking :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--lw-blue);
  outline-offset: 3px;
}
#bookingMeta.lw-corporate-booking #selectedSlotCard #clearSlotBtn {
  background: #fff !important;
  color: var(--lw-ink) !important;
  border-color: var(--lw-line) !important;
}
@media (max-width: 640px) {
  .lw-corporate .lw-partner-logo { max-width: min(100%, 240px); max-height: 75px; }
  body.lw-corporate-event .table { font-size: 12px; }
  body.lw-corporate-event .event-card .table th,
  body.lw-corporate-event .event-card .table td { padding: 10px 8px; }
}

/* Carry the shared palette through static and dynamically created dialogs.
   Keep utility class names intact: booking scripts toggle them for active states. */
.lw-corporate .btn-brand-outline {
  background-color: #fff;
  border: 1px solid var(--lw-blue);
  color: var(--lw-blue);
  border-radius: 10px;
}
.lw-corporate :is(.btn-brand, .bg-blue-600, .bg-sky-600, .btn-primary) {
  background-color: var(--lw-blue);
  border-color: var(--lw-blue);
  color: #fff;
  border-radius: 10px;
}
.lw-corporate :is(.btn-brand, .bg-blue-600, .bg-sky-600, .btn-primary):hover {
  background-color: var(--lw-blue-hover);
  border-color: var(--lw-blue-hover);
  color: #fff;
}
.lw-corporate :is(.btn-brand, .bg-blue-600, .bg-sky-600, .btn-primary):disabled {
  opacity: .6;
  cursor: not-allowed;
}
.lw-corporate :is(.text-blue-600, .text-blue-700, .text-brand, .btn-brand-outline),
.lw-corporate a:not(.btn):not(.btn-brand):not(.bg-blue-600):not(.bg-sky-600) {
  color: var(--lw-blue);
}
.lw-corporate :is(.hover\:text-blue-700, .text-brand, .btn-brand-outline):hover,
.lw-corporate a:not(.btn):not(.btn-brand):not(.bg-blue-600):not(.bg-sky-600):hover {
  color: var(--lw-blue-hover);
}
.lw-corporate :is(.bg-blue-50, .bg-sky-100) {
  background-color: var(--lw-blue-soft);
}
.lw-corporate :is(.text-blue-800, .text-blue-900, .text-sky-800) {
  color: var(--lw-ink);
}
.lw-corporate :is(.border-blue-200, .btn-brand-outline) {
  border-color: var(--lw-blue);
}
.lw-corporate :is(.border-blue-500, .border-blue-600) {
  border-color: var(--lw-blue);
}
.lw-corporate :is(.hover\:bg-blue-50, .hover\:bg-blue-100, .btn-brand-outline):hover {
  background-color: var(--lw-blue-soft);
}
.lw-corporate .hover\:border-blue-500:hover {
  border-color: var(--lw-blue);
}
.lw-corporate :is(input, select, textarea) {
  accent-color: var(--lw-blue);
  --tw-ring-color: var(--lw-blue);
}
.lw-corporate :is(input:not([type='checkbox']):not([type='radio']), select, textarea):focus {
  border-color: var(--lw-blue);
  --tw-ring-color: var(--lw-blue);
}
.lw-corporate :is(input[type='checkbox'], input[type='radio']):checked {
  color: var(--lw-blue);
}
.lw-corporate :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--lw-blue);
  outline-offset: 3px;
}
.lw-corporate .fixed.inset-0 > .bg-white,
.lw-booking-overlay > .bg-white {
  color: var(--lw-ink);
  background: linear-gradient(180deg, #f0faff, #fff 120px);
  border: 1px solid var(--lw-line);
  border-radius: 16px;
  box-shadow: 0 22px 65px rgba(20,45,73,.15);
}
.lw-corporate :is(.fixed.inset-0, #cartCard) :is(h3, h5) {
  color: var(--lw-ink);
}
.lw-corporate .fixed.inset-0 :is(input:not([type='checkbox']):not([type='radio']), select, textarea),
.lw-booking-overlay :is(input:not([type='checkbox']):not([type='radio']), select, textarea) {
  border-radius: 10px;
}
#bookingMeta.lw-corporate-booking #cartPreview {
  border-top: 1px solid var(--lw-line);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(19,47,85,.12);
}
.lw-corporate .slot-info-trigger:is(:hover, :focus) {
  border-color: var(--lw-blue);
  background-color: var(--lw-blue-soft);
}
