/* =======================================================================
   ⚡ RYCHLÁ OBJEDNÁVKA — widget styles (namespace: .qorder83-root)
   Vše je uzavřené pod .qorder83-root, aby to nic na landingu nerozbilo.
   Barvy dle DESIGN.md (Claude warm parchment: ink #121212, clay #d97757).
======================================================================== */

.qorder83-root {
  /* --- Design tokens (scoped) --- */
  --qo-parchment: #f8f8f6;
  --qo-paper: #ffffff;
  --qo-stone: #efeeeb;
  --qo-ink: #121212;
  --qo-graphite: #373734;
  --qo-ashen: #7b7974;
  --qo-pebble: #9c9a92;
  --qo-mist: #b7b7b5;
  --qo-chalk: #e7e6e1;
  /* Přitažlivý zelený akcent (odklon od schématu) */
  --qo-clay: #16a34a;
  --qo-clay-soft: #dcfce7;
  --qo-clay-rgb: 22, 163, 74;

  --qo-font: 'Anthropic Sans', ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --qo-serif: 'Anthropic Serif', ui-serif, Georgia, "Times New Roman", serif;

  --qo-radius-lg: 8px;
  --qo-radius-card: 24px;
  --qo-shadow: rgba(0, 0, 0, 0.04) 0 4px 20px 0;
  --qo-shadow-modal: 0 24px 60px -12px rgba(18, 18, 18, 0.28);
}

/* Sandbox reset — jen uvnitř widgetu, nic venku */
.qorder83-root *,
.qorder83-root *::before,
.qorder83-root *::after {
  box-sizing: border-box;
}
.qorder83-root button,
.qorder83-root input {
  font-family: inherit;
  margin: 0;
}

/* ============================ FAB ============================ */
.qorder83-fab {
  position: fixed;
  top: 40%;
  right: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  padding: 0;
  border: none;
  border-radius: 50% 0 0 50%;
  background: var(--qo-clay);
  color: var(--qo-paper);
  cursor: pointer;
  box-shadow: -6px 10px 26px rgba(var(--qo-clay-rgb), 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: qorder83-bob 3.4s ease-in-out infinite;
}
.qorder83-fab:hover {
  transform: translateX(-4px) scale(1.05);
  box-shadow: -8px 12px 30px rgba(var(--qo-clay-rgb), 0.58);
}
.qorder83-fab:active { transform: scale(0.96); }
.qorder83-fab__icon { position: relative; z-index: 1; animation: qorder83-ring 2.4s ease-in-out infinite; }
.qorder83-fab__pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--qo-clay);
  z-index: 0;
  animation: qorder83-pulse 2.2s ease-out infinite;
}
@keyframes qorder83-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes qorder83-ring {
  0%, 60%, 100% { transform: rotate(0); }
  70% { transform: rotate(-12deg); }
  80% { transform: rotate(12deg); }
  90% { transform: rotate(-8deg); }
}
@keyframes qorder83-bob {
  0%, 100% { top: 40%; }
  50% { top: calc(40% - 6px); }
}

@media (min-width: 768px) {
  .qorder83-fab { width: 86px; height: 86px; }
}

/* ========================== OVERLAY ========================== */
.qorder83-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 18, 18, 0.5);
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.qorder83-overlay--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =========================== MODAL =========================== */
.qorder83-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px 28px 28px;
  background: var(--qo-paper);
  border: 1px solid var(--qo-chalk);
  border-radius: var(--qo-radius-card);
  box-shadow: var(--qo-shadow-modal);
  font-family: var(--qo-font);
  color: var(--qo-ink);
  transform: translateY(0) scale(1);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.qorder83-overlay--hidden .qorder83-modal {
  transform: translateY(24px) scale(0.96);
}

.qorder83-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--qo-chalk);
  border-radius: 50%;
  background: var(--qo-parchment);
  color: var(--qo-graphite);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.qorder83-close:hover {
  background: var(--qo-ink);
  color: var(--qo-paper);
  transform: rotate(90deg);
}

.qorder83-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Eyebrow badge */
.qorder83-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--qo-stone);
  color: var(--qo-graphite);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.2px;
}
.qorder83-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--qo-clay);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: qorder83-blink 1.8s ease-out infinite;
}
@keyframes qorder83-blink {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.qorder83-title {
  margin: 16px 0 6px;
  font-family: var(--qo-serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  color: var(--qo-ink);
}
.qorder83-subtitle {
  margin: 0 0 20px;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--qo-ashen);
}

/* Product photo */
.qorder83-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 200px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--qo-stone);
  border-radius: 16px;
}
.qorder83-photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ===================== PRICE BLOCK ===================== */
.qorder83-price {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 12px 18px;
  background: var(--qo-parchment);
  border: 1px solid var(--qo-chalk);
  border-radius: 16px;
}
.qorder83-price__group {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.qorder83-price__old {
  position: relative;
  font-size: 16px;
  font-weight: 500;
  color: var(--qo-pebble);
}
.qorder83-price__old::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; top: 52%;
  height: 2px;
  background: var(--qo-clay);
  transform: rotate(-8deg);
}
.qorder83-price__new {
  font-size: 28px;
  font-weight: 580;
  line-height: 1;
  color: var(--qo-ink);
}
.qorder83-price__badge {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--qo-clay);
  color: var(--qo-paper);
  font-size: 13px;
  font-weight: 580;
  letter-spacing: 0.3px;
  animation: qorder83-badge 2.6s ease-in-out infinite;
}
@keyframes qorder83-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ========================= FORM ========================= */
.qorder83-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.qorder83-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.qorder83-label {
  font-size: 13px;
  font-weight: 550;
  color: var(--qo-graphite);
}
.qorder83-control {
  position: relative;
  display: flex;
  align-items: center;
}
.qorder83-control__icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--qo-pebble);
  pointer-events: none;
  transition: color 0.2s ease;
}
.qorder83-input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--qo-mist);
  border-radius: var(--qo-radius-lg);
  background: var(--qo-paper);
  color: var(--qo-ink);
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.qorder83-input::placeholder { color: var(--qo-pebble); }
.qorder83-input:focus {
  border-color: var(--qo-ink);
  box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.08);
}
.qorder83-control:focus-within .qorder83-control__icon { color: var(--qo-ink); }
.qorder83-input.qorder83-input--invalid {
  border-color: var(--qo-clay);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}
.qorder83-error {
  min-height: 0;
  font-size: 12px;
  color: var(--qo-clay);
}
.qorder83-error:empty { display: none; }

/* Submit */
.qorder83-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  margin-top: 4px;
  padding: 0 20px;
  border: none;
  border-radius: var(--qo-radius-lg);
  background: var(--qo-ink);
  color: var(--qo-parchment);
  font-size: 15px;
  font-weight: 550;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.qorder83-submit:hover {
  background: #000;
  box-shadow: 0 8px 22px rgba(18, 18, 18, 0.25);
}
.qorder83-submit:hover svg { transform: translateX(3px); }
.qorder83-submit svg { transition: transform 0.2s ease; }
.qorder83-submit:active { transform: scale(0.98); }
/* Shine sweep */
.qorder83-submit::before {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  animation: qorder83-shine 3.6s ease-in-out infinite;
}
@keyframes qorder83-shine {
  0%, 60% { left: -60%; }
  100% { left: 130%; }
}

.qorder83-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--qo-ashen);
}
.qorder83-note svg { color: var(--qo-clay); flex-shrink: 0; }

/* ========================= MOBILE ========================= */
@media (max-width: 480px) {
  .qorder83-modal { padding: 28px 18px 22px; border-radius: 20px; }
  .qorder83-title { font-size: 24px; }
  .qorder83-price__new { font-size: 24px; }
  .qorder83-photo { max-width: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .qorder83-root *,
  .qorder83-root *::before,
  .qorder83-root *::after {
    animation: none !important;
  }
}

/* ── Fix: zpráva validace telefonu (.pg-message) pod polem, ne vedle inputu ── */
.qorder83-control { flex-wrap: wrap; }
.qorder83-control .pg-message {
  flex: 0 0 100%;
  width: 100%;
  order: 3;
  margin-top: 6px;
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
  color: var(--qo-clay, #dc3545);
}
