/* // path: public/assets/css/order-widget.css */

/* Dark glass theme for f4 site */

:root{
  --ow-z: 9999;

  /* Backdrop */
  --ow-backdrop: rgba(2, 6, 23, .72);

  /* Card */
  --ow-card: rgba(17, 24, 39, .72);     /* slate-900 glass */
  --ow-card-2: rgba(2, 6, 23, .45);     /* deeper glass */
  --ow-border: rgba(148, 163, 184, .14);/* slate-300/14 */
  --ow-shadow: 0 30px 80px rgba(0,0,0,.55);

  /* Text */
  --ow-text: rgba(255,255,255,.92);
  --ow-muted: rgba(226,232,240,.68);
  --ow-hint: rgba(226,232,240,.52);

  /* Accent (ваш оранжевый) */
  --ow-accent: #f97316;   /* orange-500 */
  --ow-accent-2: #fb923c; /* orange-400 */
  --ow-accent-3: #ea580c; /* orange-600 */

  /* Inputs */
  --ow-input: rgba(15, 23, 42, .55);
  --ow-input-border: rgba(148, 163, 184, .18);
  --ow-input-focus: rgba(249, 115, 22, .55);

  /* Radius */
  --ow-r: 18px;
  --ow-r2: 24px;

  /* Font */
  --ow-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* ---------- root bucket ---------- */
#order-widget-root{
  position: fixed;
  inset: 0;
  z-index: var(--ow-z);
  display: none;
  font-family: var(--ow-font);
}
#order-widget-root.ow-open{ display:block; }

/* ---------- backdrop ---------- */
.ow-backdrop{
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 800px at 30% 20%, rgba(249,115,22,.18), transparent 55%),
              radial-gradient(900px 600px at 80% 10%, rgba(99,102,241,.16), transparent 60%),
              rgba(2,6,23,.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: owFade .14s ease-out;
}
@keyframes owFade{ from{opacity:0} to{opacity:1} }

/* ---------- panel wrapper ---------- */
.ow-panel-wrap{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
}

/* ---------- panel (glass) ---------- */
.ow-panel{
  pointer-events: auto;
  width: min(760px, 100%);
  border-radius: var(--ow-r2);
  border: 1px solid var(--ow-border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    var(--ow-card);
  box-shadow: var(--ow-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transform: translateY(8px) scale(.99);
  opacity: 0;
  animation: owPop .18s ease-out forwards;
  position: relative;
}
@keyframes owPop{
  to{ transform: translateY(0) scale(1); opacity: 1; }
}

/* subtle glow line */
.ow-panel::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(700px 200px at 20% 0%, rgba(249,115,22,.25), transparent 55%),
              radial-gradient(600px 220px at 80% 0%, rgba(59,130,246,.20), transparent 55%);
  opacity:.45;
  pointer-events:none;
}

/* inner border to look premium */
.ow-panel::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--ow-r2);
  border: 1px solid rgba(255,255,255,.06);
  pointer-events:none;
}

/* ---------- header ---------- */
.ow-head{
  position: relative;
  padding: 18px 18px 12px 18px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.ow-title{
  margin:0;
  color: var(--ow-text);
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 18px;
  line-height: 1.2;
}
.ow-subtitle{
  margin-top: 6px;
  color: var(--ow-muted);
  font-size: 13px;
  line-height: 1.35;
}
.ow-close{
  appearance:none;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(2,6,23,.35);
  color: rgba(255,255,255,.85);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.ow-close:hover{
  transform: translateY(-1px);
  background: rgba(2,6,23,.55);
  border-color: rgba(255,255,255,.18);
}
.ow-close:active{ transform: translateY(0px) scale(.98); }

/* ---------- body ---------- */
.ow-body{
  position: relative;
  padding: 0 18px 18px 18px;
}
.ow-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px){
  .ow-grid{ grid-template-columns: 1fr; }
}

/* ---------- fields ---------- */
.ow-field{ display:flex; flex-direction:column; gap: 6px; }
.ow-label{
  color: rgba(226,232,240,.78);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
}
.ow-input,
.ow-textarea{
  width: 100%;
  background: var(--ow-input);
  border: 1px solid var(--ow-input-border);
  border-radius: 14px;
  color: var(--ow-text);
  padding: 11px 12px;
  outline: none;
  font-size: 14px;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.ow-textarea{
  min-height: 110px;
  resize: vertical;
  padding-top: 10px;
}
.ow-input::placeholder,
.ow-textarea::placeholder{
  color: rgba(226,232,240,.40);
}
.ow-input:focus,
.ow-textarea:focus{
  border-color: rgba(249,115,22,.60);
  box-shadow: 0 0 0 4px rgba(249,115,22,.18);
  background: rgba(15,23,42,.62);
}

/* file */
.ow-file{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.ow-file input[type="file"]{
  color: rgba(226,232,240,.78);
  font-size: 13px;
}
.ow-hint{
  color: var(--ow-hint);
  font-size: 12px;
  line-height: 1.35;
}

/* error line */
.ow-error{
  margin-top: 10px;
  display:none;
  border-radius: 14px;
  border: 1px solid rgba(248,113,113,.35);
  background: rgba(127,29,29,.25);
  color: rgba(254,226,226,.92);
  padding: 10px 12px;
  font-size: 13px;
}
.ow-error.ow-show{ display:block; }

/* ---------- footer ---------- */
.ow-foot{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 18px 18px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, transparent, rgba(2,6,23,.18));
}
.ow-meta{
  color: rgba(226,232,240,.55);
  font-size: 12px;
}
.ow-actions{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* buttons */
.ow-btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(2,6,23,.30);
  color: rgba(255,255,255,.90);
  padding: 10px 14px;
  border-radius: 14px;
  cursor:pointer;
  font-size: 14px;
  font-weight: 700;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.ow-btn:hover{
  transform: translateY(-1px);
  background: rgba(2,6,23,.45);
  border-color: rgba(255,255,255,.18);
}
.ow-btn:active{ transform: translateY(0) scale(.99); }

.ow-btn-primary{
  border: 1px solid rgba(249,115,22,.55);
  background: linear-gradient(180deg, rgba(251,146,60,.95), rgba(249,115,22,.92));
  color: rgba(2,6,23,.92);
  box-shadow: 0 10px 24px rgba(249,115,22,.22);
}
.ow-btn-primary:hover{
  border-color: rgba(249,115,22,.70);
  box-shadow: 0 12px 28px rgba(249,115,22,.28);
    color: #ffffff;
}
.ow-btn[disabled]{
  opacity: .62;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- mobile fullscreen ---------- */
@media (max-width: 520px){
  .ow-panel-wrap{ padding: 0; }
  .ow-panel{
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .ow-panel::after{ border-radius: 0; }
  .ow-panel::before{ opacity:.35; }
  .ow-body{ padding-bottom: 14px; }
  .ow-foot{
    position: sticky;
    bottom: 0;
    background: rgba(2,6,23,.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

/* ---------- small toast system (independent) ---------- */
.ow-toast-bucket{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: calc(var(--ow-z) + 10);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  font-family: var(--ow-font);
}
.ow-toast{
  pointer-events: auto;
  min-width: 220px;
  max-width: 420px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(17,24,39,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0,0,0,.42);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  font-size: 13px;
  display:flex;
  align-items:flex-start;
  gap: 10px;
  animation: owToastIn .16s ease-out;
}
@keyframes owToastIn{ from{opacity:0; transform: translateY(6px)} to{opacity:1; transform:none} }

.ow-toast strong{ font-weight: 800; letter-spacing:.2px; }
.ow-toast .ow-x{
  margin-left:auto;
  appearance:none;
  border:0;
  background: transparent;
  color: rgba(255,255,255,.70);
  cursor:pointer;
  padding: 2px 6px;
  border-radius: 10px;
}
.ow-toast .ow-x:hover{ color: rgba(255,255,255,.92); background: rgba(255,255,255,.06); }

.ow-toast--ok{ border-color: rgba(34,197,94,.28); }
.ow-toast--ok strong{ color: rgba(34,197,94,.92); }

.ow-toast--bad{ border-color: rgba(248,113,113,.30); }
.ow-toast--bad strong{ color: rgba(248,113,113,.92); }

.ow-toast--info{ border-color: rgba(249,115,22,.28); }
.ow-toast--info strong{ color: rgba(249,115,22,.95); }
