@import url('./design-foundation.css');

/* Shared resource foundations. Colors, action hierarchy and geometry come
   directly from brand.css, the same source used by the public website. */
:where(body) { font-family: var(--font-family-ui); color: var(--token-text-primary); background: var(--token-canvas); }
:where(button, input, textarea, select) { font: inherit; }
/* Opt-in form component, shared by resource surfaces. */
.seyfr-form :is(input:where(:not([type="checkbox"]):not([type="file"])), textarea, select, .seyfr-select-trigger) {
  box-sizing: border-box;
  width: 100%; min-width: 0; min-height: var(--control-height);
  padding: var(--control-padding);
  border: var(--seyfr-border-width) solid var(--token-border);
  border-radius: var(--radius-control);
  background: var(--token-surface); color: var(--token-text-primary);
  font-family: var(--font-family-ui); font-size: var(--control-font-size);
  font-weight: 400; line-height: var(--control-line-height);
}
.seyfr-form label { font-size: var(--control-font-size); font-weight: var(--control-font-weight); line-height: var(--font-body-leading); }
.seyfr-form input[type="checkbox"] { width: var(--space-4); height: var(--space-4); min-height: 0; accent-color: var(--token-action); }
.seyfr-form label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: var(--space-2); }
.seyfr-form :is(input,textarea,.seyfr-select-trigger):disabled { opacity: .65; cursor: not-allowed; }
.seyfr-select { position: relative; min-width: 0; }
.seyfr-form .panel:has(.seyfr-select) { overflow: visible; }
.seyfr-form :is(.fields label, .variant-row label) { font-size: var(--control-font-size); font-weight: var(--control-font-weight); }
.seyfr-form .search input { border: 0; border-radius: 0; background: transparent; padding: var(--space-2) 0; }
/* The search container owns the focus ring, including its icon. */
.seyfr-form .search input:focus-visible { outline: none; }
.seyfr-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: var(--control-gap); text-align: left; cursor: pointer; }
.seyfr-select-trigger::after { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); flex-shrink: 0; }
.seyfr-select-menu { position: absolute; top: calc(100% + var(--space-1)); left: 0; right: 0; z-index: 30; max-height: 240px; overflow: auto; padding: var(--space-1); background: var(--token-surface); color: var(--token-text-primary); border: 1px solid var(--token-border); border-radius: var(--radius-control); }
.seyfr-select-menu[hidden] { display: none; }
.seyfr-select-option { display: block; width: 100%; min-height: var(--control-height); padding: var(--control-padding); border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; text-align: left; font: 400 var(--control-font-size)/var(--control-line-height) var(--font-family-ui); }
.seyfr-select-option:is(:hover,:focus-visible), .seyfr-select-option[aria-selected="true"] { background: var(--token-action-container); color: var(--token-action); }
html[data-theme="dark"] { color-scheme: dark; }
:where(dialog) { color: var(--token-text-primary); background: var(--token-surface); }
:where(button) { color: inherit; }
:where(input, textarea)::placeholder { color: var(--token-text-muted); opacity: 1; }
:where(button, input, textarea, select, a, summary):focus-visible { outline: 2px solid var(--token-action); outline-offset: var(--space-1); }
:where(button):disabled { cursor: not-allowed; opacity: .65; }
:where(button, a) { -webkit-tap-highlight-color: transparent; }
[data-design-theme-toggle] { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; flex-shrink: 0; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--token-text-primary); cursor: pointer; }
[data-design-theme-toggle] svg { width: 18px; height: 18px; }
[data-design-theme-toggle]:hover { background: var(--token-surface-muted); }
:where(.team-brand, .brand) img { filter: brightness(0); }
[data-theme="dark"] :where(.team-brand, .brand) img { filter: brightness(0) invert(1); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Shared dropdown focus: a sharp blue edge, without an outer halo. */
.seyfr-form select[hidden] { display:none; }
.seyfr-form .seyfr-select .seyfr-select-trigger:focus,
html body select:not([multiple]):focus {
  border-color:var(--token-action);
  outline:1px solid var(--token-action);
  outline-offset:-1px;
  box-shadow:none;
}
.seyfr-form .seyfr-select .seyfr-select-option:focus-visible { outline:1px solid var(--token-action); outline-offset:-1px; }
