/* Appeals: floating button, topic panel, lot form, toast and the /appeal page. */
:root {
  --appeal-navy: #0d2230;
  --appeal-navy-2: #132c3a;
  --appeal-line: rgba(255, 255, 255, .12);
  --appeal-gold: #fdda72;
  --appeal-paper: #f6f3ec;
}
.appeal-locked, .appeal-locked body { overflow: hidden; }
.appeal-arrow { font-style: normal; }
.appeal-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- floating button ---------- */
.appeal-fab {
  position: fixed; z-index: 70; right: clamp(16px, 2.2vw, 28px);
  bottom: calc(clamp(16px, 2.2vw, 28px) + var(--appeal-lift, 0px));
  display: inline-flex; align-items: center; gap: 26px; min-height: 44px; padding: 10px 22px 10px 24px;
  border: 0; border-radius: 999px; background: var(--appeal-gold); color: #001e2b;
  font: 500 .82rem/1.2 Manrope, system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 20, 30, .28); transition: bottom .35s cubic-bezier(.22,1,.36,1), transform .2s, background .2s;
}
.appeal-fab:hover { background: #ffe38c; transform: translateY(-1px); }
.appeal-fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.appeal-fab.is-open { gap: 0; width: 44px; padding: 0; justify-content: center; }
.appeal-fab.is-open .appeal-arrow { font-size: 0; }
.appeal-fab.is-open .appeal-arrow::before { content: "×"; font-size: 22px; line-height: 1; }

/* ---------- topic panel ---------- */
.appeal-backdrop { position: fixed; inset: 0; z-index: 190; background: rgba(0, 18, 28, .52); }
.appeal-backdrop[hidden] { display: none; }
.appeal-panel {
  position: fixed; z-index: 75; right: clamp(16px, 2.2vw, 28px);
  bottom: calc(clamp(16px, 2.2vw, 28px) + 58px + var(--appeal-lift, 0px));
  width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 140px); overflow-y: auto;
  border: 1px solid var(--appeal-line); background: var(--appeal-navy); color: #fff;
  font-family: Manrope, system-ui, sans-serif; box-shadow: 0 24px 60px rgba(0, 10, 18, .45);
}
.appeal-panel[hidden] { display: none; }
.appeal-panel__head { position: relative; padding: 18px 18px 12px; }
.appeal-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--appeal-gold); font-size: .6rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.appeal-kicker::before { content: ""; width: 16px; height: 1px; background: currentColor; }
.appeal-kicker.is-teal { color: #00877f; }
.appeal-panel h2 { margin: 0; font-size: 1.15rem; font-weight: 400; }
.appeal-panel__lead { margin: 4px 0 0; color: rgba(255,255,255,.62); font-size: .68rem; }
.appeal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: transparent; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.appeal-close:hover { border-color: var(--appeal-gold); color: var(--appeal-gold); }
.appeal-close.is-light { border-color: rgba(0,63,87,.2); color: #003f57; }
.appeal-topics { margin: 0; padding: 0 8px; list-style: none; }
.appeal-topic { position: relative; display: grid; grid-template-columns: 28px 1fr 30px; align-items: center; gap: 8px; padding: 12px 10px; border-top: 1px solid var(--appeal-line); color: #fff; text-decoration: none; transition: background .2s; }
.appeal-topic:hover, .appeal-topic:focus-visible { background: rgba(255,255,255,.06); outline: none; }
.appeal-topic:hover::before, .appeal-topic:focus-visible::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--appeal-gold); }
.appeal-topic__number { color: var(--appeal-gold); font-size: .62rem; }
.appeal-topic__text b { display: block; font-size: .8rem; font-weight: 400; }
.appeal-topic__text small { display: block; margin-top: 2px; color: rgba(255,255,255,.55); font-size: .62rem; }
.appeal-round { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; font-size: .75rem; transition: background .2s, color .2s, border-color .2s; }
.appeal-topic:hover .appeal-round, .appeal-topic:focus-visible .appeal-round { background: var(--appeal-gold); border-color: var(--appeal-gold); color: #001e2b; }
.appeal-sheet-handle { display: none; }

/* ---------- lot form drawer ---------- */
.appeal-backdrop.is-drawer { z-index: 190; }
.appeal-drawer {
  position: fixed; z-index: 200; top: 0; right: 0; bottom: 0; width: min(520px, 100vw);
  display: flex; flex-direction: column; background: var(--appeal-paper); color: #003f57;
  font-family: Manrope, system-ui, sans-serif; box-shadow: -20px 0 60px rgba(0, 20, 30, .3);
  animation: appealSlide .32s cubic-bezier(.22,1,.36,1);
}
.appeal-drawer[hidden] { display: none; }
@keyframes appealSlide { from { transform: translateX(40px); opacity: 0; } }
.appeal-drawer__head { position: relative; padding: 24px 26px 8px; }
.appeal-drawer__head h2 { margin: 0; font-size: 2rem; font-weight: 300; letter-spacing: -.02em; }
.appeal-row .appeal-field { align-content: start; }
.appeal-drawer__body { flex: 1; overflow-y: auto; padding: 8px 26px 28px; }
.appeal-lot-card { margin-bottom: 16px; border: 1px solid rgba(0,63,87,.14); border-top: 2px solid var(--appeal-gold); background: #fff; }
.appeal-lot-card__top { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid rgba(0,63,87,.1); font-size: .76rem; }
.appeal-lot-card__top small { color: rgba(0,63,87,.5); font-size: .64rem; }
.appeal-lot-card__facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.appeal-lot-card__facts div { padding: 10px 14px; }
.appeal-lot-card__facts dt { color: rgba(0,63,87,.5); font-size: .6rem; }
.appeal-lot-card__facts dd { margin: 2px 0 0; font-size: .82rem; }
.appeal-lot-form { display: grid; gap: 12px; }
.appeal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.appeal-field { display: grid; gap: 5px; min-width: 0; }
.appeal-field__label { color: rgba(0,63,87,.6); font-size: .64rem; }
.appeal-field__hint { color: rgba(0,63,87,.45); font-size: .6rem; }
.appeal-drawer input:not([type=radio]):not([type=checkbox]), .appeal-drawer textarea {
  width: 100%; height: 42px; margin: 0; padding: 9px 12px; border: 1px solid rgba(0,63,87,.18); border-radius: 0;
  background: #fff; color: #003f57; font: inherit; font-size: .8rem;
}
.appeal-drawer textarea { height: auto; resize: vertical; min-height: 96px; }
.appeal-drawer input:focus, .appeal-drawer textarea:focus { outline: none; border-color: #003f57; box-shadow: inset 0 0 0 1px #003f57; }
.appeal-drawer .is-invalid { border-color: #c0533d !important; box-shadow: inset 0 0 0 1px #c0533d !important; }
.appeal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.appeal-chips legend { margin-bottom: 6px; padding: 0; }
.appeal-chip { position: relative; cursor: pointer; }
.appeal-chip input { position: absolute; opacity: 0; }
.appeal-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid rgba(0,63,87,.18); background: #fff; font-size: .7rem; }
.appeal-chip input:checked + span { border-color: #003f57; background: #003f57; color: #fff; }
.appeal-chip input:checked + span::before { content: "✓"; color: var(--appeal-gold); }
.appeal-chip input:focus-visible + span { outline: 2px solid #00877f; outline-offset: 2px; }
.appeal-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.appeal-quick button { padding: 5px 8px; border: 0; background: #e9efe9; color: #00776f; font: inherit; font-size: .62rem; cursor: pointer; }
.appeal-quick button:hover { background: #dce8e2; }
.appeal-consent { -webkit-tap-highlight-color: transparent; user-select: none; display: flex; align-items: center; gap: 10px; font-size: .7rem; cursor: pointer; }
.appeal-consent input { width: 18px; height: 18px; accent-color: #003f57; }
.appeal-form-error { margin: 0; padding: 10px 12px; background: #fbeee9; color: #a23f2a; font-size: .72rem; }
.appeal-form-error[hidden] { display: none; }
.appeal-submit { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 48px; padding: 0 18px; border: 0; font: inherit; font-size: .8rem; cursor: pointer; }
.appeal-submit.is-dark { background: #003f57; color: #fff; }
.appeal-submit.is-dark .appeal-arrow { color: var(--appeal-gold); }
.appeal-submit:disabled { opacity: .6; cursor: wait; }
.appeal-footnote { margin: 0; color: rgba(0,63,87,.55); font-size: .62rem; }

/* ---------- toast after a lot appeal ---------- */
.appeal-toast {
  position: fixed; z-index: 210; right: clamp(16px, 2.2vw, 28px); bottom: calc(clamp(16px, 2.2vw, 28px) + 58px);
  display: grid; grid-template-columns: 34px 1fr; gap: 6px 14px; width: min(420px, calc(100vw - 32px)); padding: 16px 18px;
  background: #003f57; color: #fff; font-family: Manrope, system-ui, sans-serif; box-shadow: 0 20px 50px rgba(0,10,18,.4);
  animation: appealSlide .3s cubic-bezier(.22,1,.36,1);
}
.appeal-toast__check { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--appeal-gold); color: #001e2b; }
.appeal-toast b { font-weight: 500; font-size: .86rem; }
.appeal-toast p { margin: 3px 0 0; color: rgba(255,255,255,.7); font-size: .68rem; }
.appeal-toast__close { grid-column: 1 / -1; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; font: inherit; font-size: .74rem; text-decoration: none; cursor: pointer; }
.appeal-toast__close { border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; }

/* ---------- lot card button (homepage auction section) ---------- */
.auction-preview-appeal {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; margin-top: 8px; padding: 0 14px;
  border: 1px solid #003f57; background: transparent; color: #003f57; font: inherit; font-size: .7rem; text-align: left; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.auction-preview-appeal span:first-of-type { flex: 1; }
.auction-preview-appeal:hover, .auction-preview-appeal:focus-visible { border-color: var(--appeal-gold); background: var(--appeal-gold); outline: none; }

/* ---------- fields shared by the three forms: phone with country, messengers, amount, files ---------- */
.appeal-drawer { --af-line: rgba(0,63,87,.18); --af-bg: #fff; --af-on: #003f57; --af-on-ink: #fff; --af-muted: rgba(0,63,87,.6); --af-height: 42px; --af-chevron: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27%3E%3Cpath d=%27M1 1l4 4 4-4%27 fill=%27none%27 stroke=%27%23003f57%27 stroke-width=%271.4%27/%3E%3C/svg%3E"); }
.appeal-pform, .inv-form { --af-line: rgba(255,255,255,.16); --af-bg: #102735; --af-on: #fdda72; --af-on-ink: #001e2b; --af-muted: rgba(255,255,255,.6); --af-height: 44px; --af-chevron: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27%3E%3Cpath d=%27M1 1l4 4 4-4%27 fill=%27none%27 stroke=%27%23ffffff%27 stroke-width=%271.4%27/%3E%3C/svg%3E"); }
.appeal-phone { position: relative; display: flex; min-width: 0; }
.appeal-phone__country {
  display: flex; flex: none; align-items: center; gap: 6px; margin: 0; padding: 0 10px 0 12px;
  border: 1px solid var(--af-line); border-right: 0; border-radius: 0; background: var(--af-bg); color: inherit;
  font: inherit; font-size: .8rem; white-space: nowrap; cursor: pointer;
}
.appeal-phone__country::after { content: ""; width: 5px; height: 5px; margin: -3px 0 0 2px; border: solid currentColor; border-width: 0 1.4px 1.4px 0; transform: rotate(45deg); opacity: .6; }
.appeal-phone__country:focus-visible, .appeal-phone__country[aria-expanded="true"] { outline: none; border-color: var(--af-on); box-shadow: inset 0 0 0 1px var(--af-on); }
.appeal-phone > input { flex: 1; min-width: 0; }
.appeal-select option { background: #fff; color: #003f57; }
/* country list with search: always light, like a native dropdown */
.appeal-cpop {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; width: max(100%, 320px); max-width: calc(100vw - 32px);
  border: 1px solid rgba(0,63,87,.18); background: #fff; color: #003f57; box-shadow: 0 18px 44px rgba(0,20,30,.28);
  animation: appealUp .18s cubic-bezier(.22,1,.36,1);
}
.appeal-cpop[hidden] { display: none; }
/* !important: the forms style every input of theirs with stronger selectors */
.appeal-cpop__search {
  display: block !important; width: 100% !important; min-height: 0 !important; height: 44px !important; margin: 0 !important; padding: 0 12px !important;
  border: 0 !important; border-bottom: 1px solid rgba(0,63,87,.12) !important; border-radius: 0 !important;
  background: #f6f3ec !important; color: #003f57 !important; box-shadow: none; font: inherit; font-size: .8rem;
}
.appeal-cpop__search::placeholder { color: rgba(0,63,87,.45); }
.appeal-cpop__search:focus { outline: none; box-shadow: inset 0 -2px 0 #00877f !important; border-color: rgba(0,63,87,.12) !important; }
.appeal-cpop__list { max-height: min(300px, 42vh); margin: 0; padding: 4px 0; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.appeal-cpop__option { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 8px 12px; font-size: .76rem; cursor: pointer; }
.appeal-cpop__option[aria-selected="true"] { background: #e9efe9; }
.appeal-cpop__option.is-current .appeal-cpop__name { font-weight: 600; }
.appeal-cpop__option:hover { background: #f1f4f1; }
.appeal-cpop__flag { font-size: 1rem; line-height: 1; }
.appeal-cpop__dial { color: rgba(0,63,87,.55); font-variant-numeric: tabular-nums; }
.appeal-cpop__divider { height: 1px; margin: 4px 12px; background: rgba(0,63,87,.12); }
.appeal-cpop__empty { padding: 14px 12px; color: rgba(0,63,87,.55); font-size: .74rem; }
.appeal-messengers { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.appeal-messengers legend { margin-bottom: 6px; padding: 0; color: var(--af-muted); font-size: .64rem; }
.appeal-pform .appeal-messengers { margin-top: 14px; }
.appeal-mchip { position: relative; cursor: pointer; }
.appeal-mchip input { position: absolute; opacity: 0; }
.appeal-mchip span { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border: 1px solid var(--af-line); border-radius: 999px; font-size: .7rem; transition: background .2s, border-color .2s; }
.appeal-mchip span::before { content: ""; display: grid; place-items: center; width: 12px; height: 12px; border: 1px solid currentColor; border-radius: 3px; font-size: .55rem; line-height: 1; opacity: .7; }
.appeal-mchip input:checked + span { border-color: var(--af-on); background: var(--af-on); color: var(--af-on-ink); }
.appeal-mchip input:checked + span::before { content: "✓"; border-color: transparent; opacity: 1; }
.appeal-mchip input:focus-visible + span { outline: 2px solid #00877f; outline-offset: 2px; }
.appeal-select {
  width: 100%; min-height: var(--af-height); margin: 0; padding: 9px 34px 9px 12px; border: 1px solid var(--af-line); border-radius: 0;
  appearance: none; background: var(--af-bg) var(--af-chevron) no-repeat calc(100% - 14px) 50% / 10px 6px; color: inherit; font: inherit; font-size: .8rem; cursor: pointer;
}
.appeal-select:focus { outline: none; border-color: var(--af-on); box-shadow: inset 0 0 0 1px var(--af-on); }
.appeal-file-input { display: none; }
.appeal-attachments__head, .inv-files__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.appeal-attachments__head small, .inv-files__head small { color: var(--af-muted); font-size: .62rem; }
.appeal-drawer .appeal-attach, .inv-form .appeal-attach {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px dashed var(--af-muted);
  background: transparent; color: inherit; font: inherit; font-size: .72rem; cursor: pointer;
}
.appeal-drawer .appeal-attach:hover, .inv-form .appeal-attach:hover { border-style: solid; border-color: var(--af-on); }
.appeal-attach__plus { font-size: 1rem; line-height: 1; }
.appeal-drawer .appeal-files, .inv-form .appeal-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.appeal-drawer .appeal-files:empty, .inv-form .appeal-files:empty { display: none; }
.appeal-drawer .appeal-file, .inv-form .appeal-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 6px 5px 10px; border: 1px solid var(--af-line); background: var(--af-bg); font-size: .66rem; }
.appeal-drawer .appeal-file b, .inv-form .appeal-file b { overflow: hidden; max-width: 200px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.appeal-drawer .appeal-file small, .inv-form .appeal-file small { color: var(--af-muted); }
.appeal-drawer .appeal-file button, .inv-form .appeal-file button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .6; }
.appeal-drawer .appeal-file button:hover, .inv-form .appeal-file button:hover { opacity: 1; }
.appeal-field .appeal-form-error, [data-field] .appeal-form-error { margin-top: 2px; }
.appeal-pfield .appeal-perror, [data-field] .appeal-perror { margin: 2px 0 0; }
.inv-field .inv-error, .inv-files .inv-error { margin-top: 2px; }

/* ---------- phone ---------- */
@media (max-width: 820px) {
  .appeal-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom) + var(--appeal-lift, 0px)); }
  .appeal-fab.is-open { display: none; }
  .appeal-panel { left: 0; right: 0; bottom: 0; width: 100%; max-height: 82vh; padding-bottom: env(safe-area-inset-bottom); border: 0; border-radius: 14px 14px 0 0; z-index: 200; animation: appealUp .3s cubic-bezier(.22,1,.36,1); }
  .appeal-sheet-handle { display: block; width: 38px; height: 4px; margin: 8px auto 0; border-radius: 4px; background: rgba(255,255,255,.3); }
  .appeal-drawer .appeal-sheet-handle { background: rgba(0,63,87,.2); }
  .appeal-panel__head { padding-top: 14px; }
  .appeal-topic { padding: 14px 10px; }
  .appeal-topic__text b { font-size: .86rem; }
  .appeal-drawer { top: auto; height: 92vh; width: 100%; border-radius: 14px 14px 0 0; animation: appealUp .3s cubic-bezier(.22,1,.36,1); }
  .appeal-drawer__head { padding: 10px 18px 6px; }
  .appeal-drawer__head h2 { font-size: 1.7rem; }
  .appeal-drawer__body { padding: 6px 18px 18px; }
  .appeal-row { grid-template-columns: 1fr; }
  .appeal-lot-form .appeal-submit { position: sticky; bottom: 0; }
  .appeal-drawer input:not([type=radio]):not([type=checkbox]), .appeal-drawer textarea, .appeal-select, .appeal-cpop__search { font-size: 16px; }
  .appeal-cpop { width: 100%; max-width: none; }
  .appeal-cpop__option { padding: 11px 12px; font-size: .84rem; }
  .appeal-toast { left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); width: auto; }
}
@keyframes appealUp { from { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .appeal-fab, .appeal-drawer, .appeal-panel, .appeal-toast { animation: none; transition: none; }
}
