/* Shared search and inquiry controls. No framework or icon dependency. */
[data-ui-search] { position: relative; min-width: 0; }
[data-ui-search] input[type="search"] { width: 100%; min-width: 0; min-height: 44px; font: inherit; }
[data-search-results] {
  position: absolute; z-index: 80; inset: calc(100% + 6px) 0 auto;
  width: 100%; max-height: min(420px, calc(100svh - 152px)); overflow: auto;
  overscroll-behavior: contain; scrollbar-gutter: stable;
  border: 1px solid var(--ui-line, #dfe3e8); border-radius: 2px;
  background: var(--ui-paper, #fff); color: var(--ui-text, #111827);
  box-shadow: 0 8px 22px rgb(17 24 39 / 9%);
  text-align: left; scroll-padding: 8px;
}
[data-search-results][hidden] { display: none !important; }
.ui-search-note { margin: 0; padding: 10px 14px; color: var(--ui-muted, #5f6876); font-size: 12px; line-height: 1.5; }
.ui-search-option {
  display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1.6fr);
  gap: 3px 16px; padding: 12px 14px; min-height: 60px;
  border-top: 1px solid var(--ui-line, #dfe3e8); border-left: 3px solid transparent;
  color: var(--ui-text, #111827); text-decoration: none; line-height: 1.4;
}
.ui-search-option:hover, .ui-search-option.is-active {
  background: var(--ui-surface, #f8f9fa); border-left-color: var(--dir-c, #3e9bfa); color: var(--ui-text, #111827);
}
.ui-search-code { font: 600 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.ui-search-name { font-size: 14px; overflow-wrap: anywhere; }
.ui-search-group { grid-column: 2; color: var(--ui-muted, #5f6876); font-size: 12px; overflow-wrap: anywhere; }
.ui-search-help {
  margin: 0 14px 14px; min-height: 44px; padding: 9px 14px;
  border: 1px solid var(--ui-line, #dfe3e8); border-radius: 2px;
  color: var(--ui-text, #111827); background: var(--ui-paper, #fff); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer;
}
.ui-search-help:hover, .ui-search-help.is-active { border-color: var(--dir-c, #3e9bfa); background: var(--ui-surface, #f8f9fa); }
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.inquiry-open { overflow: hidden; }
.inquiry-dialog {
  width: min(760px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  margin: auto; padding: 24px; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--ui-line, #dfe3e8); border-radius: 2px;
  background: var(--ui-paper, #fff); color: var(--ui-text, #111827);
  box-sizing: border-box; box-shadow: 0 20px 64px rgb(0 0 0 / 18%);
  font-family: inherit;
}
.inquiry-dialog:not([open]), .inquiry-dialog [hidden] { display: none !important; }
.inquiry-dialog::backdrop { background: rgb(17 24 39 / 58%); }
.inquiry-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.inquiry-head .kick { display: block; margin: 0 0 6px; color: var(--dir-c, #3e9bfa); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.inquiry-head h2 { margin: 0; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; letter-spacing: -.02em; }
.inquiry-close {
  flex: 0 0 44px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--ui-line, #dfe3e8); border-radius: 2px; background: var(--ui-paper, #fff);
  color: var(--ui-text, #111827); font: 400 28px/1 sans-serif; cursor: pointer;
}
.inquiry-close:hover { background: var(--ui-surface, #f8f9fa); border-color: var(--dir-c, #3e9bfa); }
.inquiry-form { margin: 0; }
.inquiry-products { margin: 0 0 20px; padding: 14px 0; border-top: 1px solid var(--ui-line, #dfe3e8); border-bottom: 1px solid var(--ui-line, #dfe3e8); }
.inquiry-products h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.inquiry-items { max-height: 200px; overflow-y: auto; overscroll-behavior: contain; }
.inquiry-items > p { margin: 0; font-size: 14px; line-height: 1.5; }
.inquiry-item + .inquiry-item { border-top: 1px solid var(--ui-line, #dfe3e8); }
.inquiry-item-label { display: grid; grid-template-columns: minmax(0, 1fr) 76px; align-items: center; gap: 16px; padding: 8px 0; }
.inquiry-item code { display: block; font: 600 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.inquiry-item-name { display: block; margin-top: 2px; color: var(--ui-muted, #5f6876); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.inquiry-item-label input { text-align: center; }
.inquiry-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.inquiry-field { display: block; min-width: 0; color: var(--ui-text, #111827); font-size: 13px; font-weight: 600; line-height: 1.45; }
.inquiry-wide { grid-column: 1 / -1; }
.inquiry-field > input, .inquiry-field > textarea { display: block; width: 100%; margin-top: 6px; }
.inquiry-dialog input, .inquiry-dialog textarea {
  min-width: 0; min-height: 44px; max-width: 100%; box-sizing: border-box; padding: 10px 11px;
  border: 1px solid var(--ui-line, #dfe3e8); border-radius: 2px;
  background: var(--ui-paper, #fff); color: var(--ui-text, #111827);
  font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.4;
}
.inquiry-dialog textarea { min-height: 96px; resize: vertical; }
.inquiry-dialog input::placeholder, .inquiry-dialog textarea::placeholder { color: #6b7280; opacity: 1; }
.inquiry-dialog input[type="file"] { padding: 0; font-size: 13px; overflow: hidden; }
.inquiry-dialog input::file-selector-button {
  min-height: 44px; margin: 0 10px 0 0; padding: 10px 12px; border: 0; border-right: 1px solid var(--ui-line, #dfe3e8);
  border-radius: 0; background: var(--ui-surface, #f8f9fa); color: var(--ui-text, #111827); font: inherit; cursor: pointer;
}
.inquiry-file-note, .inquiry-privacy, .inquiry-local-note { margin: 10px 0 0; color: var(--ui-muted, #5f6876); font-size: 12px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.inquiry-field-error { display: block; margin-top: 6px; color: #9a2219; font-size: 13px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.inquiry-field-error[hidden], .inquiry-file-selection[hidden], .inquiry-file-list[hidden] { display: none !important; }
.inquiry-field [aria-invalid="true"] { border-color: #b42318; }
.inquiry-file-selection { min-width: 0; margin-top: -8px; }
.inquiry-file-list { margin: 0; padding: 0; list-style: none; }
.inquiry-file-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--ui-line, #dfe3e8); }
.inquiry-file-name { min-width: 0; color: var(--ui-text, #111827); font-size: 14px; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.inquiry-file-name > small { display: block; margin-top: 2px; color: var(--ui-muted, #5f6876); font-size: 12px; }
.inquiry-file-remove { min-height: 44px; padding: 8px 10px; border: 1px solid var(--ui-line, #dfe3e8); border-radius: 2px; background: var(--ui-paper, #fff); color: var(--ui-text, #111827); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.inquiry-file-remove:hover { background: var(--ui-surface, #f8f9fa); }
.inquiry-file-remove:focus-visible { outline: 2px solid var(--ui-text, #111827); outline-offset: 3px; }
.inquiry-local-note { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ui-line, #dfe3e8); }
.consent-block { margin: 18px 0 0; padding: 14px 0; border-top: 1px solid var(--ui-line, #dfe3e8); }
.consent-control { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 11px; padding-left: 19px; color: var(--ui-text, #111827); font-size: 14px; font-weight: 400; line-height: 1.5; cursor: pointer; }
.consent-control input[type="checkbox"] { appearance: auto; display: block; flex: none; width: 22px; height: 22px; min-width: 22px; min-height: 22px; max-width: 22px; margin: 1px 0 0; padding: 0; accent-color: var(--dir-c, #3e9bfa); cursor: pointer; }
.consent-signal { position: absolute; top: 9px; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--dir-c, #176fdb); color: var(--dir-c, #176fdb); box-shadow: 0 0 0 3px rgba(var(--dir-rgb, 23, 111, 219), .12); pointer-events: none; }
.consent-control input:checked + span .consent-signal { opacity: 0; animation: none; }
.consent-help { margin: 7px 0 0; color: var(--ui-muted, #5f6876); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.consent-control a, .consent-help a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.consent-block :focus-visible { outline: 2px solid var(--dir-c, #3e9bfa); outline-offset: 3px; }
.inquiry-error { margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid #b42318; background: var(--ui-surface, #f8f9fa); color: #9a2219; font-size: 14px; line-height: 1.5; }
.inquiry-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.inquiry-dialog .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: 10px 16px;
  border: 1px solid var(--ui-line, #dfe3e8); border-radius: 2px;
  background: var(--ui-paper, #fff); color: var(--ui-text, #111827); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; cursor: pointer;
}
.inquiry-dialog .btn.primary { border-color: var(--dir-c, #3e9bfa); background: var(--dir-c, #3e9bfa); color: #111827; }
.inquiry-dialog .btn.alt:hover { border-color: var(--dir-c, #3e9bfa); background: var(--ui-surface, #f8f9fa); }
.inquiry-dialog .btn:active { transform: none; }
.inquiry-dialog button:disabled { cursor: wait; opacity: .65; }
.inquiry-dialog :focus-visible, [data-ui-search] :focus-visible {
  outline: 2px solid var(--dir-c, #3e9bfa); outline-offset: 3px;
}
.inquiry-dialog input:focus, .inquiry-dialog textarea:focus { border-color: var(--dir-c, #3e9bfa); }
.inquiry-success { padding: 8px 0 4px; }
.inquiry-success h3 { margin: 0 0 12px; font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
.inquiry-success p { margin: 0 0 20px; color: var(--ui-muted, #5f6876); font-size: 15px; line-height: 1.6; }
@media (max-width: 560px) {
  .ui-search-option { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 11px 12px; }
  .ui-search-group { grid-column: 1; }
  .inquiry-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 16px; }
  .inquiry-head { gap: 10px; margin-bottom: 16px; }
  .inquiry-head h2 { font-size: 23px; }
  .inquiry-fields { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .inquiry-actions .btn { flex: 1 1 auto; }
  .inquiry-item-label { grid-template-columns: minmax(0, 1fr) 68px; gap: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ui-search-option, .ui-search-help, .inquiry-dialog .btn, .inquiry-close { transition: border-color .15s ease, background-color .15s ease; }
  .consent-signal { animation: consent-pulse 2.4s ease-out infinite; }
}
@keyframes consent-pulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(var(--dir-rgb, 23, 111, 219), .14); } 60% { box-shadow: 0 0 0 6px rgba(var(--dir-rgb, 23, 111, 219), 0); } }
@media print { .inquiry-dialog, [data-search-results] { display: none !important; } }
