/* =====================================================================
   Pizza Doy – Design-Refresh v2 (Phase 1) · ADDITIV / MOBILE-FIRST
   ---------------------------------------------------------------------
   - Reines, browserfertiges CSS (KEIN @tailwind, KEIN @apply).
   - Ueberschreibt NICHTS destruktiv: wird NACH app.css geladen und ist
     komplett unter #app gescoped (nur Kunden-Frontend-SPA).
   - KEINE Aenderung an app.css, keine Vue-/Blade-Aenderung noetig.
   - Jederzeit entfernbar: einfach den <link> wieder herausnehmen.
   - Marke Pizza Doy: Magenta/Pink = rgb(255 0 107) = #ff006b
   ===================================================================== */

:root {
    --pd-primary: #ff006b;
    --pd-primary-dark: #e00060;
    --pd-primary-soft: #ffedf4;
    --pd-ink: #1f1f39;
    --pd-muted: #6e7191;
    --pd-ring: rgba(255, 0, 107, .16);
    --pd-line: #eceef5;
    --pd-shadow-sm: 0 2px 10px rgba(23, 31, 70, .06);
    --pd-shadow-card: 0 8px 24px rgba(23, 31, 70, .07);
    --pd-shadow-card-hover: 0 16px 40px rgba(255, 0, 107, .16);
    --pd-shadow-btn: 0 10px 24px rgba(255, 0, 107, .28);
    --pd-shadow-pop: 0 24px 64px rgba(23, 31, 70, .22);
    --pd-ease: cubic-bezier(.22, .61, .36, 1);
    --pd-r: 18px;
}

/* ---------------------------------------------------------------------
   1) BASIS & TYPOGRAFIE
   --------------------------------------------------------------------- */
#app {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

#app h1,
#app h2,
#app h3,
#app h4 {
    letter-spacing: -.01em;
}

#app ::selection {
    background: var(--pd-primary);
    color: #fff;
}

/* dezente, markenfarbene Scrollbar in Drawern/Modals */
#app .thin-scrolling::-webkit-scrollbar,
#app .modal-body::-webkit-scrollbar {
    width: 6px;
}

#app .thin-scrolling::-webkit-scrollbar-thumb,
#app .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 107, .25);
    border-radius: 10px;
}

/* Allgemeine Mikro-Interaktionen (gezielte Properties, nicht "all") */
#app a,
#app button,
#app label[class*="rounded"],
#app .paper-link {
    transition: color .2s var(--pd-ease),
        background-color .2s var(--pd-ease),
        border-color .2s var(--pd-ease),
        box-shadow .25s var(--pd-ease),
        transform .2s var(--pd-ease);
}

/* ---------------------------------------------------------------------
   2) BUTTONS
   --------------------------------------------------------------------- */
/* Primaere CTA-Buttons (exakt Token "bg-primary", nicht bg-primary-light) */
#app button[class~="bg-primary"]:not(:disabled):hover,
#app a[class~="bg-primary"]:hover,
#app .modal-btn-fill:hover,
#app .db-btn[class~="bg-primary"]:hover {
    background-color: var(--pd-primary-dark) !important;
    box-shadow: var(--pd-shadow-btn);
    transform: translateY(-1px);
}

#app button[class~="bg-primary"]:not(:disabled):active,
#app a[class~="bg-primary"]:active,
#app .modal-btn-fill:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(255, 0, 107, .22);
}

#app button[disabled][class~="bg-primary"],
#app button[class~="bg-primary"]:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* Sekundaere / Outline-Buttons: Hover fuellt dezent in Marke */
#app button[class~="border-primary"][class~="text-primary"]:hover,
#app a[class~="border-primary"][class~="text-primary"]:hover {
    background-color: var(--pd-primary) !important;
    color: #fff !important;
    box-shadow: var(--pd-shadow-btn);
}

/* ---------------------------------------------------------------------
   3) HEADER / NAVBAR
   --------------------------------------------------------------------- */
#app .ff-header {
    border-bottom: 1px solid var(--pd-line);
}

#app .ff-header.active {
    box-shadow: 0 8px 28px rgba(23, 31, 70, .10);
    backdrop-filter: saturate(1.1);
}

/* aktive Suchleiste */
#app .header-search-group:focus-within {
    box-shadow: 0 0 0 3px var(--pd-ring);
}

/* Web-Warenkorb-Button (dunkel) etwas edler im Hover */
#app .webcart:hover {
    transform: translateY(-1px);
    box-shadow: var(--pd-shadow-sm);
}

/* ---------------------------------------------------------------------
   4) KATEGORIEN (Pill-Design "SECOND")
   --------------------------------------------------------------------- */
/* aktive Kategorie: statt Grau-Schwarz -> Marke Magenta */
#app .menu-slides a[class~="bg-gray-900"] {
    background-color: var(--pd-primary) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(255, 0, 107, .30);
}

/* inaktive Kategorie: dezenter Marken-Hover */
#app .menu-slides a[class~="text-gray-700"]:hover {
    background-color: var(--pd-primary-soft) !important;
    color: var(--pd-primary) !important;
}

/* Kreis-Design "FIRST": aktive Kategorie mit Marken-Ring */
#app .menu-slides .menu-category-active > div {
    box-shadow: 0 0 0 2px var(--pd-primary) inset, 0 8px 18px rgba(255, 0, 107, .18) !important;
    background: var(--pd-primary-soft) !important;
}

/* Tab-Pills (z.B. Konto) */
#app .other-tabBtn:hover {
    color: var(--pd-primary) !important;
    background-color: var(--pd-primary-soft) !important;
}

/* ---------------------------------------------------------------------
   5) PRODUKTKARTEN
   --------------------------------------------------------------------- */
#app .product-card-grid,
#app .product-card-list {
    overflow: hidden;
    border-color: var(--pd-line) !important;
    box-shadow: var(--pd-shadow-card);
    transition: box-shadow .3s var(--pd-ease),
        transform .3s var(--pd-ease),
        border-color .3s var(--pd-ease);
}

#app .product-card-grid {
    border-radius: var(--pd-r) !important;
}

#app .product-card-grid:hover,
#app .product-card-list:hover {
    box-shadow: var(--pd-shadow-card-hover) !important;
    border-color: rgba(255, 0, 107, .35) !important;
    transform: translateY(-4px);
}

/* sanfter Bild-Zoom im Hover */
#app .product-card-grid-image,
#app .product-card-list-image {
    transition: transform .45s var(--pd-ease);
}

#app .product-card-grid:hover .product-card-grid-image,
#app .product-card-list:hover .product-card-list-image {
    transform: scale(1.06);
}

/* Preis in Markenfarbe hervorheben */
#app .product-card-grid-price-current,
#app .product-card-list-price-current {
    color: var(--pd-primary);
    font-weight: 700;
}

#app .product-card-grid-price-previous,
#app .product-card-list-price-previous {
    color: var(--pd-muted);
}

/* "Hinzufuegen"-Button in der Karte: weich-rosa, Hover fuellt Marke */
#app .product-card-grid-cart-btn,
#app .product-card-list-cart-btn,
#app .add-btn {
    background-color: var(--pd-primary-soft) !important;
    height: 28px;
}

#app .product-card-grid-cart-btn:hover,
#app .product-card-list-cart-btn:hover,
#app .add-btn:hover {
    background-color: var(--pd-primary) !important;
    transform: translateY(-1px);
}

#app .product-card-grid-cart-btn:hover span,
#app .product-card-list-cart-btn:hover span,
#app .add-btn:hover span {
    color: #fff !important;
}

#app .product-card-grid-cart-btn:hover i,
#app .product-card-list-cart-btn:hover i,
#app .add-btn:hover i {
    color: #fff !important;
}

/* ---------------------------------------------------------------------
   6) PRODUKT-MODAL: VARIANTEN / EXTRAS / ADDONS  (Kernfokus)
   --------------------------------------------------------------------- */
/* modernere Chips allgemein (Groesse / Rundung / Grundschatten) */
#app .size-tabs label,
#app .extra,
#app .addon {
    border-radius: 14px !important;
    border-width: 1.5px !important;
    box-shadow: var(--pd-shadow-sm);
    transition: border-color .2s var(--pd-ease),
        background-color .2s var(--pd-ease),
        box-shadow .25s var(--pd-ease),
        transform .2s var(--pd-ease);
}

#app .size-tabs label:hover,
#app .extra:hover,
#app .addon:hover {
    border-color: var(--pd-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 0, 107, .12);
}

/* GEWAEHLTE VARIANTE (Groesse): Vue setzt .active -> deutlich hervorheben */
#app .size-tabs .active {
    background-color: var(--pd-primary-soft) !important;
    border-color: var(--pd-primary) !important;
    box-shadow: 0 0 0 1px var(--pd-primary) inset, 0 8px 20px rgba(255, 0, 107, .16) !important;
}

/* GEWAEHLTES EXTRA: Vue setzt KEINE .active-Klasse -> via :has(:checked)
   erkennen und den ganzen Chip klar als ausgewaehlt markieren. */
#app .extra:has(.custom-checkbox-field:checked) {
    background-color: var(--pd-primary-soft) !important;
    border-color: var(--pd-primary) !important;
    box-shadow: 0 0 0 1px var(--pd-primary) inset, 0 8px 20px rgba(255, 0, 107, .16) !important;
}

/* Extra-Preis in Markenfarbe, wenn gewaehlt */
#app .extra:has(.custom-checkbox-field:checked) h4 {
    color: var(--pd-primary) !important;
}

/* Checkbox-Icon im gewaehlten Zustand kraeftiger */
#app .custom-checkbox-field:checked + .custom-checkbox-icon {
    box-shadow: 0 2px 6px rgba(255, 0, 107, .35);
}

/* Mengen-Stepper (indec-group) als sauberer Pill-Block */
#app .indec-group {
    gap: 2px;
}

#app .indec-minus,
#app .indec-plus {
    width: 22px;
    height: 22px;
    line-height: 20px;
}

#app .indec-minus:hover,
#app .indec-plus:hover {
    box-shadow: 0 2px 8px rgba(255, 0, 107, .30);
}

/* Addon-Karten im Modal */
#app .addon {
    border-color: var(--pd-line) !important;
}

/* ---------------------------------------------------------------------
   7) FORMULARFELDER
   --------------------------------------------------------------------- */
#app input:not([type="radio"]):not([type="checkbox"]):focus,
#app select:focus,
#app textarea:focus {
    border-color: var(--pd-primary) !important;
    box-shadow: 0 0 0 3px var(--pd-ring) !important;
    outline: none !important;
}

/* ---------------------------------------------------------------------
   8) WARENKORB-DRAWER
   --------------------------------------------------------------------- */
#app #cart .max-w-sm {
    box-shadow: var(--pd-shadow-pop);
}

/* Produktbild im Warenkorb weicher */
#app #cart img.w-16.h-16 {
    border-radius: 12px;
}

/* Subtotal-Box hervorheben */
#app #cart .border-gray-1 {
    background: #fbfbfe;
    border-color: var(--pd-line) !important;
    border-radius: 14px !important;
}

/* Lieferart-Umschalter (Delivery/Takeaway) bleibt eigenstaendig, nur Rundung */
#app .cart-switch + label {
    letter-spacing: .01em;
}

/* ---------------------------------------------------------------------
   9) MOBILE BOTTOM-NAV (mobile-first)
   --------------------------------------------------------------------- */
#app nav[class~="shadow-xl-top"] {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -12px 32px rgba(23, 31, 70, .12);
    padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.3) blur(10px);
}

/* aktiver Tab-Punkt */
#app nav[class~="shadow-xl-top"] a.text-primary {
    position: relative;
}

#app nav[class~="shadow-xl-top"] a.text-primary::after {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--pd-primary);
}

/* erhabener Warenkorb-Button in der Mitte */
#app .mobcart {
    box-shadow: 0 10px 22px rgba(255, 0, 107, .40);
}

#app .mobcart:hover {
    background-color: var(--pd-primary-dark) !important;
}

/* ---------------------------------------------------------------------
   10) MODAL – modernere Rundung, Schatten, sanfte Einblendung
   --------------------------------------------------------------------- */
#app .modal-dialog {
    border-radius: 20px !important;
    box-shadow: var(--pd-shadow-pop) !important;
}

#app .modal .modal-dialog {
    opacity: 0;
    transform: translateY(14px) scale(.985);
    transition: opacity .28s var(--pd-ease), transform .28s var(--pd-ease);
}

#app .modal.active .modal-dialog {
    opacity: 1;
    transform: none;
}

/* Account-Dropdown-Links dezenter Hover */
#app .paper-link:hover {
    color: var(--pd-primary);
}

/* ---------------------------------------------------------------------
   11) FOOTER – feiner Marken-Verlauf
   --------------------------------------------------------------------- */
#app .footer-part {
    background-image: linear-gradient(180deg, var(--pd-primary) 0%, var(--pd-primary-dark) 100%);
}

/* reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
    #app * {
        transition: none !important;
    }

    #app .product-card-grid:hover .product-card-grid-image,
    #app .product-card-list:hover .product-card-list-image {
        transform: none;
    }
}

/* =====================================================================
   12) CHECKOUT / KASSE  (nur Design, mobile-first) – additiv
   ===================================================================== */
/* Panel-Karten des Checkouts edler */
#app .pd-checkout [class~="shadow-xs"] {
    box-shadow: var(--pd-shadow-card) !important;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-r) !important;
}

/* mehr Luft auf dem Handy */
#app .pd-checkout .container {
    padding-left: 16px;
    padding-right: 16px;
}

/* -------- Adress- & Zahlungs-Auswahlkarten (active-group) -------- */
#app .active-group label {
    border-radius: 14px !important;
    border-width: 1.5px !important;
    transition: border-color .2s var(--pd-ease),
        background-color .2s var(--pd-ease),
        box-shadow .25s var(--pd-ease),
        transform .2s var(--pd-ease);
}

#app .active-group label:hover {
    border-color: var(--pd-primary) !important;
    transform: translateY(-1px);
    box-shadow: var(--pd-shadow-sm);
}

/* klar erkennbarer AUSGEWAEHLT-Zustand (robust via :has + bestehende .active) */
#app .active-group label.active,
#app .active-group label:has(.custom-radio-field:checked) {
    background-color: var(--pd-primary-soft) !important;
    border-color: var(--pd-primary) !important;
    box-shadow: 0 0 0 1px var(--pd-primary) inset, 0 8px 20px rgba(255, 0, 107, .14) !important;
}

/* -------- Bestellzeit-Optionen (sofort / spaeter) -------- */
#app .pd-time-options {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    #app .pd-time-options {
        grid-template-columns: 1fr 1fr;
    }
}

#app .pd-time-options > label {
    width: 100% !important;
    max-width: none !important;
    border-radius: 14px !important;
    border-width: 1.5px !important;
    padding: 14px 16px !important;
    box-shadow: var(--pd-shadow-sm);
    justify-content: space-between;
}

#app .pd-time-options > label:hover {
    border-color: var(--pd-primary) !important;
    transform: translateY(-1px);
}

#app .pd-time-options > label:has(.custom-radio-field:checked) {
    background-color: var(--pd-primary-soft) !important;
    border-color: var(--pd-primary) !important;
    box-shadow: 0 0 0 1px var(--pd-primary) inset, 0 8px 20px rgba(255, 0, 107, .14) !important;
}

/* Zeitslot-Modal: Slot-Kacheln moderner + Hover/Selektion */
#app #time-schedule-modal .data-tab li {
    border-radius: 12px !important;
    transition: border-color .2s var(--pd-ease), background-color .2s var(--pd-ease), transform .2s var(--pd-ease);
}

#app #time-schedule-modal .data-tab li:hover {
    border-color: var(--pd-primary) !important;
    color: var(--pd-primary) !important;
    transform: translateY(-1px);
}

/* -------- Gutschein: sofort sichtbares Eingabefeld -------- */
#app .pd-coupon-inline {
    border: 1.5px dashed var(--pd-primary);
    background: var(--pd-primary-soft);
    border-radius: 16px;
    padding: 14px;
}

#app .pd-coupon-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--pd-ink);
    margin-bottom: 10px;
}

#app .pd-coupon-title i {
    color: var(--pd-primary);
}

#app .pd-coupon-form input {
    background: #fff;
}

#app .pd-coupon-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--pd-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#app .pd-coupon-more:hover {
    color: var(--pd-primary-dark);
}

/* Fehlermeldung modern */
#app .db-field-alert {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #e11d48;
}

/* Eingabefeld-Fehlerzustand */
#app input.invalid,
#app textarea.invalid {
    border-color: #e11d48 !important;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, .14) !important;
}

/* angewendeter Gutschein-Badge: klarer */
#app .shadow-coupon {
    box-shadow: var(--pd-shadow-card) !important;
    border-radius: 14px !important;
}

/* -------- "Bestellen"-Button prominenter -------- */
#app .pd-place-order {
    height: 52px;
    font-size: 16px;
    box-shadow: var(--pd-shadow-btn);
}

/* -------- Filial-Umschalter (Takeaway) -------- */
#app .branch-navs .active {
    background-color: var(--pd-primary-soft) !important;
    color: var(--pd-primary) !important;
    box-shadow: 0 0 0 1px var(--pd-primary) inset;
}
