/* ==========================================================================
   theme.css: Foodbar's look, shared by EVERY page.
   Fonts, colours, buttons, form fields and cards are defined once here.
   Load it after a page's own styles. After editing, bump ?v= in the pages'
   <link href="theme.css?v=..."> tags.

   Modelled on what high-ranking delivery apps (DoorDash, Uber Eats) do:
   a geometric sans-serif, heavy headlines, near-black text, pill-shaped
   buttons with one strong primary colour, rounded light-grey fields.
   Their fonts are proprietary; Plus Jakarta Sans is a free look-alike.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Design tokens: change the whole site's look here ───────────────────── */
:root {
    --fb-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    --fb-text: #191919;            /* near-black, softer than pure black */
    --fb-text-muted: #606060;
    --fb-bg: #f7f7f7;
    --fb-surface: #ffffff;
    --fb-border: #e6e6e6;
    --fb-field: #f4f4f4;

    --fb-primary: #c8102e;         /* Foodbar red: the ONE colour for main actions */
    --fb-primary-hover: #a50d26;
    --fb-primary-pressed: #8a0b20;
    --fb-secondary: #efefef;       /* light grey: secondary actions */
    --fb-secondary-hover: #e2e2e2;
    --fb-success: #1f8a4c;         /* "Placed" badges, confirmation tick */
    --fb-warning: #e8890c;         /* "Not placed yet" badges */

    --fb-radius-pill: 9999px;
    --fb-radius-card: 16px;
    --fb-radius-field: 10px;
    --fb-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05), 0 6px 20px rgba(0, 0, 0, 0.06);
    --fb-focus: 0 0 0 3px rgba(200, 16, 46, 0.25);
}

/* ── Typography ─────────────────────────────────────────────────────────── */

html, body, button, input, select, textarea {
    font-family: var(--fb-font);
}

body {
    color: var(--fb-text);
    background-color: var(--fb-bg);
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3,
.price-details h2, .price-details h3,
.order-summary h3, .payment-section h3, .address-section h3,
.description-title, .order-title, .dish-text h3, .hero h1 {
    font-family: var(--fb-font);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--fb-text);
}

h1 { line-height: 1.15; }

/* Headlines printed over photos stay white. */
.hero h1, .hero p {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* Brand wordmark keeps its playful logo font. */
.website-name, .brand {
    font-family: 'Cherry Bomb One', var(--fb-font);
}

/* Prices, totals and money are bold, like the big apps. */
.cart-total, .total, .order-total, #orderTotal, #total {
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--fb-text);
}

.small-text, .price-text {
    color: var(--fb-text-muted);
    font-weight: 600;
    font-size: 14px;
}

#descriptionText, .order-meta, .muted, .dish-text p {
    color: var(--fb-text-muted);
}

/* ── Buttons: pills, bold labels, one primary colour ───────────────────── */

/* Link-style buttons (<a class="button">) centre their label like real buttons. */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

button, .button {
    font-family: var(--fb-font);
    font-weight: 700;
    letter-spacing: -0.005em;
    border: none;
    border-radius: var(--fb-radius-pill);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
}

button:active, .button:active {
    transform: scale(0.98);
}

button:focus-visible, .button:focus-visible, a:focus-visible {
    outline: none;
    box-shadow: var(--fb-focus);
}

/* Primary actions: Add to Cart, Checkout, Place Order, My orders, Sign In. */
.price-details button,
.cart-details button,
.payment-section button,
.button,
.modal-content button {
    min-height: 48px;
    padding: 0 22px;
    font-size: 16px;
    background-color: var(--fb-primary);
    color: #fff;
}

.price-details button:hover,
.cart-details button:hover,
.payment-section button:hover,
.button:hover,
.modal-content button:hover {
    background-color: var(--fb-primary-hover);
    color: #fff;
}

.payment-section button:disabled {
    background-color: #e7a3ae;
    cursor: wait;
}

/* Secondary actions: Order More Food, Back to the menu. */
.cart-details button[onclick^="orderMoreFood"],
.button.secondary {
    background-color: var(--fb-secondary);
    color: var(--fb-text);
    border: none;
}

.cart-details button[onclick^="orderMoreFood"]:hover,
.button.secondary:hover {
    background-color: var(--fb-secondary-hover);
    border-color: transparent;
    color: var(--fb-text);
}

/* Small "Remove" pills in carts and order summaries. */
.remove-btn,
.order-details button {
    display: inline-block;
    padding: 6px 12px;
    min-height: 0;
    font-size: 12px;
    font-weight: 700;
    background-color: var(--fb-secondary);
    color: var(--fb-text);
    border-radius: var(--fb-radius-pill);
}

.remove-btn:hover,
.order-details button:hover {
    background-color: var(--fb-secondary-hover);
    color: var(--fb-primary);
}

/* ── Form fields: rounded, light grey, dark outline when active ────────── */

input[type="text"], input[type="date"], input[type="time"], select,
.price-details select,
.payment-section input, .address-section input,
.delivery-details input[type="date"], .delivery-details input[type="time"],
.date-time-section input {
    font-family: var(--fb-font);
    font-size: 16px;
    font-weight: 500;
    color: var(--fb-text);
    background-color: var(--fb-field);
    border: 1.5px solid transparent;
    border-radius: var(--fb-radius-field);
    min-height: 46px;
    padding: 10px 12px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

input:hover, select:hover {
    border-color: #d0d0d0;
}

input:focus, select:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--fb-text);
}

label,
.delivery-details label, .date-time-section label,
.payment-section label, .address-section label {
    font-weight: 700;
    color: var(--fb-text);
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.price-details, .cart-details,
.order-summary, .payment-section, .address-section,
.card, .order, .message, .dish, .modal-content {
    background-color: var(--fb-surface);
    border-radius: var(--fb-radius-card);
    box-shadow: var(--fb-shadow-card);
    border: 1px solid #eeeeee;
}

.double-line {
    border-top: 2px solid var(--fb-text);
    border-bottom: none;
}

/* ── Home page ─────────────────────────────────────────────────────────── */

.navbar {
    border: none;
    border-bottom: 1px solid var(--fb-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.menu a {
    color: var(--fb-text);
    font-weight: 700;
    font-size: 15px;
    border-radius: var(--fb-radius-pill);
    padding: 9px 16px;
}

.menu a:hover {
    background-color: var(--fb-secondary);
    color: var(--fb-text);
    border-radius: var(--fb-radius-pill);
}

/* "Sign In" / "Welcome" is the one filled button in the top bar. */
.menu a#authLink {
    background-color: var(--fb-text);
    color: #fff;
}

.menu a#authLink:hover {
    background-color: #333;
    color: #fff;
}

.account-dropdown {
    border-radius: 12px;
    border: 1px solid var(--fb-border);
}

.account-dropdown a, .account-dropdown a#signOutLink {
    background: none;
    color: var(--fb-text);
    border-radius: 0;
}

.description {
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.food-box {
    border-radius: 16px;
    border-width: 3px;
}

.food-box-title {
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
}

/* ── Top bars on inner pages (orders, buffet) ─────────────────────────── */

.topbar {
    border: none;
    border-bottom: 1px solid var(--fb-border);
}

.back {
    color: var(--fb-text);
    font-weight: 700;
    border-radius: var(--fb-radius-pill);
    padding: 8px 14px;
}

.back:hover {
    background: var(--fb-secondary);
    color: var(--fb-text);
}

/* ── Status badges ────────────────────────────────────────────────────── */

.status, .badge {
    font-weight: 700;
    border-radius: var(--fb-radius-pill);
}

.status.placed, .badge.order { background-color: var(--fb-success); }
.status.pending { background-color: var(--fb-warning); }
.check { background-color: var(--fb-success); }

.payment-note {
    border-radius: 12px;
    border-color: #f3c27a;
    background-color: #fff7ea;
}
