/*
  Styles for prototype-only elements that don't exist in the Angular app,
  plus documented collision workarounds where stripping Angular's scoping
  attributes causes Bulma global rules to leak through.
*/

/* wx-icon custom element (Angular renders this as a component, we use it as a plain element) */
wx-icon { display: inline-flex; align-items: center; justify-content: center; }

/* ===== Collision workarounds ===== */
/* Bulma's .menu-list a sets background-color via HSL variables and shifts it on :hover.
   In the real app, Angular's [_ngcontent-*] scoping gives .logo higher specificity so
   the Bulma background never applies. Without scoping, we need to set it explicitly. */
wx-menu .menu-list a.logo { background-color: var(--bulma-scheme-main); }
wx-menu .menu-list a.logo:hover { background-color: var(--bulma-scheme-main); }

/* Bulma's .icon.is-small (0,2,0) overrides wx-base-widget .is-circle (0,1,1).
   In the real app, Angular scoping gives .is-circle higher specificity. */
wx-base-widget .icon.is-circle { height: 34px; width: 34px; }

/* Extraction converted :host(.is-hoverable) to "wx-icon .is-hoverable" (descendant)
   instead of "wx-icon.is-hoverable" (self). The color rule doesn't apply. */
wx-icon.is-hoverable { color: var(--bulma-text-weak); }
wx-icon.is-hoverable:hover { color: var(--bulma-text-strong); }

/* wx-switch component styles not captured. Bulma's label spacing adds margin-bottom
   to the toggle label. In the real app, Angular scoping prevents this. */
wx-switch label.toggle-switch { margin-bottom: 0; }

/* Bulma's .container sets max-width and margin:auto which leaks into wx-checkbox's
   label (class="is-flex container"). In the real app, Angular scoping prevents this. */
wx-checkbox label.container { max-width: none; margin: 0; }

/* Bulma's .navbar-link padding overrides the component-scoped .button-profile padding.
   In the real app, Angular scoping gives .button-profile higher specificity. */
wx-top-bar .navbar-link.button-profile { padding: 0; border: 2px solid var(--bulma-scheme-main); width: 34px; height: 34px; }

/* Collisions #6/#8/#9: wx-form-field's component rule ":not(:last-child) { margin-bottom: 1.25rem }"
   leaks into nested custom element components. In the real app, Angular's attribute scoping
   prevents the rule from crossing component boundaries. Fix: reset margin on :not(:last-child)
   inside specific sub-components where the leak causes visible spacing issues. */
wx-date-combobox :not(:last-child),
wx-city-search-field :not(:last-child),
wx-select :not(:last-child),
wx-input-select-user :not(:last-child),
wx-user-list-select-item :not(:last-child),
wx-switch :not(:last-child),
wx-checkbox :not(:last-child) { margin-bottom: 0; }

/* Collision #13: wx-form-field :not(:last-child) { margin-bottom: 1.25rem } (0,1,1) leaks into
   wx-checkbox's .checkbox-label div. Higher-specificity reset to ensure it always wins. */
wx-checkbox .checkbox-label { margin-bottom: 0; }

/* Collision #10: wx-form-field.field:not(:last-child) gets margin-bottom from Bulma's
   block-spacing rule (specificity 0,2,0) which overrides the component's 1.25rem (0,0,1).
   In real app, Angular [_nghost] has higher specificity. */
wx-form-field.field:not(:last-child) { margin-bottom: 1.25rem; }

/* Collision #12: Bulma's .label:not(:last-child) { margin-bottom: var(--bulma-label-spacing) }
   (0,2,0) overrides wx-form-field .label { margin-bottom: 0 } (0,1,1).
   In the real app, Angular scoping gives the component rule higher specificity. */
wx-form-field .label:not(:last-child) { margin-bottom: 0; }

/* Collision #11: Bulma's .icon { width: var(--bulma-icon-dimensions) } (0,1,0) overrides
   wx-kadence-space wx-icon { width: 2rem } (0,0,2). In the real app, Angular's attribute
   scoping boosts the component rule. */
wx-kadence-space wx-icon.icon { width: 2rem; height: 2rem; border-radius: 1rem; }

/* profile.component.scss: section + section rule (component-scoped, not in compiled CSS).
   Adds dividers and spacing between right-column sections (Default Kadence, Working hours, Bio, Teams). */
wx-profile section + section {
  border-top: 1px solid var(--bulma-border);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

/* profile.component.scss: .media padding/margin for the avatar + name block in the left column. */
wx-profile .media {
  align-items: center;
  padding: 0 0 0.75rem 0;
  margin-bottom: calc(1.5rem - 0.75rem);
}
wx-profile .media .media-left { margin-right: 2rem; }
wx-profile .media .profile-picture { width: 100px; height: 100px; }

/* :host styles not captured by extraction for these components.
   They need flex layout to fill available space. */
wx-surveys-create { display: flex; flex-grow: 1; flex-direction: column; overflow: auto; }
wx-announcement-create-edit { display: flex; flex-grow: 1; flex-direction: column; overflow: auto; }

/* ===== Account Settings notification grid (component-scoped in Angular) ===== */
/* From settings.component.scss — grid layout for notification checkboxes */
.grid-container-2-col {
  display: grid;
  grid-template-columns: 1fr 55px;
  grid-template-rows: 0.5fr;
  grid-column-gap: 0;
  grid-row-gap: 8px;
  grid-auto-flow: dense;
}
.grid-container-3-col {
  display: grid;
  grid-template-columns: 1fr repeat(2, 55px);
  grid-template-rows: 0.5fr;
  grid-column-gap: 0;
  grid-row-gap: 8px;
  grid-auto-flow: dense;
}
.grid-item { display: grid; justify-content: center; }
.grid-title { grid-column: 1 / -1; }

/* ===== Widget Cards (home page) ===== */
.widget-card {
  background: white;
  border-radius: var(--bulma-radius-large);
  box-shadow: 0 1px 15px 0 rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.widget-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--kadence-grey-200);
}
.widget-card-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 600; color: var(--bulma-text-strong);
}
.widget-icon-circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.875rem;
}

/* ===== Booking List Item (home widget) ===== */
.booking-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0; border-bottom: 1px solid var(--kadence-grey-200);
}
.booking-item:last-child { border-bottom: none; }
.booking-item-info { display: flex; flex-direction: column; gap: 0.125rem; }
.booking-item-title { font-size: 0.875rem; font-weight: 600; color: var(--bulma-text-strong); }
.booking-item-meta { font-size: 0.75rem; color: var(--bulma-text-weak); }

/* ===== Status Tags ===== */
.status-tag {
  display: inline-flex; align-items: center; padding: 0.25em 0.75em;
  border-radius: 9999px; font-size: 0.75rem; font-weight: 600;
}
.status-tag.is-confirmed { background: var(--kadence-green-100); color: var(--kadence-green-500); }
.status-tag.is-pending { background: var(--kadence-yellow-100); color: var(--kadence-yellow-600); }
.status-tag.is-cancelled { background: var(--kadence-red-100); color: var(--kadence-red-600); }

/* ===== Announcement Item (home widget) ===== */
.announcement-item { padding: 0.75rem 0; border-bottom: 1px solid var(--kadence-grey-200); }
.announcement-item:last-child { border-bottom: none; }
.announcement-item-title { font-size: 0.875rem; font-weight: 600; color: var(--bulma-text-strong); margin-bottom: 0.25rem; }
.announcement-item-date { font-size: 0.75rem; color: var(--bulma-text-weak); margin-bottom: 0.25rem; }
.announcement-item-preview { font-size: 0.75rem; color: var(--kadence-grey-500); }

/* ===== Occupancy Bar (home widget) ===== */
.occupancy-bar { height: 8px; background: var(--kadence-grey-200); border-radius: 4px; overflow: hidden; margin-top: 0.5rem; }
.occupancy-bar-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }

/* ===== Agents (prototype-only feature: agents hub + new joiner agent) ===== */
/* Host elements fill the content area, mirroring wx-surveys-create above. */
wx-agents, wx-new-joiner-agent { display: flex; flex-direction: column; flex-grow: 1; }

/* Agent icon chip — rounded square with a tinted background. Tints reuse the
   Kadence palette vars where available; a couple of decorative ones are literal. */
.agent-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: var(--kadence-blue-100); color: var(--kadence-blue-600);
}
.agent-chip.is-small { width: 36px; height: 36px; border-radius: 10px; }
.agent-chip.is-green  { background: var(--kadence-green-100); color: var(--kadence-green-500); }
.agent-chip.is-purple { background: #efe6fb; color: #7b3fe4; }
.agent-chip.is-orange { background: #fdeadd; color: #e8743b; }
.agent-chip.is-grey   { background: var(--kadence-grey-200); color: var(--kadence-grey-500); }

/* Hub cards — boxes with a hover lift; teasers are dashed + muted. */
.agent-card {
  display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--kadence-grey-300); box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.agent-card { color: inherit; }
a.agent-card:hover { border-color: var(--kadence-grey-400); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.agent-card.is-soon { background: var(--bulma-scheme-main-bis); border-style: dashed; }
.agent-card-spacer { flex-grow: 1; }

/* How-it-works step tile. */
.agent-step { display: flex; flex-direction: column; gap: 0.5rem; height: 100%; }

/* Placement rule rows + the muted fallback row. */
.agent-rule { border: 1px solid var(--kadence-grey-300); border-radius: var(--bulma-radius-large); padding: 0.75rem 1rem; }
.agent-rule + .agent-rule { margin-top: 0.75rem; }
.agent-rule.is-fallback { background: var(--bulma-scheme-main-bis); border-style: dashed; }

/* Activity feed rows; attention rows get a left accent. */
.agent-activity-row { border: 1px solid var(--kadence-grey-300); border-radius: var(--bulma-radius-large); padding: 1rem; }
.agent-activity-row + .agent-activity-row { margin-top: 0.75rem; }
.agent-activity-row.is-attention { border-left: 3px solid var(--kadence-yellow-600); }

/* Notification-preview block inside the run-detail modal. */
.agent-notif { border: 1px solid var(--kadence-grey-300); border-radius: var(--bulma-radius-large); background: var(--bulma-scheme-main-bis); padding: 1rem; }

/* ===== file:// compatibility: override root-relative font paths ===== */
/* production.css and component-styles use url(/assets/...) which fails on file://.
   These @font-face declarations use paths relative to this CSS file's location
   (_shared/css/) and always win because prototype-only.css loads last. */
@font-face {
  font-family: "Font Awesome 6 Pro";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url(../fonts/fontawesome/fa-solid-900.woff2) format("woff2");
}
@font-face {
  font-family: "Font Awesome 6 Pro";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../fonts/fontawesome/fa-regular-400.woff2) format("woff2");
}
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../fonts/fontawesome/fa-brands-400.woff2) format("woff2");
}
@font-face {
  font-family: "Font Awesome Kit";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../fonts/fontawesome/custom-icons.woff2) format("woff2");
}

/* ===== file:// compatibility: override root-relative background-image paths ===== */
/* component-styles-1.css uses url("/assets/images/logo-powered-by.png") which fails on file://. */
wx-menu .powered-by-kadence-logo { background-image: url(../../assets/images/logo-powered-by.png) !important; }
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  wx-menu .powered-by-kadence-logo { background-image: url(../../assets/images/logo-powered-by@2x.png) !important; }
}

/* ===== Create-event wizard (wx-create-event) =====
   The create-event component's :host and wizard layout SCSS were not captured by
   the DOM extraction — the same gap documented above for wx-surveys-create. Supply
   the layout the component renders in the real app, using Kadence tokens only. */

/* Host fills the content area (matches the wx-surveys-create fix above). */
wx-create-event { display: flex; flex-direction: column; flex-grow: 1; overflow: auto; }
/* Centre the wizard as a column on wide screens (header, body, action bar aligned). */
wx-create-event > h1.title,
wx-create-event .box.main,
wx-create-event .box-action-bar { max-width: 1080px; margin-left: auto; margin-right: auto; width: 100%; }
/* Comfortable padding inside the wizard card (content was flush to the top). */
wx-create-event .box.main { padding: 2rem; }
wx-create-event section.about .inner { padding-top: 0.25rem; }

/* Form controls inherit the page font (Inter) — native select/input/date controls
   otherwise fall back to the OS font in some browsers, looking inconsistent. */
wx-create-event input, wx-create-event select, wx-create-event textarea,
wx-event-detail input, wx-event-detail select, wx-event-detail textarea,
wx-workplace-events-overview input, wx-workplace-events-overview select, wx-workplace-events-overview textarea,
wx-date-combobox input, wx-date-combobox .date-label { font-family: inherit; }

/* Date combobox: drop the native readonly-input box, and size the trigger like a
   select so date + time fields line up at the same height. */
wx-create-event wx-date-combobox input { border: none; background: transparent; box-shadow: none; }
wx-create-event wx-date-combobox .date-trigger { min-height: 40px; }

/* Softer, lighter field underlines across the event pages (was a dark slate). */
wx-create-event .select select, wx-create-event .input, wx-create-event .textarea, wx-create-event .date-trigger,
wx-event-detail .select select, wx-event-detail .input, wx-event-detail .textarea,
wx-workplace-events-overview .select select, wx-workplace-events-overview .input, wx-workplace-events-overview .textarea {
  border-bottom-color: var(--kadence-grey-300);
}

/* Step sections: only the active one shows (inactive ones get .is-hidden).
   The section must NOT also carry .is-flex — its display:flex !important would
   beat .is-hidden's display:none !important and every step would show at once. */
wx-create-event section.about { display: flex; flex-direction: column; min-width: 0; }
wx-create-event section.about .inner { width: 100%; max-width: 660px; }

/* Left wizard nav: a fixed-width column holding a vertical step list. */
wx-create-event aside.wizard { flex: 0 0 13.5rem; margin-right: 2rem; }
/* Override Bulma's horizontal .tabs styling for the vertical wizard list. */
wx-create-event aside.wizard ol.tabs {
  display: flex; flex-direction: column; align-items: stretch;
  border-bottom: 0; margin: 0; overflow: visible;
}
wx-create-event aside.wizard ol.tabs li { display: block; margin: 0; }
wx-create-event aside.wizard ol.tabs li a {
  display: flex; align-items: center; justify-content: flex-start;
  padding: 0.5rem 0; margin-bottom: 0.75rem;
  border-bottom: 0; color: var(--kadence-grey-500); font-weight: 500;
}
wx-create-event aside.wizard ol.tabs li a:hover { color: var(--bulma-text-strong); background: transparent; }
wx-create-event aside.wizard ol.tabs li.is-active a { color: var(--bulma-text-strong); font-weight: 700; }
wx-create-event aside.wizard ol.tabs li.is-disabled a { color: var(--kadence-grey-350); pointer-events: none; }

/* Mobile step dots (visible only on mobile via .is-hidden-tablet on the row). */
wx-create-event .steps { display: flex; gap: 0.5rem; padding-bottom: 1rem; }
wx-create-event .steps .step-circle {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--kadence-grey-300); color: #fff; font-size: 0.875rem;
}
wx-create-event .steps .step.is-active .step-circle { background: var(--bulma-primary); }

/* ── Visitor types prototype ───────────────────────────────────────── */
#vt-toast-host { position: fixed; top: 16px; right: 24px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.vt-toast { min-width: 260px; padding: 12px 14px; margin: 0 !important; box-shadow: 0 6px 24px rgba(16,24,40,.14); }
.vt-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #d0d5dd; border-top-color: #667085; animation: vt-spin .8s linear infinite; display: inline-block; flex-shrink: 0; }
@keyframes vt-spin { to { transform: rotate(360deg); } }
.vt-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--bulma-scheme-main, #fff);
  border-radius: 8px; box-shadow: 0 8px 28px rgba(16,24,40,.16); max-height: 260px; overflow-y: auto; padding: 4px 0; }
.vt-menu .vt-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 14px; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.vt-menu .vt-option:hover, .vt-menu .vt-option.is-active { background: var(--bulma-scheme-main-bis, #f6f7f9); }
.vt-menu .vt-option.is-selected { background: #fdf0f5; }
.vt-rel { position: relative; }
.vt-select-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; border-bottom: 1px solid var(--bulma-border, #dbdee3); padding: 6px 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.vt-select-btn:focus { outline: none; border-bottom-color: var(--bulma-primary, #e6176b); }
.vt-select-btn.is-placeholder .vt-val { color: var(--bulma-text-weak, #98a2b3); }
.vt-field-error { color: var(--bulma-danger, #d92d20); font-size: .75rem; margin-top: 4px; }
.vt-type-chip { display: inline-flex; align-items: center; gap: 6px; }
.vt-highlight { animation: vt-pulse 1.6s ease-out 1; border-radius: 8px; }
@keyframes vt-pulse { 0% { box-shadow: 0 0 0 0 rgba(230,23,107,.35); background: #fdf0f5; } 100% { box-shadow: 0 0 0 14px rgba(230,23,107,0); background: transparent; } }
.vt-who-avatars { display: flex; }
.vt-who-avatars > * { margin-left: -6px; border: 2px solid #fff; border-radius: 50%; }
.vt-checkin-btn { background: #2e7d32 !important; color: #fff !important; border: 0; }
.kadence-spaces .container .vt-sub { font-size: .7rem; color: var(--bulma-text-weak, #98a2b3); font-weight: 500; }
.vt-select-btn > wx-icon, .vt-select-btn > .icon { flex-shrink: 0; align-self: center; margin: 0 !important; height: auto; }
.vt-select-btn .vt-val wx-icon { margin-right: 8px; }
.vt-credits { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; row-gap: 10px; font-size: .8125rem; }
.vt-credits .vt-h { font-weight: 600; color: var(--bulma-text-strong, #1d2939); }
.vt-select-btn { height: 34px !important; min-height: 0 !important; padding: 0 !important; line-height: 1.2; }
.vt-select-btn .vt-val { line-height: 1.2; }
.vt-menu .vt-option { min-height: 0 !important; height: auto !important; line-height: 1.3 !important; }
.vt-menu .vt-option > *, .vt-select-btn > *, .vt-select-btn .vt-val > * { align-self: center !important; }
.vt-menu .vt-option wx-icon, .vt-select-btn wx-icon { height: auto !important; min-height: 0; }
.vt-menu.is-up { top: auto; bottom: calc(100% + 4px); }
.vt-menu .vt-option wx-icon, .vt-select-btn wx-icon { margin-top: 0 !important; margin-bottom: 0 !important; }
.vt-menu .vt-option, .vt-select-btn { margin: 0 !important; }
.vt-select-btn .vt-val, .vt-menu .vt-option > span { margin-bottom: 0 !important; }
.vt-rel .input-container .input { margin-top: 0 !important; margin-bottom: 0 !important; }
