/* RestaurantDirect – Fahrer-App · Mobile-Native · v0.9.3 */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }

/* Verhindert, dass Theme min-width auf html/body die Seite breiter als den Viewport macht */
html {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Body-Override: läuft nach wp_head(), gewinnt gegen Theme */
body.rd-fullscreen-page {
    font-size: 18px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #0d1b2a !important;
    color: #f1f5f9;
    line-height: 1.4;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.rd-fullscreen-page.admin-bar { margin-top: 0 !important; }
body.rd-fullscreen-page #wpadminbar { display: none !important; }

/* Theme-Elemente verstecken (Footer, WooCommerce Floating-Cart, Notices) */
body.rd-fullscreen-page .site-footer,
body.rd-fullscreen-page #footer,
body.rd-fullscreen-page footer,
body.rd-fullscreen-page .woocommerce-store-notice,
body.rd-fullscreen-page .wc-block-mini-cart,
body.rd-fullscreen-page .woocommerce-mini-cart,
body.rd-fullscreen-page .cart-contents,
body.rd-fullscreen-page #ez-toc-container,
body.rd-fullscreen-page .back-to-top,
body.rd-fullscreen-page #scroll-to-top { display: none !important; }

.rd-app {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0d1b2a;
    padding-bottom: 80px;
}

/* ═══════════════════════════════════════════════════════════════
   APP-HEADER
═══════════════════════════════════════════════════════════════ */
.rd-app-header {
    display: flex;
    align-items: center;
    background: #1B2A6B;
    padding: 14px 16px;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 12px rgba(0,0,0,.6);
    min-height: 64px;
}
.rd-app-logo    { font-size: 1rem; font-weight: 700; color: #fff; flex: 1; }
.rd-driver-name { font-size: 0.89rem; color: rgba(255,255,255,.85); white-space: nowrap; }
.rd-chef-badge  { font-size: 0.78rem; background: #f59e0b; color: #000; padding: 2px 7px; border-radius: 4px; margin-left: 5px; font-weight: 700; }
.rd-btn-icon    { background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; padding: 10px; border-radius: 8px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   STATUS-BAR
═══════════════════════════════════════════════════════════════ */
.rd-status-bar {
    background: #1b2a3e;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 2px solid rgba(255,255,255,.12);
}
.rd-status-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#rd-status-label       { font-size: 1.22rem; font-weight: 900; color: #22c55e; }
#rd-shift-time-display { font-size: 0.83rem; color: #64748b; }

.rd-status-actions { display: flex; gap: 8px; width: 100%; }
.rd-status-actions .rd-btn {
    flex: 1;
    min-width: 0;       /* erlaubt Schrumpfen unter Content-Breite */
    justify-content: center;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    min-height: 56px;
    padding: 8px 2px;
    border-radius: 10px;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════
   SCREENS
═══════════════════════════════════════════════════════════════ */
.rd-screen        { display: none; flex: 1; flex-direction: column; }
.rd-screen-active { display: flex; }

/* ═══════════════════════════════════════════════════════════════
   SCHICHTBEGINN
═══════════════════════════════════════════════════════════════ */
#rd-shift-start-screen {
    align-items: center; justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(160deg, #0d1b2a 0%, #1a2545 100%);
}
.rd-shift-start-card {
    background: #1b2a3e;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 28px 20px;
    width: 100%; max-width: 420px;
    text-align: center;
}
.rd-shift-start-card h2 { color: #ff6b1a; margin-bottom: 8px; font-size: 1.33rem; }
.rd-shift-start-card p  { color: #94a3b8; margin-bottom: 20px; font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════
   FOKUS-MODUS (aktive Lieferung, alle anderen ausgeblendet)
═══════════════════════════════════════════════════════════════ */
#rd-active-order {
    padding: 16px;
}
.rd-focus-header {
    font-size: 1.11rem;
    font-weight: 900;
    color: #ff6b1a;
    text-align: center;
    letter-spacing: .04em;
    padding: 10px 0 14px;
}
/* Im Fokus-Modus: Karte bekommt stärkere linke Borte */
#rd-active-order .rd-order-card {
    border-left-color: #22c55e;
    border-left-width: 7px;
}

/* ═══════════════════════════════════════════════════════════════
   AUFTRAGS-LISTE
═══════════════════════════════════════════════════════════════ */
#rd-orders-container { padding: 16px; }
#rd-orders-list      { display: flex; flex-direction: column; gap: 20px; }

.rd-waiting {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px 20px; text-align: center; color: #475569;
}
.rd-waiting p     { font-size: 1rem; margin-top: 8px; }
.rd-waiting small { font-size: 0.89rem; }
.rd-pulse { font-size: 3rem; animation: rdPulse 2s ease-in-out infinite; display: block; }
@keyframes rdPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(1.15)} }

/* ═══════════════════════════════════════════════════════════════
   AUFTRAGS-KARTE
═══════════════════════════════════════════════════════════════ */
.rd-order-card {
    background: #1b2a3e;
    border-radius: 14px;
    padding: 18px 16px 16px;
    border-left: 5px solid #ff6b1a;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
    animation: rdSlideIn .3s ease;
}
@keyframes rdSlideIn { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
.rd-order-card.rd-order-done          { border-left-color: #16a34a; opacity: .45; }
.rd-order-card[data-status="ready"]   { border-left-color: #f59e0b; }
.rd-order-card[data-status="picked"]  { border-left-color: #3b82f6; }

/* Kopf */
.rd-order-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.rd-order-number {
    font-size: 1.78rem;  /* ~32px */
    font-weight: 900;
    color: #ff6b1a;
    line-height: 1;
    flex-shrink: 0;
}
.rd-order-time    { font-size: 0.89rem; color: #94a3b8; flex-shrink: 0; }
.rd-payment-badge {
    margin-left: auto;
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 0.89rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.rd-badge-cash { background: #7f1d1d; color: #fca5a5; border: 1px solid #b91c1c; }
.rd-badge-paid { background: #14532d; color: #86efac; border: 1px solid #16a34a; }

/* Kundenname */
.rd-customer-name { font-size: 1rem; font-weight: 700; color: #e2e8f0; margin-bottom: 6px; }

/* Adresse */
.rd-order-address { margin-bottom: 10px; }
.rd-address-line  { font-size: 1.22rem; font-weight: 600; color: #fff; line-height: 1.3; }
.rd-floor-note    { font-size: 1rem; font-weight: 600; color: #fcd34d; margin-top: 5px; }

/* Preis */
.rd-order-total {
    font-size: 1.56rem;  /* ~28px */
    font-weight: 900;
    color: #ffc107;
    text-align: right;
    margin-bottom: 14px;
    line-height: 1;
}

/* Ready-Banner */
.rd-ready-banner {
    background: #78350f;
    border: 1px solid #f59e0b;
    border-radius: 10px;
    color: #fcd34d;
    font-size: 1rem;
    font-weight: 800;
    padding: 11px 14px;
    margin-bottom: 12px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   ANNEHMEN + ABLEHNEN — kommen als ERSTES
═══════════════════════════════════════════════════════════════ */
.rd-action-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}
.rd-btn-accept,
.rd-btn-decline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    min-height: 80px;
    border-radius: 12px;
    border: none;
    font-size: 1.11rem;
    font-weight: 900;
    line-height: 1.2;
    padding: 12px 8px;
    cursor: pointer;
    font-family: inherit;
}
.rd-btn-accept { background: #ea580c; color: #fff; }
.rd-btn-decline { background: #dc2626; color: #fff; }
.rd-btn-accept:active  { opacity: .8; }
.rd-btn-decline:active { opacity: .8; }

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION + TELEFON (nach Annehmen sichtbar)
═══════════════════════════════════════════════════════════════ */
.rd-contact-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.rd-maps-link,
.rd-phone-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 72px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1.11rem;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.rd-maps-link  { background: #f59e0b; color: #000; }
.rd-phone-link { background: #16a34a; color: #fff; }
.rd-maps-link:active,
.rd-phone-link:active { opacity: .8; }

/* ═══════════════════════════════════════════════════════════════
   AKKORDEON (Speisen-Kontrolle)
═══════════════════════════════════════════════════════════════ */
.rd-items-section { margin-bottom: 12px; }
.rd-accordion-btn {
    width: 100%;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 600;
    padding: 13px 16px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    min-height: 52px;
}
.rd-order-items {
    background: rgba(255,255,255,.04);
    border-radius: 0 0 10px 10px;
    padding: 12px 16px;
    font-size: 1.11rem;
    line-height: 1.9;
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,.07);
    border-top: none;
}

/* ═══════════════════════════════════════════════════════════════
   WORKFLOW-BUTTONS (Abgeholt, Zugestellt, Problem)
═══════════════════════════════════════════════════════════════ */
.rd-workflow-actions { display: flex; flex-direction: column; gap: 10px; }
.rd-btn-pickup,
.rd-btn-deliver,
.rd-btn-problem {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 68px;
    border-radius: 12px;
    border: none;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 14px 12px;
    cursor: pointer;
    font-family: inherit;
}
.rd-btn-pickup  { background: #d97706; color: #fff; }
.rd-btn-deliver { background: #16a34a; color: #fff; }
.rd-btn-problem { background: transparent; color: #94a3b8; border: 1px solid rgba(255,255,255,.2); }
.rd-btn-pickup:active,
.rd-btn-deliver:active { opacity: .8; }

/* ═══════════════════════════════════════════════════════════════
   BARZAHLUNG
═══════════════════════════════════════════════════════════════ */
.rd-cash-confirm {
    background: rgba(185,28,28,.12);
    border: 1px solid rgba(185,28,28,.35);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}
.rd-cash-confirm h3 { color: #fca5a5; font-size: 1.05rem; margin-bottom: 10px; }
.rd-amount-due-display {
    background: rgba(255,193,7,.12);
    border: 1px solid rgba(255,193,7,.4);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 1.22rem;
    color: #cbd5e1;
}
.rd-amount-due { color: #ffc107; font-size: 1.56rem; font-weight: 900; }
.rd-change-display  { margin: 10px 0; font-size: 1rem; color: #cbd5e1; }
.rd-change-amount   { color: #86efac; font-weight: 700; }
.rd-btn-cash-confirm {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    margin-top: 10px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   FORMULARE
═══════════════════════════════════════════════════════════════ */
.rd-form-group       { margin-bottom: 12px; text-align: left; }
.rd-form-group label { display: block; margin-bottom: 5px; color: #94a3b8; font-size: 0.89rem; font-weight: 600; }
.rd-input {
    width: 100%;
    padding: 13px 14px;
    border: 2px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color .15s;
}
.rd-input:focus  { border-color: #ff6b1a; outline: none; }
.rd-input-large  { font-size: 1.78rem; text-align: center; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   MODAL (Schichtende)
═══════════════════════════════════════════════════════════════ */
.rd-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.92);
    display: flex; align-items: center; justify-content: center;
    z-index: 999; padding: 16px;
    backdrop-filter: blur(4px);
}
.rd-modal-content {
    background: #1b2a3e;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    padding: 24px 20px;
    width: 100%; max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
}
.rd-modal-content h2 { color: #ff6b1a; font-size: 1.22rem; margin-bottom: 14px; }
.rd-modal-actions    { display: flex; gap: 10px; margin-top: 16px; }
.rd-modal-actions .rd-btn { flex: 1; justify-content: center; min-height: 56px; border-radius: 10px; }
#rd-kasse-uebergabe-btn {
    width: 100%;
    min-height: 64px;
    font-size: 1.05rem;
    font-weight: 800;
    border-radius: 12px;
}
.rd-summary-table    { width: 100%; border-collapse: collapse; font-size: 1rem; }
.rd-summary-table td { padding: 10px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
.rd-summary-table td:last-child { text-align: right; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   VERBINDUNGS-BAR
═══════════════════════════════════════════════════════════════ */
.rd-connection-bar { padding: 5px 16px; font-size: 0.83rem; text-align: center; min-height: 22px; }
.rd-bar-warn  { background: #f59e0b; color: #000; }
.rd-bar-error { background: #dc2626; color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   BUTTON-SYSTEM (Basis — für Status-Bar + Modal)
═══════════════════════════════════════════════════════════════ */
.rd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    font-family: inherit;
    text-align: center;
}
.rd-btn:active { opacity: .78; }

.rd-btn-primary { background: #ff6b1a; color: #fff; }
.rd-btn-success { background: #16a34a; color: #fff; }
.rd-btn-danger  { background: #dc2626; color: #fff; }
.rd-btn-warning { background: #d97706; color: #fff; }
.rd-btn-outline { background: transparent; color: #94a3b8; border-color: rgba(255,255,255,.2); }

.rd-btn-sm { padding: 8px 12px; font-size: 0.89rem; }
.rd-btn-xl { padding: 18px; font-size: 1.05rem; width: 100%; border-radius: 12px; min-height: 64px; }
