/* Ovencraft: search, favourites, remembered details and sign-in.
   Shared by every design version. Each version sets the --oc-* colours, type and corners
   in its own style.css (loaded after this file), and adds anything specific to its look. */

[hidden] { display: none !important; }

/* ---------- search and filters ---------- */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 28px; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search-input {
  width: 100%; height: 48px; padding: 0 46px 0 44px; font-size: 1rem;
  border: 1px solid var(--oc-line, #E6DDD5); border-radius: var(--oc-radius-sm, 12px);
  background: var(--oc-field, #fff); color: var(--oc-ink, #35261F);
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-input::placeholder { color: var(--oc-muted, #6E5D53); opacity: 1; }
.search-input::-webkit-search-cancel-button, .search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-input:hover { border-color: var(--oc-line-strong, #CDBFB3); }
.search-input:focus { outline: none; border-color: var(--oc-ink, #35261F); box-shadow: 0 0 0 3px var(--oc-ring, rgba(170, 121, 44, .35)); }
.search-icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--oc-muted, #6E5D53); pointer-events: none; }
.search-icon svg, .search-clear svg, .chip-fav svg, .fav svg, .acct-close svg, .acct-btn svg, .acct-toast-x svg {
  width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.search-clear {
  position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; padding: 13px;
  border: 0; border-radius: var(--oc-radius-sm, 12px); background: transparent; color: var(--oc-muted, #6E5D53); cursor: pointer;
}
.search-clear:hover { color: var(--oc-ink, #35261F); }
.tools .chips { margin: 0; flex-basis: 100%; }
.chip-fav { display: inline-flex; align-items: center; gap: 8px; }
.chip-fav svg { width: 17px; height: 17px; flex: none; }
.chip-fav[aria-pressed="true"] svg { fill: currentColor; }
.fav-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; font-size: .78rem; line-height: 22px; text-align: center;
  font-variant-numeric: tabular-nums; background: var(--oc-heart, #A3261B); color: #fff;
}
.no-match {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 28px; padding: 22px 24px;
  border: 1px dashed var(--oc-line-strong, #CDBFB3); border-radius: var(--oc-radius, 14px); color: var(--oc-ink, #35261F);
}
.no-match p { margin: 0; }
.no-match-btn {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--oc-ink, #35261F); border-radius: 999px;
  background: transparent; color: var(--oc-ink, #35261F); font-weight: 600; cursor: pointer;
}
.no-match-btn:hover { background: var(--oc-ink, #35261F); color: var(--oc-on-ink, #fff); }

/* ---------- favourite heart ---------- */
.bake-photo, .card-photo, .goods-photo, .tile-photo { position: relative; }
.fav {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 44px; height: 44px; padding: 4px;
  border: 0; background: transparent; color: var(--oc-ink, #35261F); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.fav::before {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); box-shadow: 0 1px 6px rgba(0, 0, 0, .18);
  transition: transform .12s ease-out, background-color .15s ease;
}
.fav svg { position: relative; display: block; width: 20px; height: 20px; margin: 8px auto; transition: color .15s ease, fill .15s ease; }
.fav:hover::before { background: #fff; }
.fav:active::before { transform: scale(.92); }
.fav.on svg { color: var(--oc-heart, #A3261B); fill: var(--oc-heart, #A3261B); }
.fav:focus-visible { outline: none; }
.fav:focus-visible::before { box-shadow: 0 0 0 3px var(--oc-ring, rgba(170, 121, 44, .55)); }
@media (prefers-reduced-motion: no-preference) {
  .fav.pop svg { animation: oc-heart .42s cubic-bezier(.2, .9, .3, 1.4); }
}
@keyframes oc-heart { 0% { transform: scale(.6); } 55% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* ---------- account button in the header ---------- */
.acct-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px 0 12px;
  border: 0; border-radius: 999px; background: transparent; color: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.acct-btn svg { width: 21px; height: 21px; flex: none; }
.acct-avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--oc-accent, #AA792C); color: var(--oc-on-accent, #fff); font-size: .85rem; font-weight: 700; line-height: 1;
}
.acct-avatar-lg { width: 48px; height: 48px; font-size: 1.15rem; }
@media (max-width: 560px) {
  .acct-btn { padding: 0 10px; }
  .acct-btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- account panel (popover on computers, bottom sheet on phones) ---------- */
.acct-scrim { position: fixed; inset: 0; z-index: 300; background: var(--oc-scrim, rgba(30, 20, 15, .32)); }
.acct {
  position: fixed; z-index: 301; top: var(--oc-acct-top, 76px); right: max(16px, env(safe-area-inset-right));
  width: min(392px, calc(100vw - 32px)); max-height: calc(100dvh - var(--oc-acct-top, 76px) - 16px); overflow: auto; overscroll-behavior: contain;
  padding: 26px 24px 22px; border-radius: var(--oc-radius, 16px); background: var(--oc-surface, #fff); color: var(--oc-ink, #35261F);
  box-shadow: 0 24px 60px -18px rgba(30, 20, 15, .45), 0 0 0 1px rgba(30, 20, 15, .06); font-family: var(--oc-font, inherit);
}
.acct:focus { outline: none; }
@media (prefers-reduced-motion: no-preference) {
  .acct:not([hidden]) { animation: oc-pop .22s cubic-bezier(.2, .8, .2, 1); }
  .acct-scrim:not([hidden]) { animation: oc-fade .2s ease; }
}
@keyframes oc-pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes oc-rise { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes oc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
  .acct {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 88dvh;
    border-radius: var(--oc-radius, 16px) var(--oc-radius, 16px) 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom));
  }
  @media (prefers-reduced-motion: no-preference) { .acct:not([hidden]) { animation: oc-rise .26s cubic-bezier(.2, .8, .2, 1); } }
}
.acct-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; padding: 12px; border: 0; border-radius: 50%; background: transparent; color: var(--oc-muted, #6E5D53); cursor: pointer; }
.acct-close:hover { color: var(--oc-ink, #35261F); background: var(--oc-tint, #F5F0EB); }
.acct-title { margin: 0 40px 6px 0; font-family: var(--oc-display, inherit); font-weight: var(--oc-display-weight, 400); font-size: 1.45rem; line-height: 1.15; letter-spacing: -0.01em; }
.acct-title:focus { outline: none; }
.acct-sub { margin: 0 0 18px; color: var(--oc-muted, #6E5D53); font-size: .96rem; line-height: 1.5; }
.acct-email { overflow-wrap: anywhere; }
.acct-providers { display: grid; gap: 10px; }
.acct-provider {
  min-height: 50px; padding: 0 18px; border: 1px solid var(--oc-line-strong, #CDBFB3); border-radius: var(--oc-radius-sm, 12px);
  background: var(--oc-field, #fff); color: var(--oc-ink, #35261F); font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.acct-provider:hover { background: var(--oc-tint, #F5F0EB); border-color: var(--oc-ink, #35261F); }
.acct-provider:active { transform: scale(.98); }
.acct-provider:disabled, .note-provider:disabled { opacity: .55; cursor: progress; }
.acct-fine { margin: 14px 0 0; font-size: .86rem; color: var(--oc-muted, #6E5D53); }
.acct-preview { margin: 14px 0 0; padding: 10px 12px; font-size: .86rem; border: 1px dashed var(--oc-line-strong, #CDBFB3); border-radius: var(--oc-radius-sm, 10px); color: var(--oc-muted, #6E5D53); background: var(--oc-tint, #F5F0EB); }
.acct-msg { margin: 12px 0 0; font-size: .92rem; color: var(--oc-error, #A3261B); font-weight: 600; }
.acct-who { display: flex; align-items: center; gap: 14px; margin: 0 40px 18px 0; }
.acct-who .acct-title { margin: 0 0 2px; font-size: 1.25rem; }
.acct-who .acct-sub { margin: 0; font-size: .9rem; }
.acct-list { list-style: none; margin: 0 0 18px; padding: 0; }
.acct-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--oc-line, #E6DDD5); }
.acct-list li:last-child { border-bottom: 1px solid var(--oc-line, #E6DDD5); }
.acct-list div { display: flex; flex-direction: column; min-width: 0; }
.acct-list strong { font-weight: 600; }
.acct-list span { color: var(--oc-muted, #6E5D53); font-size: .92rem; overflow-wrap: anywhere; }
.acct-link, .note-link {
  flex: none; min-height: 44px; padding: 0 6px; border: 0; background: transparent; color: var(--oc-ink, #35261F);
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.acct-out {
  width: 100%; min-height: 48px; border: 1px solid var(--oc-ink, #35261F); border-radius: var(--oc-radius-sm, 12px);
  background: transparent; color: var(--oc-ink, #35261F); font-weight: 600; cursor: pointer;
}
.acct-out:hover { background: var(--oc-ink, #35261F); color: var(--oc-on-ink, #fff); }

/* ---------- note and checkbox in the delivery form ---------- */
.saved-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; padding: 12px 14px 12px 16px;
  border-radius: var(--oc-radius-sm, 12px); background: var(--oc-tint, #F5F0EB); color: var(--oc-ink, #35261F); font-size: .95rem;
}
.saved-note p { margin: 0; flex: 1 1 220px; }
.saved-note .note-msg { flex-basis: 100%; color: var(--oc-error, #A3261B); font-weight: 600; }
.note-providers { display: flex; flex-wrap: wrap; gap: 8px; }
.note-provider {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--oc-line-strong, #CDBFB3); border-radius: 999px;
  background: var(--oc-field, #fff); color: var(--oc-ink, #35261F); font-weight: 600; font-size: .92rem; cursor: pointer;
}
.note-provider:hover { border-color: var(--oc-ink, #35261F); }
.remember { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; cursor: pointer; font-size: .96rem; }
.remember input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--oc-accent-strong, #35261F); cursor: pointer; }

/* ---------- one-time hint after the first favourite ---------- */
.acct-toast {
  position: fixed; z-index: 250; left: 50%; bottom: calc(var(--oc-toast-bottom, 24px) + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(460px, calc(100vw - 24px)); display: flex; align-items: center; gap: 6px 12px; padding: 10px 6px 10px 16px;
  border-radius: var(--oc-radius-sm, 12px); background: var(--oc-toast-bg, #35261F); color: var(--oc-toast-ink, #F6EFE6);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .5); font-size: .94rem;
}
.acct-toast p { margin: 0; flex: 1; }
.acct-toast-btn { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--oc-toast-ink, #F6EFE6); color: var(--oc-toast-bg, #35261F); font-weight: 700; cursor: pointer; }
.acct-toast-x { flex: none; width: 40px; height: 40px; padding: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; opacity: .8; }
@media (prefers-reduced-motion: no-preference) { .acct-toast:not([hidden]) { animation: oc-fade .2s ease; } }

@media (forced-colors: active) {
  .fav::before, .acct, .saved-note, .acct-toast { border: 1px solid CanvasText; }
  .fav.on svg { fill: CanvasText; }
}
