/* ============================================================
   W2D shared public UI bridge
   Keeps plugin pages aligned with the Everything Dancing theme.
============================================================ */

:root {
  --w2d-ui-font: var(--ed-font-sans, "Inter", Arial, sans-serif);
  --w2d-ui-ink: var(--ed-color-ink, #151515);
  --w2d-ui-muted: var(--ed-color-muted, #98A1B3);
  --w2d-ui-surface: var(--ed-color-surface, #FAF7F2);
  --w2d-ui-surface-strong: var(--ed-color-surface-strong, #FFFFFF);
  --w2d-ui-line: var(--ed-color-line, color-mix(in srgb, #E8E8EF 72%, transparent));
  --w2d-ui-line-strong: var(--ed-color-line-strong, #E8E8EF);
  --w2d-ui-primary: var(--ed-color-primary, #7C4DFF);
  --w2d-ui-primary-strong: var(--ed-color-primary-strong, #7C4DFF);
  --w2d-ui-primary-soft: var(--ed-color-primary-soft, rgb(var(--ed-primary-rgb, 124 77 255) / 0.12));
  --w2d-ui-accent: var(--ed-color-accent, #FF5C7A);
  --w2d-ui-teal: var(--ed-color-teal, #2CE7C9);
  --w2d-ui-teal-soft: var(--ed-color-teal-soft, rgb(var(--ed-accent-rgb, 44 231 201) / 0.16));
  --w2d-ui-radius-sm: var(--ed-radius-sm, 10px);
  --w2d-ui-radius-md: var(--ed-radius-md, 14px);
  --w2d-ui-radius-lg: var(--ed-radius-lg, 18px);
  --w2d-ui-radius-pill: var(--ed-radius-pill, 999px);
  --w2d-ui-shadow-soft: var(--ed-shadow-soft, 0 14px 36px rgb(var(--ed-bg-dark-rgb, 11 16 32) / 0.09));
  --w2d-ui-shadow-elevated: var(--ed-shadow-elevated, 0 24px 64px rgb(var(--ed-bg-dark-rgb, 11 16 32) / 0.16));
  --w2d-ui-focus: var(--ed-focus-ring, 0 0 0 3px rgb(var(--ed-primary-rgb, 124 77 255) / 0.28));
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites
) {
  color: var(--w2d-ui-ink);
  font-family: var(--w2d-ui-font);
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites
) :where(h1, h2, h3, h4, h5, h6) {
  color: var(--w2d-ui-ink);
  font-family: var(--w2d-ui-font);
  letter-spacing: 0;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites
) :where(p, small, span, label, legend) {
  font-family: var(--w2d-ui-font);
}

/* Buttons */

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites
) :where(
  .w2d-btn,
  .w2d-button,
  .w2d-action,
  .w2d-card-action,
  .w2d-dashboard-form button,
  button[type="submit"],
  input[type="submit"],
  input[type="button"]
) {
  min-height: 44px;
  border-radius: var(--w2d-ui-radius-pill);
  font-family: var(--w2d-ui-font);
  font-weight: 700;
  letter-spacing: 0;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-provider-profile,
  .w2d-official-venue-form
) :where(.w2d-btn-primary, .w2d-primary, button[type="submit"], input[type="submit"]) {
  border-color: rgba(122, 36, 56, 0.24);
  background:
    linear-gradient(135deg, var(--w2d-ui-primary-strong), var(--w2d-ui-primary) 56%, var(--w2d-ui-accent));
  color: #FFFFFF;
  box-shadow: 0 14px 32px rgba(122, 36, 56, 0.2);
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-provider-profile,
  .w2d-official-venue-form
) :where(.w2d-btn-primary, .w2d-primary, button[type="submit"], input[type="submit"]):hover {
  box-shadow: 0 18px 38px rgba(122, 36, 56, 0.26);
  filter: saturate(1.03);
  transform: translateY(-1px);
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-provider-profile,
  .w2d-official-venue-form
) :where(.w2d-btn-soft, .w2d-secondary, .w2d-btn-secondary) {
  border-color: var(--w2d-ui-line-strong);
  background: var(--w2d-ui-surface-strong);
  color: var(--w2d-ui-ink);
  box-shadow: 0 8px 22px rgba(73, 41, 25, 0.06);
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-provider-profile,
  .w2d-official-venue-form
) :where(.w2d-btn-soft, .w2d-secondary, .w2d-btn-secondary):hover {
  background: var(--w2d-ui-primary-soft);
  color: var(--w2d-ui-primary-strong);
}

/* Forms */

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites
) :where(
  input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  border-color: var(--w2d-ui-line-strong);
  border-radius: var(--w2d-ui-radius-md);
  background: var(--w2d-ui-surface-strong);
  color: var(--w2d-ui-ink);
  font-family: var(--w2d-ui-font);
  box-shadow: 0 8px 22px rgba(73, 41, 25, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites
) :where(input, select, textarea):focus {
  border-color: rgba(217, 155, 50, 0.72);
  background: #FFFFFF;
  box-shadow:
    var(--w2d-ui-focus),
    0 10px 24px rgba(73, 41, 25, 0.07);
  outline: 0;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-provider-profile,
  .w2d-official-venue-form
) :where(label, .w2d-field-label, .w2d-form-label) {
  color: var(--w2d-ui-ink);
  font-family: var(--w2d-ui-font);
  font-weight: 700;
}

/* Cards, panels, chips */

:where(
  .w2d-card,
  .w2d-panel,
  .w2d-event-card,
  .w2d-provider-card,
  .w2d-organisation-card,
  .w2d-dashboard-card,
  .w2d-stat-card,
  .w2d-venue-selected-card
) {
  border-color: var(--w2d-ui-line);
  background-color: var(--w2d-ui-surface-strong);
  box-shadow: var(--w2d-ui-shadow-soft);
}

:where(
  .w2d-badge,
  .w2d-chip,
  .w2d-tag,
  .w2d-status,
  .w2d-pill,
  .w2d-event-card__badge
) {
  border-radius: var(--w2d-ui-radius-pill);
  font-family: var(--w2d-ui-font);
  font-weight: 800;
  letter-spacing: 0;
}

:where(.w2d-status--active, .w2d-badge--active, .w2d-chip--active) {
  background: var(--w2d-ui-teal-soft);
  color: var(--w2d-ui-teal);
}

:where(.w2d-notice, .w2d-alert, .w2d-message, .w2d-empty-state) {
  border: 1px solid var(--w2d-ui-line);
  border-radius: var(--w2d-ui-radius-lg);
  background: rgba(255, 253, 248, 0.9);
  color: var(--w2d-ui-ink);
  box-shadow: 0 8px 22px rgba(73, 41, 25, 0.05);
}

@media (max-width: 782px) {
  :where(
    .w2d-event-wrap,
    .w2d-providers-dashboard,
    .w2d-organisation-dashboard,
    .w2d-provider-profile,
    .w2d-official-venue-form
  ) :where(.w2d-btn, .w2d-button, button, input[type="submit"]) {
    min-height: 48px;
  }
}

/* ============================================================
   Visible theme alignment overrides
   These intentionally beat older inline/profile/dashboard rules.
============================================================ */

.w2d-provider-profile,
.w2d-org-profile-wrap,
.w2d-profp-wrap,
.w2d-providers-dashboard,
.w2d-organisation-dashboard,
.w2d-event-wrap {
  color: var(--w2d-ui-ink) !important;
  font-family: var(--w2d-ui-font) !important;
}

.w2d-provider-profile .w2d-hero,
.w2d-org-profile-wrap .w2d-org-hero,
.w2d-org-profile-wrap .w2d-card,
.w2d-org-profile-wrap .w2d-composer,
.w2d-org-profile-wrap .w2d-feed-item,
.w2d-org-profile-wrap .w2d-event-card,
.w2d-org-profile-wrap .w2d-member-card,
.w2d-org-profile-wrap .w2d-info-card,
.w2d-org-profile-wrap .w2d-branch-card,
.w2d-provider-profile .w2d-card,
.w2d-provider-profile .w2d-composer,
.w2d-provider-profile .w2d-feed-item,
.w2d-provider-profile .w2d-event-card,
.w2d-provider-profile .w2d-member-card,
.w2d-provider-profile .w2d-info-card,
.w2d-providers-dashboard .w2d-provider-card,
.w2d-providers-dashboard .w2d-dashboard-empty,
.w2d-providers-dashboard .w2d-dashboard-notice,
.w2d-providers-dashboard .w2d-events-manager,
.w2d-organisation-dashboard .w2d-organisation-card,
.w2d-organisation-dashboard .w2d-org-subscription,
.w2d-organisation-dashboard .w2d-organisation-panel,
.w2d-organisation-dashboard .w2d-branch-card,
.w2d-event-wrap .w2d-card,
.w2d-event-wrap .w2d-step-controller {
  border-color: var(--w2d-ui-line) !important;
  border-radius: var(--w2d-ui-radius-lg) !important;
  background:
    linear-gradient(135deg, rgba(122, 36, 56, 0.045), transparent 38%),
    rgba(255, 253, 248, 0.94) !important;
  box-shadow: var(--w2d-ui-shadow-soft) !important;
}

.w2d-provider-profile .w2d-logo,
.w2d-provider-profile .w2d-avatar,
.w2d-org-profile-wrap .w2d-logo,
.w2d-org-profile-wrap .w2d-avatar,
.w2d-providers-dashboard .w2d-provider-card__avatar,
.w2d-organisation-dashboard .w2d-organisation-card__avatar {
  border-color: var(--w2d-ui-line) !important;
  border-radius: var(--w2d-ui-radius-lg) !important;
  background:
    linear-gradient(135deg, var(--w2d-ui-primary), var(--w2d-ui-accent)) !important;
  color: #FFFFFF !important;
}

.w2d-provider-profile .w2d-eyebrow,
.w2d-org-profile-wrap .w2d-eyebrow,
.w2d-org-profile-wrap .w2d-section-eyebrow,
.w2d-providers-dashboard .w2d-dashboard-eyebrow,
.w2d-providers-dashboard .w2d-section-eyebrow,
.w2d-providers-dashboard .w2d-provider-card__eyebrow,
.w2d-organisation-dashboard .w2d-dashboard-eyebrow,
.w2d-organisation-dashboard .w2d-section-eyebrow,
.w2d-organisation-dashboard .w2d-organisation-card__eyebrow,
.w2d-event-wrap .w2d-step-controller__kicker {
  color: var(--w2d-ui-primary) !important;
  letter-spacing: 0.08em !important;
}

.w2d-provider-profile .w2d-title,
.w2d-provider-profile .w2d-section-title,
.w2d-org-profile-wrap .w2d-title,
.w2d-org-profile-wrap .w2d-section-title,
.w2d-providers-dashboard .w2d-dashboard-title,
.w2d-providers-dashboard .w2d-provider-card__title,
.w2d-organisation-dashboard .w2d-dashboard-title,
.w2d-organisation-dashboard .w2d-organisation-card__title,
.w2d-event-wrap .w2d-step-controller__title {
  color: var(--w2d-ui-primary-strong) !important;
  letter-spacing: 0 !important;
}

.w2d-provider-profile .w2d-btn,
.w2d-provider-profile button.w2d-btn,
.w2d-org-profile-wrap .w2d-btn,
.w2d-org-profile-wrap button.w2d-btn,
.w2d-providers-dashboard .w2d-btn,
.w2d-providers-dashboard button.w2d-btn,
.w2d-organisation-dashboard .w2d-btn,
.w2d-organisation-dashboard button.w2d-btn,
.w2d-event-wrap .w2d-btn,
.w2d-event-wrap button.w2d-btn {
  min-height: 44px !important;
  border-radius: var(--w2d-ui-radius-pill) !important;
  border-color: var(--w2d-ui-line-strong) !important;
  background: var(--w2d-ui-surface-strong) !important;
  color: var(--w2d-ui-ink) !important;
  font-family: var(--w2d-ui-font) !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 22px rgba(73, 41, 25, 0.08) !important;
}

.w2d-provider-profile .w2d-btn-primary,
.w2d-provider-profile button.w2d-btn-primary,
.w2d-org-profile-wrap .w2d-btn-primary,
.w2d-org-profile-wrap button.w2d-btn-primary,
.w2d-providers-dashboard .w2d-btn-primary,
.w2d-providers-dashboard button.w2d-btn-primary,
.w2d-organisation-dashboard .w2d-btn-primary,
.w2d-organisation-dashboard button.w2d-btn-primary,
.w2d-event-wrap .w2d-btn-primary,
.w2d-event-wrap button.w2d-btn-primary {
  border-color: rgba(122, 36, 56, 0.28) !important;
  background:
    linear-gradient(135deg, var(--w2d-ui-primary-strong), var(--w2d-ui-primary) 56%, var(--w2d-ui-accent)) !important;
  color: #FFFFFF !important;
  box-shadow: 0 14px 32px rgba(122, 36, 56, 0.2) !important;
}

.w2d-provider-profile .w2d-nav a,
.w2d-org-profile-wrap .w2d-nav a,
.w2d-provider-profile .w2d-kind-chip,
.w2d-org-profile-wrap .w2d-kind-chip,
.w2d-provider-profile .w2d-clip-btn,
.w2d-org-profile-wrap .w2d-clip-btn,
.w2d-providers-dashboard .w2d-view-toggle,
.w2d-providers-dashboard .w2d-view-toggle__button,
.w2d-organisation-dashboard .w2d-org-pill,
.w2d-event-wrap .w2d-step-mobile__button,
.w2d-event-wrap .w2d-step-mobile__item {
  border-color: var(--w2d-ui-line-strong) !important;
  border-radius: var(--w2d-ui-radius-pill) !important;
  background: var(--w2d-ui-surface-strong) !important;
  color: var(--w2d-ui-ink) !important;
}

.w2d-provider-profile input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
.w2d-provider-profile select,
.w2d-provider-profile textarea,
.w2d-org-profile-wrap input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
.w2d-org-profile-wrap select,
.w2d-org-profile-wrap textarea,
.w2d-providers-dashboard input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
.w2d-providers-dashboard select,
.w2d-providers-dashboard textarea,
.w2d-organisation-dashboard input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
.w2d-organisation-dashboard select,
.w2d-organisation-dashboard textarea,
.w2d-event-wrap input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
.w2d-event-wrap select,
.w2d-event-wrap textarea {
  border-color: var(--w2d-ui-line-strong) !important;
  border-radius: var(--w2d-ui-radius-md) !important;
  background: var(--w2d-ui-surface-strong) !important;
  color: var(--w2d-ui-ink) !important;
  font-family: var(--w2d-ui-font) !important;
  box-shadow: 0 8px 22px rgba(73, 41, 25, 0.04) !important;
}

.w2d-provider-profile input:focus,
.w2d-provider-profile select:focus,
.w2d-provider-profile textarea:focus,
.w2d-org-profile-wrap input:focus,
.w2d-org-profile-wrap select:focus,
.w2d-org-profile-wrap textarea:focus,
.w2d-providers-dashboard input:focus,
.w2d-providers-dashboard select:focus,
.w2d-providers-dashboard textarea:focus,
.w2d-organisation-dashboard input:focus,
.w2d-organisation-dashboard select:focus,
.w2d-organisation-dashboard textarea:focus,
.w2d-event-wrap input:focus,
.w2d-event-wrap select:focus,
.w2d-event-wrap textarea:focus {
  border-color: rgba(217, 155, 50, 0.72) !important;
  box-shadow:
    var(--w2d-ui-focus),
    0 10px 24px rgba(73, 41, 25, 0.07) !important;
  outline: 0 !important;
}

.w2d-provider-profile .w2d-date-badge,
.w2d-provider-profile .w2d-notice,
.w2d-provider-profile .w2d-empty,
.w2d-org-profile-wrap .w2d-date-badge,
.w2d-org-profile-wrap .w2d-notice,
.w2d-org-profile-wrap .w2d-empty,
.w2d-providers-dashboard .w2d-status-badge,
.w2d-providers-dashboard .w2d-type-badge,
.w2d-organisation-dashboard .w2d-notice {
  border-color: var(--w2d-ui-line) !important;
  border-radius: var(--w2d-ui-radius-md) !important;
  background: var(--w2d-ui-teal-soft) !important;
  color: var(--w2d-ui-teal) !important;
}

/* Theme alignment: organisation/provider edit pages */

.w2d-orgedit-wrap,
.w2d-editor-wrap {
  color: var(--w2d-ui-ink) !important;
  font-family: var(--w2d-ui-font) !important;
}

.w2d-orgedit-wrap :is(.w2d-card, .w2d-section-card, .w2d-editor-card, .w2d-image-upload, .w2d-leave-modal__panel),
.w2d-editor-wrap :is(.w2d-card, .w2d-section-card, .w2d-editor-card, .w2d-image-upload, .w2d-leave-modal__panel) {
  border-color: var(--w2d-ui-line) !important;
  background:
    linear-gradient(135deg, rgba(122, 36, 56, 0.045), transparent 38%),
    rgba(255, 253, 248, 0.94) !important;
  color: var(--w2d-ui-ink) !important;
  box-shadow: var(--w2d-ui-shadow-soft) !important;
}

.w2d-orgedit-wrap :is(.w2d-editor-head h2, .w2d-section-card h3, .w2d-image-upload__copy strong),
.w2d-editor-wrap :is(.w2d-editor-head h2, .w2d-section-card h3, .w2d-image-upload__copy strong) {
  color: var(--w2d-ui-primary-strong) !important;
  letter-spacing: 0 !important;
}

.w2d-orgedit-wrap :is(.w2d-editor-sub, .w2d-help, label, small),
.w2d-editor-wrap :is(.w2d-editor-sub, .w2d-help, label, small) {
  color: var(--w2d-ui-muted) !important;
}

.w2d-orgedit-wrap :is(.w2d-btn, button.w2d-btn),
.w2d-editor-wrap :is(.w2d-btn, button.w2d-btn) {
  border-color: var(--w2d-ui-line-strong) !important;
  background: var(--w2d-ui-surface-strong) !important;
  color: var(--w2d-ui-ink) !important;
}

.w2d-orgedit-wrap :is(.w2d-btn-primary, button.w2d-btn-primary),
.w2d-editor-wrap :is(.w2d-btn-primary, button.w2d-btn-primary),
.w2d-orgedit-wrap .w2d-image-upload__action,
.w2d-editor-wrap .w2d-image-upload__action {
  border-color: rgba(122, 36, 56, 0.28) !important;
  background:
    linear-gradient(135deg, var(--w2d-ui-primary-strong), var(--w2d-ui-primary) 56%, var(--w2d-ui-accent)) !important;
  color: #FFFFFF !important;
}

.w2d-orgedit-wrap :is(.w2d-input, .w2d-textarea, input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]), select, textarea),
.w2d-editor-wrap :is(.w2d-input, .w2d-textarea, input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border-color: var(--w2d-ui-line-strong) !important;
  background: var(--w2d-ui-surface-strong) !important;
  color: var(--w2d-ui-ink) !important;
}

html[data-ed-theme="dark"] body :is(.w2d-orgedit-wrap, .w2d-editor-wrap) {
  color: var(--ed-color-ink, #FAF7F2) !important;
}

html[data-ed-theme="dark"] body :is(.w2d-orgedit-wrap, .w2d-editor-wrap) :is(
  .w2d-card,
  .w2d-section-card,
  .w2d-editor-card,
  .w2d-image-upload,
  .w2d-leave-modal__panel,
  .w2d-notice,
  .w2d-sub-banner
) {
  border-color: var(--ed-color-line, rgba(255, 255, 255, .12)) !important;
  background:
    linear-gradient(135deg, rgba(var(--ed-color-primary-rgb, 236, 169, 190), .045), transparent 42%),
    var(--ed-color-panel-bg, rgba(30, 22, 20, .92)) !important;
  color: var(--ed-color-ink, #FAF7F2) !important;
  box-shadow: var(--ed-shadow-soft, 0 18px 44px rgba(0, 0, 0, .26)) !important;
}

html[data-ed-theme="dark"] body :is(.w2d-orgedit-wrap, .w2d-editor-wrap) :is(
  .w2d-editor-head h2,
  .w2d-section-card h3,
  .w2d-image-upload__copy strong
) {
  color: var(--ed-color-primary-strong, #C084FC) !important;
}

html[data-ed-theme="dark"] body :is(.w2d-orgedit-wrap, .w2d-editor-wrap) :is(
  .w2d-editor-sub,
  .w2d-help,
  label,
  small,
  .w2d-image-upload__copy span
) {
  color: var(--ed-color-muted, #98A1B3) !important;
}

html[data-ed-theme="dark"] body :is(.w2d-orgedit-wrap, .w2d-editor-wrap) :is(
  .w2d-btn,
  button.w2d-btn,
  .w2d-input,
  .w2d-textarea,
  input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  border-color: var(--ed-color-line-strong, rgba(255, 255, 255, .18)) !important;
  background: var(--ed-color-surface-strong, #1B1E2D) !important;
  color: var(--ed-color-ink, #FAF7F2) !important;
}

/* Dashboard palette lock: organisation, branch and provider dashboards */

html[data-ed-theme="dark"] body :is(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-organisation-invites
) {
  color: var(--ed-color-ink, #FAF7F2) !important;
}

html[data-ed-theme="dark"] body :is(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-organisation-invites
) :is(
  .w2d-organisation-card,
  .w2d-org-subscription,
  .w2d-organisation-panel,
  .w2d-branch-card,
  .w2d-slot-preview-panel,
  .w2d-slot-protection-panel,
  .w2d-provider-card,
  .w2d-dashboard-empty,
  .w2d-dashboard-notice,
  .w2d-dashboard-help,
  .w2d-events-manager,
  .w2d-calendar,
  .w2d-event-card,
  .w2d-stat,
  .w2d-organisation-invites,
  .w2d-invite-card,
  .w2d-invite-row,
  .w2d-invite-empty,
  .w2d-provider-card__subscription .w2d-subscription-card,
  .w2d-provider-card__subscription .w2d-dashboard-form
) {
  border-color: var(--ed-color-line, rgba(255, 255, 255, .12)) !important;
  background:
    linear-gradient(135deg, rgba(var(--ed-color-primary-rgb, 236, 169, 190), .045), transparent 42%),
    var(--ed-color-panel-bg, rgba(30, 22, 20, .92)) !important;
  color: var(--ed-color-ink, #FAF7F2) !important;
  box-shadow: var(--ed-shadow-soft, 0 18px 44px rgba(0, 0, 0, .26)) !important;
}

html[data-ed-theme="dark"] body :is(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-organisation-invites
) :is(
  .w2d-org-slot-update-form,
  .w2d-invite-form,
  .w2d-slot-preview-panel__grid div,
  .w2d-slot-protection-panel__stats div,
  .w2d-calendar__day,
  .w2d-calendar__nav-button,
  .w2d-calendar__item-settings,
  .w2d-view-toggle,
  .w2d-view-toggle__button,
  .w2d-org-pill,
  .w2d-status-badge,
  .w2d-type-badge
) {
  border-color: var(--ed-color-line-strong, rgba(255, 255, 255, .18)) !important;
  background: var(--ed-color-surface-strong, #1B1E2D) !important;
  color: var(--ed-color-ink, #FAF7F2) !important;
  box-shadow: 0 8px 22px rgba(var(--ed-color-shadow-rgb, 0, 0, 0), .18) !important;
}

html[data-ed-theme="dark"] body :is(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-organisation-invites
) :is(
  .w2d-dashboard-title,
  .w2d-organisation-card__title,
  .w2d-organisation-panel h2,
  .w2d-organisation-panel__header h3,
  .w2d-org-subscription__copy h3,
  .w2d-branch-card h3,
  .w2d-provider-card__title,
  .w2d-event-card__title,
  .w2d-invite-card h3,
  .w2d-events-manager h2,
  .w2d-calendar h2,
  .w2d-stat strong,
  strong
) {
  color: var(--ed-color-primary-strong, #C084FC) !important;
}

html[data-ed-theme="dark"] body :is(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-organisation-invites
) :is(
  .w2d-dashboard-eyebrow,
  .w2d-section-eyebrow,
  .w2d-organisation-card__eyebrow,
  .w2d-provider-card__eyebrow
) {
  color: var(--ed-color-primary, #7C4DFF) !important;
}

html[data-ed-theme="dark"] body :is(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-organisation-invites
) :is(
  .w2d-dashboard-subtitle,
  .w2d-organisation-card__tagline,
  .w2d-organisation-card__location,
  .w2d-org-subscription__copy div,
  .w2d-organisation-panel__header span,
  .w2d-branch-card p,
  .w2d-provider-card__tagline,
  .w2d-provider-card__location,
  .w2d-dashboard-notice span,
  .w2d-dashboard-empty p,
  .w2d-dashboard-help p,
  .w2d-event-card__meta,
  .w2d-event-card__date,
  .w2d-calendar__empty,
  .w2d-invite-sub,
  .w2d-stat span,
  label,
  small
) {
  color: var(--ed-color-muted, #98A1B3) !important;
}

html[data-ed-theme="dark"] body :is(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-organisation-invites
) :is(
  .w2d-btn,
  button.w2d-btn,
  .w2d-btn-soft,
  input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .w2d-org-input,
  .w2d-input
) {
  border-color: var(--ed-color-line-strong, rgba(255, 255, 255, .18)) !important;
  background: var(--ed-color-surface-strong, #1B1E2D) !important;
  color: var(--ed-color-ink, #FAF7F2) !important;
}

html[data-ed-theme="dark"] body :is(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-organisation-invites
) :is(
  .w2d-btn-primary,
  button.w2d-btn-primary,
  .w2d-view-toggle__button[aria-pressed="true"],
  .w2d-calendar__day.is-selected,
  .w2d-calendar__day.has-events,
  .w2d-org-pill.is-active,
  .w2d-status-badge,
  .w2d-type-badge
) {
  border-color: rgba(var(--ed-color-primary-rgb, 236, 169, 190), .34) !important;
  background:
    linear-gradient(135deg, rgba(var(--ed-color-primary-rgb, 236, 169, 190), .18), rgba(var(--ed-color-accent-rgb, 240, 189, 96), .16)),
    var(--ed-color-primary-soft, rgba(236, 169, 190, .14)) !important;
  color: var(--ed-color-primary-strong, #C084FC) !important;
}

html[data-ed-theme="dark"] body :is(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-organisation-invites
) :is(
  .w2d-organisation-card__avatar,
  .w2d-provider-card__avatar,
  .w2d-event-card__media,
  .w2d-calendar__day.has-events em
) {
  background:
    linear-gradient(135deg, var(--ed-color-primary-strong, #C084FC), var(--ed-color-primary, #7C4DFF) 56%, var(--ed-color-accent, #FF5C7A)) !important;
  color: var(--ed-color-on-primary, #141624) !important;
}

/* Public event detail palette lock */

html[data-ed-theme="dark"] body .w2d-review {
  color: var(--ed-color-ink, #FAF7F2) !important;
}

html[data-ed-theme="dark"] body .w2d-review :is(
  .w2d-hero,
  .w2d-hero-body,
  .w2d-box,
  .w2d-r-cal,
  .w2d-r-cal-day,
  .w2d-r-leg,
  .w2d-ev,
  .w2d-debug,
  .w2d-warn,
  .w2d-entity-logo,
  .w2d-review-switcher select
) {
  border-color: var(--ed-color-line, rgba(255, 255, 255, .12)) !important;
  background:
    linear-gradient(135deg, rgba(var(--ed-color-primary-rgb, 236, 169, 190), .045), transparent 42%),
    var(--ed-color-panel-bg, rgba(30, 22, 20, .92)) !important;
  color: var(--ed-color-ink, #FAF7F2) !important;
  box-shadow: var(--ed-shadow-soft, 0 18px 44px rgba(0, 0, 0, .26)) !important;
}

html[data-ed-theme="dark"] body .w2d-review :is(
  .w2d-title,
  .w2d-box h4,
  .w2d-r-cal-title,
  .w2d-entity-name,
  .w2d-ev a,
  h3,
  strong
) {
  color: var(--ed-color-primary-strong, #C084FC) !important;
}

html[data-ed-theme="dark"] body .w2d-review :is(
  .w2d-muted,
  .w2d-subtitle,
  .w2d-desc,
  .w2d-k,
  .w2d-v,
  .w2d-r-cal-dow,
  .w2d-r-cal-legend,
  .w2d-ev small,
  .w2d-review-switcher label
) {
  color: var(--ed-color-muted, #98A1B3) !important;
}

html[data-ed-theme="dark"] body .w2d-review :is(
  .w2d-badge,
  .w2d-r-pill,
  .w2d-social,
  .w2d-btn,
  button.w2d-btn
) {
  border-color: var(--ed-color-line-strong, rgba(255, 255, 255, .18)) !important;
  background: var(--ed-color-surface-strong, #1B1E2D) !important;
  color: var(--ed-color-ink, #FAF7F2) !important;
}

html[data-ed-theme="dark"] body .w2d-review :is(
  .w2d-btn-primary,
  button.w2d-btn-primary,
  .w2d-r-cal-day.is-hit,
  .w2d-r-cal-day.is-feature
) {
  border-color: rgba(var(--ed-color-primary-rgb, 236, 169, 190), .34) !important;
  background: var(--ed-color-primary-soft, rgba(236, 169, 190, .14)) !important;
  color: var(--ed-color-primary-strong, #C084FC) !important;
}

html[data-ed-theme="dark"] body .w2d-review :is(.w2d-kv) {
  border-color: var(--ed-color-line, rgba(255, 255, 255, .12)) !important;
}

/* ============================================================
   Pulse / Stage Lights product palette
   Applies the live brand tokens to dashboards, profiles, events,
   branch invites, filters, forms, cards and empty states.
============================================================ */

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) {
  --w2d-theme-bg: var(--ed-bg-light);
  --w2d-theme-surface: var(--ed-surface-light);
  --w2d-theme-text: var(--ed-text-main);
  --w2d-theme-muted: var(--ed-text-muted);
  --w2d-theme-border: var(--ed-border-light);
  color: var(--w2d-theme-text);
}

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) {
  --w2d-theme-bg: var(--ed-bg-dark);
  --w2d-theme-surface: var(--ed-surface-dark);
  --w2d-theme-text: var(--ed-bg-light);
  --w2d-theme-muted: var(--ed-text-muted);
  --w2d-theme-border: var(--ed-border-dark);
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  h1,
  h2,
  h3,
  h4,
  .w2d-dashboard-title,
  .w2d-dashboard-hero__title,
  .w2d-organisation-profile__name,
  .w2d-provider-profile__name,
  .w2d-title
) {
  color: var(--w2d-theme-text) !important;
  letter-spacing: 0 !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  p,
  small,
  label,
  .w2d-muted,
  .w2d-help,
  .w2d-subtitle,
  .w2d-desc,
  .w2d-meta,
  .w2d-k,
  .w2d-v,
  .w2d-dashboard-meta,
  .w2d-organisation-profile__meta,
  .w2d-provider-profile__meta
) {
  color: var(--w2d-theme-muted) !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  .w2d-card,
  .w2d-box,
  .w2d-panel,
  .w2d-dashboard-card,
  .w2d-dashboard-section,
  .w2d-dashboard-hero,
  .w2d-dashboard-stat,
  .w2d-organisation-card,
  .w2d-provider-card,
  .w2d-branch-card,
  .w2d-event-card,
  .w2d-invite-card,
  .w2d-invites-card,
  .w2d-branch-invites,
  .w2d-empty,
  .w2d-empty-state,
  .w2d-dashboard-empty,
  .w2d-r-cal,
  .w2d-r-leg,
  .w2d-ev,
  .w2d-review-section
) {
  border-color: var(--w2d-theme-border) !important;
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--ed-secondary-rgb) / 0.08), transparent 30%),
    linear-gradient(135deg, rgb(var(--ed-primary-rgb) / 0.045), transparent 44%),
    var(--w2d-theme-surface) !important;
  color: var(--w2d-theme-text) !important;
  box-shadow: 0 18px 46px rgb(var(--ed-bg-dark-rgb) / 0.08) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  .w2d-card,
  .w2d-box,
  .w2d-panel,
  .w2d-dashboard-card,
  .w2d-dashboard-section,
  .w2d-dashboard-hero,
  .w2d-dashboard-stat,
  .w2d-organisation-card,
  .w2d-provider-card,
  .w2d-branch-card,
  .w2d-event-card,
  .w2d-invite-card,
  .w2d-invites-card,
  .w2d-branch-invites,
  .w2d-empty,
  .w2d-empty-state,
  .w2d-dashboard-empty,
  .w2d-r-cal,
  .w2d-r-leg,
  .w2d-ev,
  .w2d-review-section
) {
  box-shadow: 0 22px 56px rgb(var(--ed-bg-dark-rgb) / 0.28) !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  border-color: var(--w2d-theme-border) !important;
  background: var(--w2d-theme-surface) !important;
  color: var(--w2d-theme-text) !important;
  box-shadow: none !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus,
  select:focus,
  textarea:focus
) {
  border-color: var(--ed-primary) !important;
  box-shadow: 0 0 0 3px rgb(var(--ed-primary-rgb) / 0.20) !important;
  outline: 0 !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  .w2d-btn-primary,
  .w2d-primary,
  .w2d-submit,
  .w2d-save,
  .w2d-create,
  button[type="submit"],
  input[type="submit"]
) {
  border-color: transparent !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, #FFFFFF 14%, transparent), transparent 48%),
    var(--ed-primary) !important;
  color: #FFFFFF !important;
  box-shadow:
    0 14px 30px rgb(var(--ed-primary-rgb) / 0.22),
    inset 0 1px 0 rgb(var(--ed-bg-light-rgb) / 0.24) !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  .w2d-btn-primary,
  .w2d-primary,
  .w2d-submit,
  .w2d-save,
  .w2d-create,
  button[type="submit"],
  input[type="submit"]
):hover {
  background:
    linear-gradient(180deg, color-mix(in srgb, #FFFFFF 18%, transparent), transparent 48%),
    color-mix(in srgb, var(--ed-primary) 88%, var(--ed-bg-dark)) !important;
  transform: translateY(-1px);
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  .w2d-btn,
  button,
  .w2d-pill,
  .w2d-badge,
  .w2d-type-badge,
  .w2d-status-badge,
  .w2d-filter-chip,
  .w2d-org-pill,
  .w2d-view-toggle__button
) {
  border-color: var(--w2d-theme-border) !important;
  color: var(--w2d-theme-text) !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  .is-active,
  .is-selected,
  [aria-selected="true"],
  [aria-pressed="true"],
  .w2d-calendar__day.is-selected,
  .w2d-calendar__day.has-events,
  .w2d-r-cal-day.is-hit,
  .w2d-r-cal-day.is-feature
) {
  border-color: var(--ed-primary) !important;
  background: rgb(var(--ed-primary-rgb) / 0.12) !important;
  color: var(--ed-primary) !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  .w2d-success,
  .w2d-confirmed,
  .w2d-available,
  .w2d-status--active,
  .w2d-badge--success,
  .w2d-calendar__day.has-events em
) {
  border-color: rgb(var(--ed-accent-rgb) / 0.36) !important;
  background: rgb(var(--ed-accent-rgb) / 0.16) !important;
  color: var(--ed-bg-dark) !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  .w2d-warning,
  .w2d-limited,
  .w2d-selling-fast,
  .w2d-badge--warning,
  .w2d-warn
) {
  border-color: rgb(var(--ed-warning-rgb) / 0.42) !important;
  background: rgb(var(--ed-warning-rgb) / 0.18) !important;
  color: var(--ed-bg-dark) !important;
}

:where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites
) :where(
  .w2d-featured,
  .w2d-trending,
  .w2d-badge--featured,
  .w2d-badge--event
) {
  border-color: rgb(var(--ed-secondary-rgb) / 0.38) !important;
  background: rgb(var(--ed-secondary-rgb) / 0.14) !important;
  color: var(--ed-secondary) !important;
}

:where(
  .w2d-organisation-card__avatar,
  .w2d-provider-card__avatar,
  .w2d-organisation-profile__avatar,
  .w2d-provider-profile__avatar,
  .w2d-profile-avatar,
  .w2d-entity-logo,
  .w2d-avatar
) {
  border: 2px solid transparent !important;
  background:
    linear-gradient(var(--w2d-theme-surface), var(--w2d-theme-surface)) padding-box,
    linear-gradient(135deg, var(--ed-primary), var(--ed-secondary), var(--ed-accent)) border-box !important;
}

:where(
  .w2d-branch-invites,
  .w2d-invites,
  .w2d-organisation-invites
) :where(.w2d-empty, .w2d-empty-state, .w2d-invite-empty, .w2d-no-invites) {
  border: 1px dashed rgb(var(--ed-primary-rgb) / 0.28) !important;
  background: rgb(var(--ed-primary-rgb) / 0.08) !important;
  color: var(--w2d-theme-muted) !important;
}

/* ============================================================
   Dark mode depth layer for dashboards, public profiles, forms,
   cards, filters, modals, popovers, drawers and sheets.
============================================================ */

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites,
  .w2d-orgedit-wrap,
  .w2d-editor-wrap
) {
  --w2d-theme-bg: var(--ed-bg);
  --w2d-theme-surface: var(--ed-surface);
  --w2d-theme-raised: var(--ed-surface-raised);
  --w2d-theme-sheet: var(--ed-sheet);
  --w2d-theme-sheet-raised: var(--ed-sheet-raised);
  --w2d-theme-text: var(--ed-text);
  --w2d-theme-muted: var(--ed-muted);
  --w2d-theme-border: var(--ed-border);
  --w2d-theme-border-strong: var(--ed-border-strong);
  color: var(--ed-text) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites,
  .w2d-orgedit-wrap,
  .w2d-editor-wrap
) :where(
  .w2d-card,
  .w2d-box,
  .w2d-panel,
  .w2d-dashboard-card,
  .w2d-dashboard-section,
  .w2d-dashboard-stat,
  .w2d-organisation-card,
  .w2d-provider-card,
  .w2d-branch-card,
  .w2d-event-card,
  .w2d-invite-card,
  .w2d-invites-card,
  .w2d-branch-invites,
  .w2d-empty,
  .w2d-empty-state,
  .w2d-dashboard-empty,
  .w2d-review-section
) {
  border-color: var(--ed-border) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--ed-surface) !important;
  color: var(--ed-text) !important;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.025) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites,
  .w2d-orgedit-wrap,
  .w2d-editor-wrap
) :where(
  .w2d-dashboard-hero,
  .w2d-dashboard-widget,
  .w2d-stat-card,
  .w2d-summary-card,
  .w2d-featured,
  .w2d-active-card,
  .w2d-selected-card,
  .w2d-modal,
  .w2d-dialog,
  .w2d-popover,
  .w2d-dropdown,
  .w2d-sheet,
  .w2d-bottom-sheet,
  .w2d-drawer,
  .w2d-side-panel,
  .w2d-filter-panel
) {
  border-color: var(--ed-border-strong) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    var(--ed-surface-raised) !important;
  color: var(--ed-text) !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.38),
    0 0 32px rgb(var(--ed-primary-dark-rgb) / 0.08) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-sheet,
  .w2d-bottom-sheet,
  .w2d-drawer,
  .w2d-modal,
  .w2d-dialog,
  .w2d-popover,
  .w2d-dropdown,
  .w2d-side-panel,
  .w2d-filter-panel,
  .w2d-sheet__chrome,
  .w2d-sheet__inner,
  .w2d-sheet__panel
) {
  border-color: var(--ed-border-strong) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    var(--ed-sheet) !important;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 36px rgb(var(--ed-primary-dark-rgb) / 0.10) !important;
}

html[data-ed-theme="dark"] :where(.w2d-bottom-sheet, .w2d-sheet, .w2d-sheet__chrome) {
  border-top: 1px solid var(--ed-border-strong) !important;
  box-shadow:
    0 -22px 70px rgba(0, 0, 0, 0.46),
    0 -1px 0 rgba(255, 255, 255, 0.06),
    0 0 42px rgb(var(--ed-primary-dark-rgb) / 0.12) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-sheet-handle,
  .w2d-bottom-sheet-handle,
  .w2d-sheet__handle,
  .w2d-drag-handle
) {
  background: var(--ed-border-strong) !important;
  box-shadow: 0 0 12px rgb(var(--ed-primary-dark-rgb) / 0.22) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-sheet-header,
  .w2d-bottom-sheet-header,
  .w2d-modal-header,
  .w2d-dialog-header,
  .w2d-panel-header,
  .w2d-sheet__header
) {
  border-bottom: 1px solid var(--ed-border) !important;
  background: var(--ed-sheet-raised) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites,
  .w2d-orgedit-wrap,
  .w2d-editor-wrap
) :where(h1, h2, h3, h4, h5, strong, .w2d-title, .w2d-dashboard-title) {
  color: var(--ed-text) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites,
  .w2d-orgedit-wrap,
  .w2d-editor-wrap
) :where(p, small, label, .w2d-muted, .w2d-help, .w2d-meta, .w2d-subtitle, .w2d-desc, .w2d-k, .w2d-v) {
  color: var(--ed-muted) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites,
  .w2d-orgedit-wrap,
  .w2d-editor-wrap
) :where(
  input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  border-color: var(--ed-border-strong) !important;
  background: var(--ed-surface-soft) !important;
  color: var(--ed-text) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites,
  .w2d-orgedit-wrap,
  .w2d-editor-wrap
) :where(
  input::placeholder,
  textarea::placeholder
) {
  color: var(--ed-muted) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-event-wrap,
  .w2d-providers-dashboard,
  .w2d-organisation-dashboard,
  .w2d-organisation-profile,
  .w2d-provider-profile,
  .w2d-profile-composer,
  .w2d-official-venue-form,
  .w2d-invites,
  .w2d-organisation-invites,
  .w2d-orgedit-wrap,
  .w2d-editor-wrap
) :where(input:focus, select:focus, textarea:focus) {
  border-color: var(--ed-primary-live) !important;
  box-shadow: 0 0 0 4px rgb(var(--ed-primary-dark-rgb) / 0.18) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-btn-primary,
  .w2d-primary,
  .w2d-submit,
  .w2d-save,
  .w2d-create,
  button[type="submit"],
  input[type="submit"]
) {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--ed-primary-live), var(--ed-secondary-live)) !important;
  color: #FFFFFF !important;
  box-shadow:
    0 12px 28px rgb(var(--ed-primary-dark-rgb) / 0.28),
    0 0 18px rgb(var(--ed-secondary-dark-rgb) / 0.14) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-btn,
  .w2d-pill,
  .w2d-badge,
  .w2d-type-badge,
  .w2d-status-badge,
  .w2d-filter-chip,
  .w2d-org-pill,
  .w2d-view-toggle__button
) {
  border-color: var(--ed-border-strong) !important;
  background: rgb(var(--ed-primary-dark-rgb) / 0.08) !important;
  color: var(--ed-primary-live) !important;
}

html[data-ed-theme="dark"] :where(.is-active, .is-selected, [aria-selected="true"], [aria-pressed="true"]) {
  border-color: rgb(var(--ed-primary-dark-rgb) / 0.42) !important;
  background: rgb(var(--ed-primary-dark-rgb) / 0.16) !important;
  color: var(--ed-primary-live) !important;
}

html[data-ed-theme="dark"] :where(.w2d-featured, .w2d-trending, .w2d-badge--featured, .w2d-badge--event) {
  border-color: rgb(var(--ed-secondary-dark-rgb) / 0.48) !important;
  background: rgb(var(--ed-secondary-dark-rgb) / 0.16) !important;
  color: var(--ed-secondary-live) !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.40),
    0 0 30px rgb(var(--ed-secondary-dark-rgb) / 0.16) !important;
}

html[data-ed-theme="dark"] :where(.w2d-success, .w2d-confirmed, .w2d-available, .w2d-status--active, .w2d-badge--success) {
  border-color: rgb(var(--ed-accent-dark-rgb) / 0.42) !important;
  background: rgb(var(--ed-accent-dark-rgb) / 0.16) !important;
  color: var(--ed-accent-live) !important;
}

html[data-ed-theme="dark"] :where(.w2d-warning, .w2d-limited, .w2d-selling-fast, .w2d-badge--warning, .w2d-warn) {
  border-color: rgb(var(--ed-warning-dark-rgb) / 0.42) !important;
  background: rgb(var(--ed-warning-dark-rgb) / 0.16) !important;
  color: var(--ed-warning-live) !important;
}

html[data-ed-theme="dark"] :where(.w2d-social, .w2d-community, .w2d-badge--social) {
  border-color: rgb(var(--ed-social-dark-rgb) / 0.42) !important;
  background: rgb(var(--ed-social-dark-rgb) / 0.16) !important;
  color: var(--ed-social-live) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-organisation-card__avatar,
  .w2d-provider-card__avatar,
  .w2d-organisation-profile__avatar,
  .w2d-provider-profile__avatar,
  .w2d-profile-avatar,
  .w2d-entity-logo,
  .w2d-avatar
) {
  background:
    linear-gradient(var(--ed-surface), var(--ed-surface)) padding-box,
    linear-gradient(135deg, var(--ed-primary-dark) 0%, var(--ed-secondary-dark) 55%, var(--ed-accent-dark) 100%) border-box !important;
}

/* Late contrast guard for nested dashboard rows in dark mode. */
html[data-ed-theme="dark"] :where(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-provider-dashboard,
  .w2d-branch-dashboard
) :where(
  .w2d-branch-card,
  .w2d-provider-card,
  .w2d-dashboard-card,
  .w2d-dashboard-section,
  .w2d-event-card,
  .w2d-calendar,
  .w2d-calendar-day,
  .w2d-list-row
) {
  border-color: var(--ed-border-strong, #30364d) !important;
  background-color: var(--ed-surface, #232739) !important;
  color: var(--ed-text, #f6f7fb) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-provider-dashboard,
  .w2d-branch-dashboard
) :where(
  .w2d-branch-card,
  .w2d-provider-card,
  .w2d-dashboard-card,
  .w2d-dashboard-section,
  .w2d-event-card,
  .w2d-calendar,
  .w2d-calendar-day,
  .w2d-list-row
) :where(h1, h2, h3, h4, strong, b, .w2d-branch-title, .w2d-provider-card__title, .w2d-event-card__title) {
  color: var(--ed-text, #f6f7fb) !important;
}

html[data-ed-theme="dark"] :where(
  .w2d-organisation-dashboard,
  .w2d-providers-dashboard,
  .w2d-provider-dashboard,
  .w2d-branch-dashboard
) :where(
  .w2d-branch-card,
  .w2d-provider-card,
  .w2d-dashboard-card,
  .w2d-dashboard-section,
  .w2d-event-card,
  .w2d-calendar,
  .w2d-calendar-day,
  .w2d-list-row
) :where(p, span, small, em, label, .w2d-meta, .w2d-muted, .w2d-help, .w2d-branch-meta, .w2d-dashboard-meta, .w2d-card-meta, .w2d-provider-card__tagline, .w2d-provider-card__location) {
  color: var(--ed-muted, #b4bcd0) !important;
}
