/* assets/css/ddp-prefs.css
   Clean, modern & theme-proof (scoped to .ddp-pref-scope)
   - Desktop: centered modal
   - Mobile: app-like bottom sheet
   - Rows: card style + clear ✓ selected
   - Search: no injected “Q/icon”
   - iOS: prevents auto-zoom on inputs by keeping 16px
*/

.ddp-pref-scope{
  /* Palette */
  --ink:#1f242b;
  --ink-2:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --line-strong:#d1d5db;
  --bg:#ffffff;
  --bg-soft:#f9fafb;
  --overlay:rgba(15,23,42,.50);
  --radius:16px;
  --shadow:0 18px 40px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.06);
  --z:2147483640;
  --rowh:50px;

  /* Progress */
  --succ-1:#16a34a;
  --succ-2:#22c55e;
  --warn-1:#f59e0b;
  --warn-2:#facc15;
  --track:#e5e7eb;

  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--ink);
  isolation:isolate;

  -webkit-text-size-adjust:100%;
  text-rendering:optimizeLegibility;
}
.ddp-pref-no-scroll{overflow:hidden!important}

/* Root on top of everything */
#ddp-pref-root.ddp-pref-scope{
  position:relative;
  z-index:2147483646!important;
}

/* ---------------- iOS zoom guard ---------------- */
@supports (-webkit-touch-callout: none) {
  .ddp-pref-scope input,
  .ddp-pref-scope select,
  .ddp-pref-scope textarea{
    font-size:16px !important;
  }
}

/* ---------------- Overlay + Modal ---------------- */
.ddp-pref-scope .ddp-pref-overlay{
  position:fixed;
  inset:0;
  background:var(--overlay)!important;
  -webkit-backdrop-filter:blur(4px) saturate(120%);
  backdrop-filter:blur(4px) saturate(120%);
  z-index:2147483647!important;
}
.ddp-pref-scope .ddp-pref-overlay[hidden]{display:none!important}

.ddp-pref-scope .ddp-pref-modal{
  position:fixed;
  left:50%;
  top:clamp(14px, 7vh, 64px);
  transform:translateX(-50%);
  width:min(96vw,760px);
  max-height:88vh;

  overflow:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;

  background:var(--bg)!important;
  color:var(--ink)!important;
  border:1px solid var(--line)!important;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px 18px 14px;
  z-index:2147483647!important;

  /* app-like layout inside */
  display:flex;
  flex-direction:column;
}
.ddp-pref-scope .ddp-pref-modal[hidden]{display:none!important}

.ddp-pref-scope .ddp-head,
.ddp-pref-scope .ddp-tabs,
.ddp-pref-scope .ddp-actions{ flex:0 0 auto; }
.ddp-pref-scope .ddp-panels{ flex:1 1 auto; min-height:0; }

@media (prefers-reduced-motion:no-preference){
  .ddp-pref-scope .ddp-pref-modal{
    animation:ddp-enter .16s ease-out;
  }
  @keyframes ddp-enter{
    from{transform:translate(-50%,-6px) scale(.985);opacity:0}
    to{transform:translate(-50%,0) scale(1);opacity:1}
  }
}

/* Kill theme focus ring on modal/title */
.ddp-pref-scope .ddp-pref-modal:focus,
.ddp-pref-scope .ddp-title:focus,
.ddp-pref-scope [tabindex="-1"]:focus{
  outline:none!important;
  box-shadow:none!important;
}

/* ---------------- Header ---------------- */
.ddp-pref-scope .ddp-head{
  margin:0 0 6px;
  text-align:center;
}
.ddp-pref-scope .ddp-title{
  font-size:26px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:-.015em;
  color:var(--ink)!important;
  margin:0 0 4px;
}
.ddp-pref-scope .ddp-subtitle{
  margin:0;
  font-size:13px;
  color:var(--muted)!important;
}

/* ---------------- Tabs ---------------- */
.ddp-pref-scope .ddp-tabs{
  display:flex;
  justify-content:center;
  gap:10px;
  border-bottom:1px solid var(--line)!important;
  padding:8px 0 10px;
  margin:8px 0 10px;
}
.ddp-pref-scope .ddp-tab{
  appearance:none;
  background:transparent!important;
  border:none!important;
  box-shadow:none!important;
  outline:none!important;

  padding:8px 12px;
  cursor:pointer;

  font-weight:900;
  font-size:14px;
  color:var(--ink)!important;

  position:relative;
  border-radius:999px;

  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.ddp-pref-scope .ddp-tab:hover{
  background:var(--bg-soft)!important;
}
.ddp-pref-scope .ddp-tab.is-active{
  background:#eef6ff!important;
  border:1px solid #cfe6ff!important;
}
.ddp-pref-scope .ddp-tab.is-active::after{
  content:"";
  position:absolute;
  left:14px; right:14px; bottom:-10px;
  height:2px;
  background:var(--ink)!important;
  border-radius:2px;
}

/* Kill theme button styling on tabs */
.ddp-pref-scope .ddp-tabs .ddp-tab{
  border:0!important;
  box-shadow:none!important;
  background-image:none!important;
}
.ddp-pref-scope .ddp-tabs .ddp-tab::before{content:none!important}
.ddp-pref-scope .ddp-tabs .ddp-tab[class*="button"],
.ddp-pref-scope .ddp-tabs .ddp-tab[class*="btn"]{
  border:0!important;
  box-shadow:none!important;
  background:none!important;
}

/* ---------------- Panels ---------------- */
.ddp-pref-scope .ddp-panels{position:relative}
.ddp-pref-scope .ddp-panel.is-hidden{display:none!important}
.ddp-pref-scope .ddp-panel::after{
  content:"";
  position:sticky;
  bottom:-1px;
  height:22px;
  margin-top:-22px;
  display:block;
  background:linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--bg) 85%);
  pointer-events:none;
}

/* ---------------- List (max 4 rows visible) ---------------- */
.ddp-pref-scope .ddp-list{
  list-style:none;
  margin:0;
  padding:0;

  max-height:calc(var(--rowh)*4 + 18px);
  overflow:auto;

  scrollbar-gutter:stable;
  scrollbar-width:none!important;
  -ms-overflow-style:none;
}
.ddp-pref-scope .ddp-list::-webkit-scrollbar{
  width:0!important;
  height:0!important;
}

/* ---------------- Items (card rows) ---------------- */
.ddp-pref-scope .ddp-item{
  position:relative;
  padding:8px 0;
  border:0!important;
}
.ddp-pref-scope .ddp-item:first-child{
  padding-top:6px;
}
.ddp-pref-scope .ddp-item:last-child{
  padding-bottom:6px;
}

/* ---------------- Row layout (card) ---------------- */
.ddp-pref-scope .ddp-item .ddp-row{
  display:flex;
  align-items:center;
  gap:10px;
  position:relative;

  padding:12px 44px 12px 14px; /* right space for ✓ bubble */
  min-height:var(--rowh);

  border:1px solid var(--line)!important;
  border-radius:14px;
  background:var(--bg)!important;

  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;

  transition:transform .05s ease, border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.ddp-pref-scope .ddp-item .ddp-row:hover{
  background:var(--bg-soft)!important;
  border-color:var(--line-strong)!important;
}
.ddp-pref-scope .ddp-item .ddp-row:active{ transform:scale(.99); }

.ddp-pref-scope .ddp-item .ddp-name{
  font-weight:900;
  font-size:15px;
  color:var(--ink)!important;
}
.ddp-pref-scope .ddp-item .ddp-meta{
  margin-left:auto;
  font-size:12.5px;
  color:var(--muted)!important;
  white-space:nowrap;
}
.ddp-pref-scope .ddp-item .ddp-meta strong{
  font-weight:900;
  color:var(--ink-2)!important;
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:var(--bg-soft)!important;
  border:1px solid var(--line)!important;
}

/* ---------------- Radios (hidden input + strong selected) ---------------- */
.ddp-pref-scope .ddp-item input[type="radio"]{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

/* Selected row */
.ddp-pref-scope .ddp-item input[type="radio"]:checked + .ddp-row{
  border-color:var(--ink)!important;
  background:#eef6ff!important;
  box-shadow:0 8px 18px rgba(15,23,42,.10);
}
.ddp-pref-scope .ddp-item input[type="radio"]:checked + .ddp-row::after{
  content:"✓";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  width:26px;
  height:26px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--ink)!important;
  color:#fff!important;
  font-weight:900;
  font-size:14px;
}

/* Focus */
.ddp-pref-scope .ddp-item input[type="radio"]:focus-visible + .ddp-row{
  outline:2px solid var(--ink)!important;
  outline-offset:2px;
}

/* ---------------- Pickup open/closed badge ---------------- */
.ddp-pref-scope .ddp-badge{
  border:1px solid var(--ink)!important;
  border-radius:999px;
  padding:2px 8px;
  font-size:10.5px;
  font-weight:900;
  margin-right:6px;
  line-height:1.1;
}
.ddp-pref-scope .ddp-badge.ok{
  background:var(--ink)!important;
  color:#fff!important;
}
.ddp-pref-scope .ddp-badge.no{
  background:#fff!important;
  color:var(--ink)!important;
}

/* ---------------- SEARCH (clean, no stray Q/icon) ---------------- */
.ddp-pref-scope .ddp-search-row{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:10px 0 12px;
}
.ddp-pref-scope .ddp-search-label{
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted)!important;
}

.ddp-pref-scope .ddp-search-input-wrap{
  position:relative!important;
  border-radius:999px;
  border:1px solid var(--line)!important;
  background:#f9fafb!important;
  overflow:hidden;
}

/* kill theme pseudo/icons on wrap + input */
.ddp-pref-scope .ddp-search-input-wrap::before,
.ddp-pref-scope .ddp-search-input-wrap::after,
.ddp-pref-scope .ddp-search-input::before,
.ddp-pref-scope .ddp-search-input::after{
  content:none!important;
}

.ddp-pref-scope .ddp-search-input{
  width:100%;
  border:0!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;

  padding:10px 14px;
  font-size:16px; /* iOS zoom-safe */
  line-height:1.25;
  color:var(--ink)!important;

  outline:none!important;
  appearance:none;
  -webkit-appearance:none;
}
.ddp-pref-scope .ddp-search-input::placeholder{
  color:#94a3b8;
}
.ddp-pref-scope .ddp-search-input:focus{
  background:#fff!important;
}

/* remove iOS search decorations */
.ddp-pref-scope .ddp-search-input::-webkit-search-decoration,
.ddp-pref-scope .ddp-search-input::-webkit-search-cancel-button,
.ddp-pref-scope .ddp-search-input::-webkit-search-results-button,
.ddp-pref-scope .ddp-search-input::-webkit-search-results-decoration{
  display:none!important;
}

/* If your theme injects icons via classes */
.ddp-pref-scope .ddp-search-icon{ display:none!important; }

/* ---------------- Actions ---------------- */
.ddp-pref-scope .ddp-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;
}
.ddp-pref-scope .ddp-btn{
  appearance:none!important;
  border-radius:12px;
  padding:10px 16px;
  font-weight:900;
  cursor:pointer;

  border:1px solid var(--ink)!important;
  background:var(--ink)!important;
  color:#fff!important;

  transition:transform .06s ease, background-color .12s ease, border-color .12s ease, opacity .12s ease;
  font-size:13px;

  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.ddp-pref-scope .ddp-btn:hover{
  transform:translateY(-1px);
  background:var(--ink-2)!important;
  border-color:var(--ink-2)!important;
}
.ddp-pref-scope .ddp-btn.ghost{
  background:#fff!important;
  color:var(--ink)!important;
  border-color:var(--line-strong)!important;
}
.ddp-pref-scope .ddp-btn.ghost:hover{
  border-color:var(--ink)!important;
}
.ddp-pref-scope .ddp-btn[disabled],
.ddp-pref-scope .ddp-btn[aria-disabled="true"]{
  opacity:.45;
  cursor:not-allowed;
  transform:none!important;
}

/* Prefs FAB replaced by #ddp-unified-fab — no separate prefs FAB CSS needed */

/* ---------------- Generic focus ---------------- */
.ddp-pref-scope .ddp-tab:focus-visible,
.ddp-pref-scope .ddp-btn:focus-visible{
  outline:2px solid var(--ink)!important;
  outline-offset:2px;
}

/* ---------------- Mobile tweaks ---------------- */
@media (max-width:768px){
  .ddp-pref-scope .ddp-pref-modal{
    width:min(96vw,720px);
    padding:16px;
    margin-bottom:env(safe-area-inset-bottom);
  }
}

@media (max-width:640px){
  /* Bottom-sheet modal (mobile only) */
  .ddp-pref-scope .ddp-pref-modal{
    left:0;
    right:0;
    bottom:0;
    top:auto;
    transform:none;

    width:100vw;
    max-height:92vh;

    border-radius:22px 22px 0 0;
    padding:16px 14px calc(14px + env(safe-area-inset-bottom));

    border-left:0!important;
    border-right:0!important;
    border-bottom:0!important;
  }

  .ddp-pref-scope .ddp-title{font-size:22px}
  .ddp-pref-scope .ddp-subtitle{font-size:12px}

  /* Tabs sticky like app */
  .ddp-pref-scope .ddp-tabs{
    position:sticky;
    top:0;
    z-index:3;
    background:var(--bg)!important;
    padding-top:6px;
  }

  /* Row: compact + meta wraps */
  .ddp-pref-scope .ddp-item .ddp-row{
    align-items:flex-start;
    flex-wrap:wrap;
    padding:12px 44px 12px 12px;
    min-height:auto;
  }
  .ddp-pref-scope .ddp-item .ddp-name{font-size:14px}
  .ddp-pref-scope .ddp-item .ddp-meta{
    margin-left:0;
    flex-basis:100%;
    white-space:normal;
    margin-top:4px;
    font-size:11px;
    line-height:1.35;
    text-align:left;
  }

  /* Buttons: full width on mobile (NOT sticky bottom) */
  .ddp-pref-scope .ddp-actions{
    justify-content:stretch;
    gap:10px;
  }
  .ddp-pref-scope .ddp-actions .ddp-btn{
    width:100%;
    text-align:center;
  }
}

@media (max-width:640px) and (prefers-reduced-motion:no-preference){
  .ddp-pref-scope .ddp-pref-modal{ animation:ddp-sheet .18s ease-out; }
  @keyframes ddp-sheet{
    from{transform:translateY(18px);opacity:0}
    to{transform:translateY(0);opacity:1}
  }
}

@media (max-width:380px){
  .ddp-pref-scope .ddp-title{font-size:21px}
}

/* ===================================================================
   Professional refresh: lighter, tighter, faster-feeling selector
   =================================================================== */
.ddp-pref-scope{
  --ink:#20242a;
  --ink-2:#0f1115;
  --muted:#697180;
  --line:#e6e8ec;
  --line-strong:#cfd4dc;
  --bg-soft:#f6f8fa;
  --overlay:rgba(9,14,22,.54);
  --radius:22px;
  --shadow:0 24px 70px rgba(10,15,25,.22), 0 2px 8px rgba(10,15,25,.08);
  --rowh:54px;
}

.ddp-pref-scope .ddp-pref-overlay{
  background:var(--overlay)!important;
  -webkit-backdrop-filter:blur(8px) saturate(110%);
  backdrop-filter:blur(8px) saturate(110%);
}

.ddp-pref-scope .ddp-pref-modal{
  width:min(94vw,690px);
  max-height:min(86vh,760px);
  padding:24px 24px 18px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.55)!important;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.ddp-pref-scope .ddp-head{
  text-align:left;
  margin:0 0 16px;
}
.ddp-pref-scope .ddp-title{
  font-size:30px;
  line-height:1.05;
  letter-spacing:0;
  margin:0 0 7px;
}
.ddp-pref-scope .ddp-subtitle{
  font-size:14px;
  line-height:1.35;
}

.ddp-pref-scope .ddp-tabs{
  justify-content:flex-start;
  gap:4px;
  width:max-content;
  max-width:100%;
  padding:4px;
  margin:0 0 16px;
  border:1px solid var(--line)!important;
  border-radius:999px;
  background:var(--bg-soft)!important;
}
.ddp-pref-scope .ddp-tab{
  min-width:104px;
  padding:10px 18px;
  border-radius:999px;
  font-size:14px;
  transition:background-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.ddp-pref-scope .ddp-tab.is-active{
  background:#111!important;
  color:#fff!important;
  border:0!important;
  box-shadow:0 8px 18px rgba(17,17,17,.16)!important;
}
.ddp-pref-scope .ddp-tab.is-active::after{ content:none!important; }

.ddp-pref-scope .ddp-panels{
  min-height:0;
  overflow:hidden;
  border-top:1px solid var(--line);
  padding-top:16px;
}
.ddp-pref-scope .ddp-panel{
  min-height:0;
}
.ddp-pref-scope .ddp-panel::after{ content:none; }

.ddp-pref-scope .ddp-search{
  margin:0 0 12px;
}
.ddp-pref-scope .ddp-search-label{
  display:block;
  margin:0 0 8px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#7a8290!important;
}
.ddp-pref-scope .ddp-search-inner{
  position:relative;
  border:1px solid var(--line)!important;
  border-radius:14px;
  background:#fff!important;
  box-shadow:0 1px 0 rgba(10,15,25,.03);
}
.ddp-pref-scope .ddp-search-inner:focus-within{
  border-color:#111!important;
  box-shadow:0 0 0 3px rgba(17,17,17,.08)!important;
}
.ddp-pref-scope .ddp-search-icon{ display:none!important; }
.ddp-pref-scope .ddp-search-input{
  width:100%;
  height:46px;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  outline:none!important;
  padding:0 14px!important;
  font-size:16px;
  color:var(--ink)!important;
}
.ddp-pref-scope .ddp-search-input::placeholder{ color:#9aa4b2; }

.ddp-pref-scope .ddp-list{
  max-height:min(342px, 42vh);
  padding:1px 2px 1px 0;
  overflow:auto;
  scrollbar-width:thin!important;
}
.ddp-pref-scope .ddp-list::-webkit-scrollbar{ width:6px!important; }
.ddp-pref-scope .ddp-list::-webkit-scrollbar-thumb{
  background:#d8dde5;
  border-radius:999px;
}
.ddp-pref-scope .ddp-item{
  padding:5px 0;
}
.ddp-pref-scope .ddp-item .ddp-row{
  min-height:58px;
  padding:12px 48px 12px 14px;
  border-radius:15px;
  border-color:var(--line)!important;
  background:#fff!important;
  box-shadow:0 1px 0 rgba(10,15,25,.03);
}
.ddp-pref-scope .ddp-item .ddp-row:hover{
  background:#fbfcfd!important;
  border-color:var(--line-strong)!important;
}
.ddp-pref-scope .ddp-item .ddp-name{
  font-size:15px;
  line-height:1.2;
}
.ddp-pref-scope .ddp-item .ddp-meta{
  color:#737b89!important;
  font-size:12px;
}
.ddp-pref-scope .ddp-item .ddp-meta strong{
  padding:3px 8px;
  background:#f7f8fa!important;
  border-color:#e1e4e8!important;
  color:#151922!important;
}
.ddp-pref-scope .ddp-item input[type="radio"]:checked + .ddp-row{
  background:#f4f8ff!important;
  border-color:#111!important;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}
.ddp-pref-scope .ddp-item input[type="radio"]:checked + .ddp-row::after{
  width:28px;
  height:28px;
  right:12px;
  background:#111!important;
  box-shadow:0 8px 18px rgba(17,17,17,.18);
}

.ddp-pref-scope .ddp-badge{
  padding:3px 8px;
  border-color:#d9dde5!important;
  color:#111!important;
  background:#fff!important;
}
.ddp-pref-scope .ddp-badge.ok{
  background:#ecfdf3!important;
  border-color:#bbf7d0!important;
  color:#047857!important;
}
.ddp-pref-scope .ddp-badge.no{
  background:#fff7ed!important;
  border-color:#fed7aa!important;
  color:#9a3412!important;
}

.ddp-pref-scope .ddp-actions{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--line);
  justify-content:flex-end;
}
.ddp-pref-scope .ddp-btn{
  min-height:44px;
  border-radius:14px;
  padding:0 18px;
  font-size:14px;
  transition:transform .08s ease, background-color .12s ease, border-color .12s ease, opacity .12s ease, box-shadow .12s ease;
}
.ddp-pref-scope .ddp-btn:not(.ghost){
  box-shadow:0 12px 24px rgba(17,17,17,.16)!important;
}
.ddp-pref-scope .ddp-btn:hover{
  transform:translateY(-1px);
}
.ddp-pref-scope .ddp-btn:active{
  transform:translateY(0) scale(.99);
}
.ddp-pref-scope .ddp-btn.ghost{
  color:#252a32!important;
  border-color:var(--line-strong)!important;
  background:#fff!important;
}

@media (prefers-reduced-motion:no-preference){
  .ddp-pref-scope .ddp-pref-modal{
    animation:ddp-pref-pop .18s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes ddp-pref-pop{
    from{ transform:translateX(-50%) translateY(8px) scale(.985); opacity:0; }
    to{ transform:translateX(-50%) translateY(0) scale(1); opacity:1; }
  }
}

@media (max-width:640px){
  .ddp-pref-scope .ddp-pref-modal{
    width:100vw;
    max-height:90dvh;
    padding:18px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius:22px 22px 0 0;
    overflow:hidden;
  }
  .ddp-pref-scope .ddp-head{
    text-align:left;
    margin-bottom:14px;
  }
  .ddp-pref-scope .ddp-title{ font-size:25px; }
  .ddp-pref-scope .ddp-subtitle{ font-size:13px; }
  .ddp-pref-scope .ddp-tabs{
    width:100%;
    margin-bottom:14px;
  }
  .ddp-pref-scope .ddp-tab{
    flex:1 1 0;
    min-width:0;
    padding:10px 12px;
  }
  .ddp-pref-scope .ddp-panels{
    padding-top:14px;
  }
  .ddp-pref-scope .ddp-list{
    max-height:42vh;
    padding-right:0;
  }
  .ddp-pref-scope .ddp-item .ddp-row{
    display:grid;
    grid-template-columns:1fr;
    gap:6px;
    align-items:center;
    padding:12px 46px 12px 12px;
  }
  .ddp-pref-scope .ddp-item .ddp-meta{
    margin-left:0;
    white-space:normal;
  }
  .ddp-pref-scope .ddp-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .ddp-pref-scope .ddp-actions .ddp-btn{
    width:100%;
  }
}

@media (max-width:640px) and (prefers-reduced-motion:no-preference){
  .ddp-pref-scope .ddp-pref-modal{ animation:ddp-pref-sheet .18s cubic-bezier(.2,.8,.2,1); }
  @keyframes ddp-pref-sheet{
    from{ transform:translateY(18px); opacity:0; }
    to{ transform:translateY(0); opacity:1; }
  }
}

/* ===================================================================
   Premium restaurant look: warm, polished, app-like
   =================================================================== */
.ddp-pref-scope{
  --ddp-food-ink:#141312;
  --ddp-food-charcoal:#11100f;
  --ddp-food-panel:#fffaf2;
  --ddp-food-card:#fffefb;
  --ddp-food-line:#eadfce;
  --ddp-food-muted:#786f64;
  --ddp-food-gold:#c98a2c;
  --ddp-food-green:#0f8f58;
  --ddp-food-shadow:0 28px 90px rgba(10,8,6,.28), 0 3px 12px rgba(10,8,6,.10);
}

.ddp-pref-scope .ddp-pref-overlay{
  background:rgba(8,10,12,.62)!important;
  -webkit-backdrop-filter:blur(10px) saturate(112%);
  backdrop-filter:blur(10px) saturate(112%);
}

.ddp-pref-scope .ddp-pref-modal{
  width:min(94vw,720px);
  max-height:min(88vh,780px);
  padding:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.52)!important;
  border-radius:28px;
  background:var(--ddp-food-panel)!important;
  box-shadow:var(--ddp-food-shadow);
}

.ddp-pref-scope .ddp-head{
  position:relative;
  text-align:left;
  margin:0;
  padding:28px 28px 34px;
  background:
    linear-gradient(135deg,#11100f 0%,#20201d 58%,#322211 100%)!important;
  color:#fff!important;
  overflow:hidden;
}
.ddp-pref-scope .ddp-head::before{
  content:"";
  position:absolute;
  left:28px;
  right:28px;
  bottom:0;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--ddp-food-gold),#f2c46d,#0f8f58);
}
.ddp-pref-scope .ddp-title{
  position:relative;
  z-index:1;
  color:#fff!important;
  font-size:32px;
  line-height:1.04;
  margin:0 0 8px;
  letter-spacing:0;
}
.ddp-pref-scope .ddp-subtitle{
  position:relative;
  z-index:1;
  color:rgba(255,255,255,.72)!important;
  font-size:14px;
  line-height:1.45;
}

.ddp-pref-scope .ddp-tabs{
  position:relative;
  z-index:2;
  width:auto;
  max-width:none;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin:-24px 28px 0;
  padding:6px;
  border:1px solid rgba(20,19,18,.08)!important;
  border-radius:18px;
  background:#fff!important;
  box-shadow:0 14px 28px rgba(20,19,18,.12);
}
.ddp-pref-scope .ddp-tab{
  min-width:0;
  min-height:44px;
  padding:0 16px 0 38px;
  border-radius:13px;
  font-size:14px;
  color:var(--ddp-food-ink)!important;
  text-align:left;
}
.ddp-pref-scope .ddp-tab::before{
  content:""!important;
  position:absolute;
  left:14px;
  top:50%;
  width:12px;
  height:12px;
  border-radius:999px;
  transform:translateY(-50%);
  border:2px solid currentColor;
  opacity:.55;
}
.ddp-pref-scope #ddp-tab-delivery::after,
.ddp-pref-scope #ddp-tab-pickup::after{
  content:none!important;
}
.ddp-pref-scope .ddp-tab.is-active{
  background:var(--ddp-food-charcoal)!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(17,16,15,.20)!important;
}
.ddp-pref-scope .ddp-tab.is-active::before{
  opacity:1;
  border-color:var(--ddp-food-gold);
  background:var(--ddp-food-gold);
  box-shadow:0 0 0 3px rgba(201,138,44,.18);
}

.ddp-pref-scope .ddp-panels{
  border:0;
  padding:22px 28px 0;
  background:var(--ddp-food-panel)!important;
  overflow:hidden;
}

.ddp-pref-scope .ddp-search{
  margin:0 0 14px;
}
.ddp-pref-scope .ddp-search-label{
  margin:0 0 8px;
  color:#8b7561!important;
  letter-spacing:.13em;
}
.ddp-pref-scope .ddp-search-inner{
  border:1px solid var(--ddp-food-line)!important;
  border-radius:16px;
  background:#fffdf8!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75), 0 1px 0 rgba(20,19,18,.03);
}
.ddp-pref-scope .ddp-search-inner::before{
  content:"";
  position:absolute;
  left:14px;
  top:50%;
  width:10px;
  height:10px;
  border:2px solid #a8947c;
  border-radius:999px;
  transform:translateY(-55%);
  opacity:.75;
}
.ddp-pref-scope .ddp-search-inner::after{
  content:"";
  position:absolute;
  left:24px;
  top:27px;
  width:7px;
  height:2px;
  border-radius:999px;
  background:#a8947c;
  transform:rotate(45deg);
  opacity:.75;
}
.ddp-pref-scope .ddp-search-inner:focus-within{
  border-color:var(--ddp-food-gold)!important;
  box-shadow:0 0 0 4px rgba(201,138,44,.14)!important;
}
.ddp-pref-scope .ddp-search-input{
  height:48px;
  padding:0 14px 0 40px!important;
  color:var(--ddp-food-ink)!important;
}

.ddp-pref-scope .ddp-list{
  max-height:min(354px,42vh);
  padding:0 3px 0 0;
}
.ddp-pref-scope .ddp-list::-webkit-scrollbar-thumb{
  background:#d2b991;
}
.ddp-pref-scope .ddp-item{
  padding:6px 0;
}
.ddp-pref-scope .ddp-item .ddp-row{
  min-height:66px;
  padding:13px 52px 13px 16px;
  border:1px solid var(--ddp-food-line)!important;
  border-radius:18px;
  background:var(--ddp-food-card)!important;
  box-shadow:0 8px 22px rgba(20,19,18,.045);
}
.ddp-pref-scope .ddp-item .ddp-row::before{
  content:"";
  position:absolute;
  left:0;
  top:14px;
  bottom:14px;
  width:3px;
  border-radius:0 999px 999px 0;
  background:transparent;
}
.ddp-pref-scope .ddp-item .ddp-row:hover{
  transform:translateY(-1px);
  background:#fff!important;
  border-color:#decaa9!important;
  box-shadow:0 12px 26px rgba(20,19,18,.07);
}
.ddp-pref-scope .ddp-item .ddp-name{
  color:var(--ddp-food-ink)!important;
  font-size:15.5px;
  font-weight:900;
}
.ddp-pref-scope .ddp-item .ddp-meta{
  color:var(--ddp-food-muted)!important;
  font-size:12px;
}
.ddp-pref-scope .ddp-item .ddp-meta strong{
  background:#fff7e8!important;
  border-color:#efd7ac!important;
  color:#2b2115!important;
}
.ddp-pref-scope .ddp-item input[type="radio"]:checked + .ddp-row{
  background:#fff8eb!important;
  border-color:var(--ddp-food-gold)!important;
  box-shadow:0 16px 34px rgba(98,58,10,.14);
}
.ddp-pref-scope .ddp-item input[type="radio"]:checked + .ddp-row::before{
  background:linear-gradient(180deg,var(--ddp-food-gold),#0f8f58);
}
.ddp-pref-scope .ddp-item input[type="radio"]:checked + .ddp-row::after{
  background:var(--ddp-food-charcoal)!important;
  color:#fff!important;
  box-shadow:0 10px 20px rgba(17,16,15,.24);
}

.ddp-pref-scope .ddp-badge{
  border-color:#e8d5b7!important;
  background:#fff7e8!important;
  color:#7c4d12!important;
}
.ddp-pref-scope .ddp-badge.ok{
  background:#e9f8ef!important;
  border-color:#bce8ce!important;
  color:var(--ddp-food-green)!important;
}

.ddp-pref-scope .ddp-actions{
  margin:18px 0 0;
  padding:16px 28px 22px;
  border-top:1px solid var(--ddp-food-line);
  background:#fffdf8!important;
}
.ddp-pref-scope .ddp-btn{
  min-height:46px;
  border-radius:16px;
  padding:0 20px;
}
.ddp-pref-scope .ddp-btn:not(.ghost){
  background:var(--ddp-food-charcoal)!important;
  border-color:var(--ddp-food-charcoal)!important;
  box-shadow:0 14px 28px rgba(17,16,15,.20)!important;
}
.ddp-pref-scope .ddp-btn.ghost{
  background:#fff!important;
  border-color:#d9cbb8!important;
  color:#2a241d!important;
}

@media (prefers-reduced-motion:no-preference){
  .ddp-pref-scope .ddp-item .ddp-row{
    transition:transform .12s ease, border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
  }
  .ddp-pref-scope .ddp-pref-modal{
    animation:ddp-food-pop .2s cubic-bezier(.2,.85,.2,1);
  }
  @keyframes ddp-food-pop{
    from{ transform:translateX(-50%) translateY(10px) scale(.982); opacity:0; }
    to{ transform:translateX(-50%) translateY(0) scale(1); opacity:1; }
  }
}

@media (max-width:640px){
  .ddp-pref-scope .ddp-pref-modal{
    max-height:91dvh;
    border-radius:24px 24px 0 0;
  }
  .ddp-pref-scope .ddp-head{
    padding:22px 18px 30px;
  }
  .ddp-pref-scope .ddp-head::before{
    left:18px;
    right:18px;
  }
  .ddp-pref-scope .ddp-title{
    font-size:26px;
  }
  .ddp-pref-scope .ddp-tabs{
    margin:-20px 16px 0;
  }
  .ddp-pref-scope .ddp-panels{
    padding:18px 16px 0;
  }
  .ddp-pref-scope .ddp-list{
    max-height:43vh;
  }
  .ddp-pref-scope .ddp-item .ddp-row{
    min-height:64px;
    padding:13px 48px 13px 14px;
  }
  .ddp-pref-scope .ddp-actions{
    padding:14px 16px calc(16px + env(safe-area-inset-bottom));
  }
}

@media (max-width:640px) and (prefers-reduced-motion:no-preference){
  .ddp-pref-scope .ddp-pref-modal{ animation:ddp-food-sheet .2s cubic-bezier(.2,.85,.2,1); }
  @keyframes ddp-food-sheet{
    from{ transform:translateY(18px); opacity:0; }
    to{ transform:translateY(0); opacity:1; }
  }
}

/* ===================================================================
   Executive premium reset: compact, clean, enterprise-grade
   =================================================================== */
.ddp-pref-scope{
  --ddp-premium-ink:#111315;
  --ddp-premium-muted:#737985;
  --ddp-premium-line:#e7e9ee;
  --ddp-premium-soft:#f6f7f9;
  --ddp-premium-chip:#f8f9fb;
  --ddp-premium-shadow:0 28px 80px rgba(7,12,20,.24), 0 2px 8px rgba(7,12,20,.08);
}

.ddp-pref-scope .ddp-pref-overlay{
  background:rgba(8,12,18,.58)!important;
  -webkit-backdrop-filter:blur(10px) saturate(105%);
  backdrop-filter:blur(10px) saturate(105%);
}

.ddp-pref-scope .ddp-pref-modal{
  width:min(92vw,620px);
  max-height:min(84vh,700px);
  padding:0;
  overflow:hidden;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.72)!important;
  background:#fff!important;
  box-shadow:var(--ddp-premium-shadow);
}

.ddp-pref-scope .ddp-head{
  margin:0;
  padding:22px 24px 14px;
  text-align:left;
  background:#fff!important;
  color:var(--ddp-premium-ink)!important;
  border-bottom:1px solid var(--ddp-premium-line);
}
.ddp-pref-scope .ddp-head::before{ content:none!important; }
.ddp-pref-scope .ddp-title{
  margin:0 0 5px;
  color:var(--ddp-premium-ink)!important;
  font-size:24px;
  line-height:1.12;
  font-weight:900;
  letter-spacing:0;
}
.ddp-pref-scope .ddp-subtitle{
  margin:0;
  color:var(--ddp-premium-muted)!important;
  font-size:13px;
  line-height:1.35;
}

.ddp-pref-scope .ddp-tabs{
  width:auto;
  max-width:none;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  margin:14px 24px 0;
  padding:4px;
  border:1px solid var(--ddp-premium-line)!important;
  border-radius:14px;
  background:var(--ddp-premium-soft)!important;
  box-shadow:none!important;
}
.ddp-pref-scope .ddp-tab{
  min-width:0;
  min-height:38px;
  padding:0 14px;
  border-radius:10px;
  color:var(--ddp-premium-ink)!important;
  font-size:13px;
  font-weight:900;
  text-align:center;
}
.ddp-pref-scope .ddp-tab::before,
.ddp-pref-scope .ddp-tab::after{
  content:none!important;
}
.ddp-pref-scope .ddp-tab.is-active{
  background:#111!important;
  color:#fff!important;
  box-shadow:0 6px 14px rgba(17,17,17,.16)!important;
}

.ddp-pref-scope .ddp-panels{
  padding:16px 24px 0;
  border:0;
  background:#fff!important;
  overflow:hidden;
}
.ddp-pref-scope .ddp-search{
  margin:0 0 12px;
}
.ddp-pref-scope .ddp-search-label{
  margin:0 0 7px;
  color:#7d8491!important;
  font-size:10.5px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.ddp-pref-scope .ddp-search-inner{
  border:1px solid var(--ddp-premium-line)!important;
  border-radius:12px;
  background:#fff!important;
  box-shadow:none!important;
}
.ddp-pref-scope .ddp-search-inner::before{
  content:"";
  position:absolute;
  left:13px;
  top:50%;
  width:10px;
  height:10px;
  border:2px solid #a1a8b3;
  border-radius:999px;
  transform:translateY(-58%);
  opacity:.9;
}
.ddp-pref-scope .ddp-search-inner::after{
  content:"";
  position:absolute;
  left:23px;
  top:25px;
  width:7px;
  height:2px;
  border-radius:999px;
  background:#a1a8b3;
  transform:rotate(45deg);
}
.ddp-pref-scope .ddp-search-inner:focus-within{
  border-color:#111!important;
  box-shadow:0 0 0 3px rgba(17,17,17,.07)!important;
}
.ddp-pref-scope .ddp-search-input{
  height:42px;
  padding:0 12px 0 38px!important;
  color:var(--ddp-premium-ink)!important;
  font-size:15px!important;
}
.ddp-pref-scope .ddp-search-input::placeholder{
  color:#9aa2af;
}

.ddp-pref-scope .ddp-list{
  max-height:min(314px,40vh);
  padding:0 2px 0 0;
  overflow:auto;
  scrollbar-width:thin!important;
}
.ddp-pref-scope .ddp-list::-webkit-scrollbar{ width:6px!important; }
.ddp-pref-scope .ddp-list::-webkit-scrollbar-thumb{
  background:#d7dbe2;
  border-radius:999px;
}
.ddp-pref-scope .ddp-item{
  padding:4px 0;
}
.ddp-pref-scope .ddp-item .ddp-row{
  min-height:54px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:10px 42px 10px 13px;
  border:1px solid var(--ddp-premium-line)!important;
  border-radius:14px;
  background:#fff!important;
  box-shadow:none!important;
}
.ddp-pref-scope .ddp-item .ddp-row::before{ content:none!important; }
.ddp-pref-scope .ddp-item .ddp-row:hover{
  transform:none;
  background:#fafbfc!important;
  border-color:#d9dde5!important;
  box-shadow:none!important;
}
.ddp-pref-scope .ddp-item .ddp-name{
  min-width:0;
  color:var(--ddp-premium-ink)!important;
  font-size:14.5px;
  font-weight:900;
  line-height:1.2;
}
.ddp-pref-scope .ddp-item .ddp-meta{
  margin-left:0;
  color:#666d78!important;
  font-size:12px;
  white-space:nowrap;
}
.ddp-pref-scope .ddp-item .ddp-meta strong{
  padding:2px 7px;
  border:1px solid var(--ddp-premium-line)!important;
  border-radius:999px;
  background:var(--ddp-premium-chip)!important;
  color:#171a1f!important;
  font-weight:900;
}
.ddp-pref-scope .ddp-item input[type="radio"]:checked + .ddp-row{
  background:#f7f8fa!important;
  border-color:#111!important;
  box-shadow:0 8px 18px rgba(17,17,17,.08)!important;
}
.ddp-pref-scope .ddp-item input[type="radio"]:checked + .ddp-row::after{
  content:"✓";
  width:24px;
  height:24px;
  right:11px;
  background:#111!important;
  color:#fff!important;
  box-shadow:none!important;
  font-size:13px;
}

.ddp-pref-scope .ddp-badge{
  justify-self:start;
  margin:0;
  padding:2px 7px;
  border:1px solid var(--ddp-premium-line)!important;
  border-radius:999px;
  background:#fff!important;
  color:#4b5563!important;
  font-size:10.5px;
}
.ddp-pref-scope .ddp-badge.ok{
  background:#eefaf3!important;
  border-color:#cfeedd!important;
  color:#087a49!important;
}
.ddp-pref-scope .ddp-badge.no{
  background:#fff7ed!important;
  border-color:#fed7aa!important;
  color:#9a3412!important;
}

.ddp-pref-scope .ddp-actions{
  margin:14px 0 0;
  padding:14px 24px 18px;
  border-top:1px solid var(--ddp-premium-line);
  background:#fff!important;
  justify-content:flex-end;
}
.ddp-pref-scope .ddp-btn{
  min-height:40px;
  border-radius:12px;
  padding:0 16px;
  font-size:13px;
}
.ddp-pref-scope .ddp-btn:not(.ghost){
  background:#111!important;
  border-color:#111!important;
  box-shadow:0 8px 18px rgba(17,17,17,.14)!important;
}
.ddp-pref-scope .ddp-btn.ghost{
  background:#fff!important;
  border-color:#d8dde5!important;
  color:#20242a!important;
}

@media (prefers-reduced-motion:no-preference){
  .ddp-pref-scope .ddp-pref-modal{
    animation:ddp-exec-pop .16s cubic-bezier(.2,.8,.2,1);
  }
  .ddp-pref-scope .ddp-tab,
  .ddp-pref-scope .ddp-btn,
  .ddp-pref-scope .ddp-item .ddp-row{
    transition:background-color .12s ease, border-color .12s ease, box-shadow .12s ease, transform .08s ease;
  }
  @keyframes ddp-exec-pop{
    from{ transform:translateX(-50%) translateY(6px) scale(.99); opacity:0; }
    to{ transform:translateX(-50%) translateY(0) scale(1); opacity:1; }
  }
}

@media (max-width:640px){
  .ddp-pref-scope .ddp-pref-modal{
    width:100vw;
    max-height:90dvh;
    border-radius:22px 22px 0 0;
  }
  .ddp-pref-scope .ddp-head{
    padding:20px 16px 13px;
  }
  .ddp-pref-scope .ddp-title{ font-size:23px; }
  .ddp-pref-scope .ddp-tabs{
    margin:12px 16px 0;
  }
  .ddp-pref-scope .ddp-panels{
    padding:14px 16px 0;
  }
  .ddp-pref-scope .ddp-list{
    max-height:42vh;
  }
  .ddp-pref-scope .ddp-item .ddp-row{
    grid-template-columns:1fr;
    gap:5px;
    min-height:58px;
    padding:11px 42px 11px 12px;
  }
  .ddp-pref-scope .ddp-item .ddp-meta{
    white-space:normal;
    font-size:11.5px;
  }
  .ddp-pref-scope .ddp-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    padding:12px 16px calc(14px + env(safe-area-inset-bottom));
  }
}

@media (max-width:640px) and (prefers-reduced-motion:no-preference){
  .ddp-pref-scope .ddp-pref-modal{ animation:ddp-exec-sheet .16s cubic-bezier(.2,.8,.2,1); }
  @keyframes ddp-exec-sheet{
    from{ transform:translateY(14px); opacity:0; }
    to{ transform:translateY(0); opacity:1; }
  }
}
