/* Shared in-page search capsule — matched to the Bar search reference. */
.device {
  --page-search-height: 13.15cqw;
  --page-search-radius: 7cqw;
  --page-search-icon-size: 5.15cqw;
  --page-search-text-size: 4.08cqw;
  --page-search-placeholder: #c7c7ca;
  --page-search-surface: rgba(253, 253, 253, .98);
  --page-search-shadow: 0 4.8cqw 11cqw rgba(0, 0, 0, .09);
}

.device .bar-search-dock label,
.device .finance-memory-search-dock,
.device .finance-memory-search-form label,
.device .plugin-search-dock,
.device .dc-search-shell {
  box-sizing: border-box;
  height: var(--page-search-height);
  border: .16cqw solid rgba(255, 255, 255, .82) !important;
  border-radius: var(--page-search-radius);
  color: #050505;
  background: var(--page-search-surface) !important;
  box-shadow: var(--page-search-shadow), inset 0 .16cqw 0 rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}

.device .bar-search-dock label,
.device .finance-memory-search-dock,
.device .finance-memory-search-form label,
.device .plugin-search-dock,
.device .dc-search-shell {
  display: grid;
  grid-template-columns: 7cqw minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 0 4.65cqw;
}


.device .finance-memory-search-dock,
.device .plugin-search-controls,
.device .dc-search-shell {
  left: 7.35cqw;
  right: 7.35cqw;
}

.device .bar-search-dock,
.device .finance-memory-search-dock,
.device .finance-memory-search-form,
.device .plugin-search-controls,
.device .dc-search-shell {
  isolation: isolate;
  transition: bottom 300ms cubic-bezier(.2, .82, .2, 1), transform 180ms ease-out;
}

/* Search chrome rests at the bottom whenever the keyboard is dismissed. */

.device .finance-memory-search-form {
  top: auto;
  bottom: 6.35cqw;
}

/* It only rises while the simulated or native text-entry state is active. */

.device[data-ios-keyboard-open="true"] .finance-memory-search-form,
.device[data-ios-keyboard-open="true"] .plugin-search-controls,
.device[data-ios-keyboard-open="true"] .dc-search-shell {
  bottom: 91.8cqw;
}

.device .bar-search-dock::before,
.device .finance-memory-search-dock::before,
.device .finance-memory-search-form::before,
.device .plugin-search-controls::before,
.device .dc-search-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -16cqw;
  right: -7.5cqw;
  bottom: -8.5cqw;
  left: -7.5cqw;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .96) 38%, #fff 72%);
}

.device .bar-search-dock,
.device .finance-memory-search-form,
.device .plugin-search-controls {
  left: 3.15cqw;
  right: 3.05cqw;
  grid-template-columns: minmax(0, 1fr) 12.8cqw;
  gap: 3.15cqw;
}

.device .bar-search-dock input,
.device .finance-memory-search-form input,
.device .plugin-search-dock input,
.device .dc-search-shell input {
  min-width: 0;
  width: 100%;
  height: 8cqw;
  padding: 0;
  border: 0 !important;
  outline: 0 !important;
  color: #050505;
  background: transparent;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  caret-color: #0a84ff;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: var(--page-search-text-size);
  font-weight: 430;
  font-optical-sizing: auto;
  line-height: 1;
  letter-spacing: -.006em;
}

.device .bar-search-dock input::placeholder,
.device .finance-memory-search-form input::placeholder,
.device .plugin-search-dock input::placeholder,
.device .dc-search-shell input::placeholder {
  color: var(--page-search-placeholder);
  opacity: 1;
}


.device .finance-memory-search-dock span {
  color: var(--page-search-placeholder);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: var(--page-search-text-size);
  font-weight: 430;
  font-optical-sizing: auto;
  line-height: 1;
  letter-spacing: -.006em;
}

.device .bar-search-dock label .bar-icon,
.device .finance-memory-search-dock .finance-icon,
.device .finance-memory-search-form label .finance-icon {
  width: var(--page-search-icon-size);
  height: var(--page-search-icon-size);
  color: #050505;
  opacity: 1;
}

.device .bar-search-dock label .bar-icon {
  filter: brightness(0);
}

.device .finance-memory-search-dock .finance-icon,
.device .finance-memory-search-form label .finance-icon {
  stroke-width: 2.35;
}

.device .plugin-search-icon,
.device .dc-search-icon {
  box-sizing: border-box;
  width: var(--page-search-icon-size);
  height: var(--page-search-icon-size);
  margin: 0;
  border: .62cqw solid #050505;
  border-radius: 50%;
}

.device .plugin-search-icon::after,
.device .dc-search-icon::after {
  right: -1.65cqw;
  bottom: -1.02cqw;
  width: 2.3cqw;
  height: .62cqw;
  background: #050505;
}

.device .bar-search-close,
.device .finance-memory-search-form > button,
.device .plugin-search-close {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 12.8cqw;
  height: 12.8cqw;
  padding: 3.65cqw;
  border: .16cqw solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  color: #050505;
  background: var(--page-search-surface) !important;
  box-shadow: var(--page-search-shadow), inset 0 .16cqw 0 rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}

@media (prefers-reduced-transparency: reduce) {
  .device .bar-search-dock label,
  .device .finance-memory-search-dock,
  .device .finance-memory-search-form label,
  .device .plugin-search-dock,
  .device .dc-search-shell,
  .device .bar-search-close,
  .device .finance-memory-search-form > button,
  .device .plugin-search-close {
    background: #fff !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .device .bar-search-dock,
  .device .finance-memory-search-dock,
  .device .finance-memory-search-form,
  .device .plugin-search-controls,
  .device .dc-search-shell {
    transition: opacity 150ms ease-out;
  }
}

@media (prefers-contrast: more) {
  .device .bar-search-dock label,
  .device .finance-memory-search-dock,
  .device .finance-memory-search-form label,
  .device .plugin-search-dock,
  .device .dc-search-shell {
    border-color: rgba(60, 60, 67, .35) !important;
  }
}

/* Plugins search: one resting capsule, then field + close only while searching. */
.device .plugin-search-controls [hidden] { display: none !important; }
.device .plugin-search-controls.is-idle {
  left: 7.35cqw;
  right: 7.35cqw;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.device .plugin-search-controls.is-active {
  left: 3.15cqw;
  right: 3.05cqw;
  grid-template-columns: minmax(0, 1fr) 12.8cqw;
  gap: 3.15cqw;
}
.device .plugin-search-launch {
  width: 100%;
  color: var(--page-search-placeholder);
  cursor: text;
}
.device .plugin-search-launch > span:last-child {
  color: inherit;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: var(--page-search-text-size);
  font-weight: 430;
  font-optical-sizing: auto;
  line-height: 1;
  letter-spacing: 0em;
}
.device .plugin-search-dock input { letter-spacing: 0em; }
