/*
 * The picnic theme: the brand red with a red-and-white gingham ribbon under the menu bar and over the
 * footer, like a picnic tablecloth. The layout's <body> carries both classes:
 *
 *   theme-soft    the brand red for buttons and links instead of Bootstrap blue, friendlier fonts
 *                 (Fredoka for headings and the menu, Nunito for text), a warm off-white page and
 *                 rounder, softer cards
 *   theme-ribbon  the gingham ribbon, two squares tall (one square on its own reads as battlements)
 *
 * PDFs draw the same ribbon with App\Support\BrandedPdf::ribbon().
 */

:root {
    --mf-red: #ab0000;
    --mf-red-dark: #8a0000;
    --mf-red-soft: #fbeaea;
    --mf-cream: #fffaf4;
    --mf-ink: #2b2220;
    /* Gingham: two half-transparent red stripes crossing on white make the three tones of a picnic cloth */
    --mf-gingham: linear-gradient(90deg, rgba(171, 0, 0, 0.55) 50%, transparent 50%),
                  linear-gradient(rgba(171, 0, 0, 0.55) 50%, transparent 50%);
}

/* --- Shared softening ------------------------------------------------------------------------- */

.theme-soft {
    --bs-body-font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-color: var(--mf-ink);
    --bs-body-bg: var(--mf-cream);
    --bs-link-color: var(--mf-red);
    --bs-link-color-rgb: 171, 0, 0;
    --bs-link-hover-color: var(--mf-red-dark);
    --bs-link-hover-color-rgb: 138, 0, 0;
    --bs-primary: var(--mf-red);
    --bs-primary-rgb: 171, 0, 0;
    --bs-border-radius: 0.6rem;
    --bs-border-radius-lg: 1rem;
    --bs-focus-ring-color: rgba(171, 0, 0, 0.25);
    background-color: var(--mf-cream);
}
.theme-soft h1, .theme-soft .h1, .theme-soft h2, .theme-soft .h2, .theme-soft h3, .theme-soft .h3,
.theme-soft .h4, .theme-soft h4, .theme-soft .h5, .theme-soft h5 {
    font-family: "Fredoka", "Nunito", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.005em;
}

/* Buttons and controls in the brand red */
.theme-soft .btn { border-radius: 2rem; font-weight: 600; }
.theme-soft .btn-sm { border-radius: 1.5rem; }
.theme-soft .btn-primary {
    --bs-btn-bg: var(--mf-red); --bs-btn-border-color: var(--mf-red);
    --bs-btn-hover-bg: var(--mf-red-dark); --bs-btn-hover-border-color: var(--mf-red-dark);
    --bs-btn-active-bg: var(--mf-red-dark); --bs-btn-active-border-color: var(--mf-red-dark);
    --bs-btn-disabled-bg: #c96a6a; --bs-btn-disabled-border-color: #c96a6a;
    --bs-btn-focus-shadow-rgb: 171, 0, 0;
    box-shadow: 0 2px 0 var(--mf-red-dark);
}
.theme-soft .btn-outline-primary {
    --bs-btn-color: var(--mf-red); --bs-btn-border-color: var(--mf-red);
    --bs-btn-hover-bg: var(--mf-red); --bs-btn-hover-border-color: var(--mf-red);
    --bs-btn-active-bg: var(--mf-red-dark); --bs-btn-active-border-color: var(--mf-red-dark);
    --bs-btn-focus-shadow-rgb: 171, 0, 0;
    background-color: #fff;
}
.theme-soft .btn-outline-secondary { background-color: #fff; }
.theme-soft .btn-link { --bs-btn-color: var(--mf-red); --bs-btn-hover-color: var(--mf-red-dark); }
.theme-soft .form-check-input:checked { background-color: var(--mf-red); border-color: var(--mf-red); }
.theme-soft .form-check-input:focus, .theme-soft .form-control:focus, .theme-soft .form-select:focus {
    border-color: #e09a9a; box-shadow: 0 0 0 0.2rem rgba(171, 0, 0, 0.15);
}
.theme-soft .form-range::-webkit-slider-thumb { background-color: var(--mf-red); }
.theme-soft .form-range::-moz-range-thumb { background-color: var(--mf-red); }
.theme-soft .form-control, .theme-soft .form-select { border-color: #e6d8d3; }
.theme-soft .nav-pills { --bs-nav-pills-link-active-bg: var(--mf-red); }
.theme-soft .page-link { color: var(--mf-red); }
.theme-soft .page-item.active .page-link { background-color: var(--mf-red); border-color: var(--mf-red); color: #fff; }

/* Rounder, softer cards */
.theme-soft .card, .theme-soft .list-group, .theme-soft .modal-content, .theme-soft .pizza-card {
    border-color: #f0e2dc;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(80, 30, 20, 0.05), 0 4px 14px rgba(80, 30, 20, 0.05);
}
.theme-soft .card { --bs-card-inner-border-radius: calc(1rem - 1px); }
.theme-soft .card-header { background-color: #fff6f2; border-color: #f0e2dc; }
.theme-soft .table { --bs-table-bg: transparent; }
.theme-soft .badge.text-bg-light { background-color: #fff !important; }
.theme-soft .alert-light { background-color: #fff; }

/* The menu bar: friendlier font, the current page as a white pill */
.theme-soft .site-nav { font-family: "Fredoka", "Nunito", system-ui, sans-serif; margin-bottom: 2.5rem !important; }
.theme-soft .site-nav .navbar-nav .nav-link { font-weight: 500; font-size: 1.05rem; }
@media (min-width: 992px) {
    .theme-soft .site-nav .navbar-nav .nav-link { border-radius: 2rem; margin: 0 0.1rem; }
    .theme-soft .site-nav .navbar-nav .nav-link.active { box-shadow: none; background-color: rgba(255, 255, 255, 0.18); }
}
.theme-soft .quick-link { border-radius: 0.8rem; }
.theme-soft footer { border-top-color: #f0e2dc !important; }

/* --- Ribbon: a gingham band under the menu bar and over the footer ---------------------------- */

/* Two gingham squares tall: one square on its own reads as battlements, not cloth */
.theme-ribbon .site-nav { position: relative; margin-bottom: 3.5rem !important; }
.theme-ribbon .site-nav::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -24px; height: 24px;
    background-color: #fff; background-image: var(--mf-gingham); background-size: 12px 12px;
    box-shadow: 0 3px 6px rgba(80, 30, 20, 0.12);
}
.theme-ribbon footer { border-top: 0 !important; position: relative; padding-top: 2.75rem !important; }
.theme-ribbon footer::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 20px; border-radius: 4px;
    background-color: #fff; background-image: var(--mf-gingham); background-size: 10px 10px; opacity: 0.6;
}

/* --- Touch-ups ---------------------------------------------------------------------------------- */

/* Count bubbles in a soft red */
.theme-soft .badge.bg-secondary, .theme-soft .badge.text-bg-secondary { background-color: var(--mf-red-soft) !important; color: var(--mf-red) !important; }
/* A few page styles pick Bootstrap's blue directly */
.theme-soft .mealplan-add summary, .theme-soft .link-primary { color: var(--mf-red) !important; }
.theme-soft .btn-more:hover, .theme-soft .btn-more:focus-visible, .theme-soft .btn-more[aria-expanded="true"] { color: var(--mf-red) !important; }
.theme-soft { --bs-primary-text-emphasis: var(--mf-red-dark); --bs-primary-bg-subtle: var(--mf-red-soft); --bs-primary-border-subtle: #eec3c3; }
