/*
 * BeepRank's look, on top of Bootstrap 5 (webjar, see templates/header.vm). Colours from the logo
 * (resources/gfx/brand/beeprank-mark.svg): deep teal, with the scan line's orange as accent.
 * Bootstrap is themed through its CSS variables; dld's own components follow below. The scan page has scan.css.
 */

:root,
[data-bs-theme=light] {
    --dld-primary: #0e7c74;
    --dld-primary-light: #0f8a7e;
    --dld-primary-dark: #0a5f59;
    --dld-primary-soft: #e3f3f1;
    --dld-gradient: linear-gradient(135deg, #0a5560 0%, #0e7c74 100%);
    --dld-accent: #ff6a3d;
    --dld-accent-dark: #c2410c;
    --dld-accent-soft: #fff0ea;
    --dld-ink: #0f1f24;
    --dld-star: #f5a524;
    --dld-surface: #ffffff;
    --dld-shadow-sm: 0 1px 2px rgba(15, 31, 36, 0.06), 0 1px 3px rgba(15, 31, 36, 0.08);
    --dld-shadow: 0 4px 16px rgba(15, 31, 36, 0.08);
    --dld-shadow-lg: 0 12px 32px rgba(10, 95, 89, 0.18);
    --dld-radius: 1rem;
    --dld-tabbar-height: 64px;

    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --bs-body-bg: #f3f6f6;
    --bs-body-color: #0f1f24;
    --bs-secondary-color: #5a6b70;
    --bs-tertiary-bg: #e9f0f0;
    --bs-border-color: #dbe5e5;
    --bs-primary: #0e7c74;
    --bs-primary-rgb: 14, 124, 116;
    --bs-primary-text-emphasis: #0a5f59;
    --bs-primary-bg-subtle: #e3f3f1;
    --bs-primary-border-subtle: #b9e0db;
    --bs-link-color: #0e7c74;
    --bs-link-color-rgb: 14, 124, 116;
    --bs-link-hover-color: #0a5f59;
    --bs-link-hover-color-rgb: 10, 95, 89;
    --bs-border-radius: 0.625rem;
    --bs-border-radius-lg: 0.875rem;
    --bs-focus-ring-color: rgba(14, 124, 116, 0.25);
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.page {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn:hover, .nav-link:hover, .navbar-brand:hover, .tabbar a:hover, .review-tile a:hover, .action-card:hover {
    text-decoration: none;
}

/* ---- Buttons and forms ---- */

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 1rem;
    --bs-btn-padding-y: 0.5rem;
    --bs-btn-border-radius: 0.625rem;
}

.btn-lg {
    --bs-btn-padding-y: 0.75rem;
    --bs-btn-border-radius: 0.75rem;
}

.btn-primary {
    --bs-btn-bg: #0e7c74;
    --bs-btn-border-color: #0e7c74;
    --bs-btn-hover-bg: #0b6d66;
    --bs-btn-hover-border-color: #0b6d66;
    --bs-btn-active-bg: #0a5f59;
    --bs-btn-active-border-color: #0a5f59;
    --bs-btn-disabled-bg: #0e7c74;
    --bs-btn-disabled-border-color: #0e7c74;
    --bs-btn-focus-shadow-rgb: 14, 124, 116;
}

.btn-gradient {
    color: #fff;
    background: var(--dld-gradient);
    border: 0;
    box-shadow: 0 6px 16px rgba(14, 124, 116, 0.3);
}

.btn-gradient:hover, .btn-gradient:focus-visible {
    color: #fff;
    filter: brightness(1.08);
}

.btn-outline-primary {
    --bs-btn-color: #0e7c74;
    --bs-btn-border-color: #a6d7d1;
    --bs-btn-hover-bg: #0e7c74;
    --bs-btn-hover-border-color: #0e7c74;
    --bs-btn-active-bg: #0a5f59;
    --bs-btn-active-border-color: #0a5f59;
    --bs-btn-focus-shadow-rgb: 14, 124, 116;
}

.btn-soft {
    color: var(--dld-primary);
    background: var(--dld-primary-soft);
    border: 0;
}

.btn-soft:hover {
    color: var(--dld-primary-dark);
    background: #d2ebe8;
}

.form-control, .form-select {
    border-radius: 0.625rem;
    padding: 0.625rem 0.875rem;
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: #6fc1b7;
    box-shadow: 0 0 0 0.25rem rgba(14, 124, 116, 0.15);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.form-check-input:checked {
    background-color: var(--dld-primary);
    border-color: var(--dld-primary);
}

.form-check-input:focus {
    border-color: #6fc1b7;
    box-shadow: 0 0 0 0.25rem rgba(14, 124, 116, 0.15);
}

.input-group-text {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
}

.required-icon {
    color: #c0392b;
    font-size: 0.55em;
    vertical-align: super;
}

/* ---- Header ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--bs-border-color);
    padding-top: env(safe-area-inset-top);
}

.site-header .navbar {
    min-height: 60px;
}

/* The logo: the mark (an image) and the name as text, "Beep" in ink and "Rank" in teal */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-mark {
    flex: 0 0 auto;
    border-radius: 22%;
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--dld-ink);
}

.brand-name span {
    color: var(--dld-primary);
}

.site-footer .brand-name {
    font-size: 1.05rem;
}

.site-header .nav-link {
    white-space: nowrap;
    font-weight: 600;
    color: #3b4e53;
    border-radius: 0.625rem;
    padding: 0.5rem 0.875rem;
}

.site-header .nav-link:hover {
    color: var(--dld-primary);
    background: var(--dld-primary-soft);
}

.site-header .nav-link.active {
    color: var(--dld-primary);
    background: var(--dld-primary-soft);
}

.header-search {
    position: relative;
    flex: 0 1 15rem;
    min-width: 7rem;
}

/* The header's buttons stay on one line; on a narrow desktop (992-1199 px) the menu drops its icons */
.site-header .btn {
    white-space: nowrap;
}

@media (max-width: 1199.98px) {
    .site-header .navbar-nav .nav-link {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .site-header .navbar-nav .nav-link i {
        display: none;
    }
}

.header-search .form-control {
    padding-left: 2.25rem;
    border-radius: 999px;
    background: var(--bs-tertiary-bg);
    border-color: transparent;
}

.header-search .form-control:focus {
    background: #fff;
}

.header-search .fa-magnifying-glass {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
    pointer-events: none;
}

/* ---- Tab bar (phones) ---- */

.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: calc(var(--dld-tabbar-height) + env(safe-area-inset-bottom));
    padding: 0 0.25rem env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--bs-border-color);
}

.tabbar a {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    height: var(--dld-tabbar-height);
    font-size: 0.6875rem;
    font-weight: 600;
    color: #768a8f;
}

.tabbar a i {
    font-size: 1.25rem;
}

.tabbar a.active {
    color: var(--dld-primary);
}

.tabbar a.tab-scan .tab-scan-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-top: -26px;
    border-radius: 50%;
    color: #fff;
    background: var(--dld-gradient);
    box-shadow: var(--dld-shadow-lg);
    border: 4px solid #fff;
}

.tabbar a.tab-scan i {
    font-size: 1.35rem;
}

@media (max-width: 991.98px) {
    body.has-tabbar {
        padding-bottom: calc(var(--dld-tabbar-height) + env(safe-area-inset-bottom));
    }
}

/* ---- Page structure ---- */

.page-head {
    padding: 1.75rem 0 1.25rem;
}

.page-head h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.25rem;
}

.page-head .lead {
    font-size: 1rem;
    color: var(--bs-secondary-color);
    margin-bottom: 0;
}

.surface {
    background: var(--dld-surface);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--dld-radius);
    box-shadow: var(--dld-shadow-sm);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--bs-secondary-color);
}

.empty-state .empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--dld-primary);
    background: var(--dld-primary-soft);
}

.empty-state h2 {
    font-size: 1.125rem;
    color: var(--bs-body-color);
}

/* ---- Home ---- */

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--dld-gradient);
    padding: 3rem 0 4.5rem;
}

.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero .lead {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.88);
    max-width: 34rem;
}

.hero .btn-light {
    color: var(--dld-primary);
}

.hero h1 .hero-accent {
    color: #ffc2ab;
}

/* The logo mark, large and tilted, with the scan line pulsing over it */
.hero-visual {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
    transform: rotate(-6deg);
}

.hero-visual img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 22%;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.14), 0 24px 48px rgba(6, 48, 54, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-visual img {
        animation: hero-float 6s ease-in-out infinite;
    }

    @keyframes hero-float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-8px); }
    }
}

.home-actions {
    margin-top: -2.75rem;
    position: relative;
    z-index: 2;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 1.125rem 1.25rem;
    color: var(--bs-body-color);
    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--dld-radius);
    box-shadow: var(--dld-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-align: left;
    width: 100%;
}

.action-card:hover {
    color: var(--bs-body-color);
    transform: translateY(-2px);
    box-shadow: var(--dld-shadow-lg);
}

.action-card .action-icon {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 0.875rem;
    font-size: 1.25rem;
    color: var(--dld-primary);
    background: var(--dld-primary-soft);
}

.action-card.action-primary .action-icon {
    color: #fff;
    background: var(--dld-gradient);
}

.action-card .action-title {
    display: block;
    font-weight: 700;
}

.action-card .action-text {
    display: block;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.steps .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    background: var(--dld-gradient);
}

/* ---- Reviews ---- */

.review-list {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .review-list.two-columns {
        grid-template-columns: 1fr 1fr;
    }
}

.review-tile {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--dld-radius);
    box-shadow: var(--dld-shadow-sm);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.review-tile:hover {
    border-color: #c3e4e0;
    box-shadow: var(--dld-shadow);
}

.review-tile .review-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.review-tile .review-title a {
    color: var(--bs-body-color);
}

.review-tile .review-title a::after {
    /* the whole tile is the link */
    content: "";
    position: absolute;
    inset: 0;
}

.review-tile {
    position: relative;
}

/* A review's photo (knowledge/features/review-photos.md): across the top of a tile or card */
.review-tile-photo {
    display: block;
    width: calc(100% + 2.5rem);
    max-width: none;
    margin: -1.25rem -1.25rem 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--dld-radius) var(--dld-radius) 0 0;
    background: var(--dld-primary-soft);
}

.review-tile .review-text {
    margin: 0;
    color: #2f4146;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-line;
}

.review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 1rem;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.review-meta i {
    margin-right: 0.3rem;
    opacity: 0.8;
}

.price-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1f6f43;
    background: #e5f5ec;
    white-space: nowrap;
}

.stars {
    display: inline-flex;
    gap: 0.125rem;
    color: var(--dld-star);
    white-space: nowrap;
}

.stars .fa-regular {
    color: #d1dcdc;
}

.stars-lg {
    font-size: 1.375rem;
    gap: 0.25rem;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--dld-primary);
    background: var(--dld-primary-soft);
}

.review-detail .review-detail-head {
    padding: 1.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

/* On the review's own page: the whole photo, between the title and the text */
.review-detail .review-photo {
    margin: 0;
    background: #f4f7f7;
    border-bottom: 1px solid var(--bs-border-color);
    text-align: center;
}

.review-detail .review-photo img {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

/* The review form's photo field */
.review-photo-field .review-photo-preview img {
    display: block;
    width: 100%;
    max-width: 16rem;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--bs-border-color);
    background: var(--dld-primary-soft);
}

.review-photo-field .review-photo-preview {
    margin-bottom: 0.75rem;
}

/* Two large buttons side by side: take a photo (camera) and choose one (gallery) */
.review-photo-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.75rem;
    max-width: 28rem;
    margin-bottom: 0.5rem;
}

.review-photo-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 5.5rem;
    padding: 0.875rem 0.75rem;
    border-radius: var(--dld-radius);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.review-photo-button i {
    font-size: 1.6rem;
}

.review-photo-button-camera {
    color: #fff;
    background: var(--dld-gradient);
    box-shadow: var(--dld-shadow);
}

.review-photo-button-camera:hover {
    box-shadow: var(--dld-shadow-lg);
}

.review-photo-button-gallery {
    color: var(--dld-primary-dark);
    background: var(--dld-primary-soft);
    border: 1.5px dashed rgba(14, 124, 116, 0.45);
}

.review-photo-button-gallery:hover {
    background: #d4ece9;
}

.review-photo-button:active {
    transform: scale(0.97);
}

/* A computer has no camera to open: only "Choose a photo" */
@media (hover: hover) and (pointer: fine) {
    .review-photo-button-camera {
        display: none;
    }
}

/* The file fields themselves are hidden; their labels are the buttons and show the keyboard focus */
.review-photo-field input[type="file"]:focus-visible + .review-photo-button {
    outline: 3px solid var(--dld-accent);
    outline-offset: 2px;
}

.review-detail .review-detail-body {
    padding: 1.5rem;
}

.review-detail .review-quote {
    font-size: 1.0625rem;
    line-height: 1.65;
    white-space: pre-line;
    margin: 0;
}

.fact-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.fact-list > div {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: var(--bs-tertiary-bg);
}

.fact-list dt {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color);
}

.fact-list dd {
    margin: 0.125rem 0 0;
    font-weight: 600;
}

.article-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.article-head .article-icon {
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border-radius: 1rem;
    font-size: 1.5rem;
    color: var(--dld-primary);
    background: var(--dld-primary-soft);
}

.barcode-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    color: #3b4e53;
    background: var(--bs-tertiary-bg);
}

/* ---- The review form ---- */

.form-section {
    padding: 1.25rem;
}

.form-section + .form-section {
    border-top: 1px solid var(--bs-border-color);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-input #ratingContainer i {
    cursor: pointer;
    transition: transform 0.1s ease;
    margin-right: 0.25rem;
}

.rating-input #ratingContainer i:hover {
    transform: scale(1.12);
}

.form-actions {
    position: sticky;
    bottom: 0;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--bs-border-color);
    border-radius: 0 0 var(--dld-radius) var(--dld-radius);
}

@media (max-width: 991.98px) {
    .form-actions {
        bottom: calc(var(--dld-tabbar-height) + env(safe-area-inset-bottom));
    }
}

/* jQuery UI autocomplete (places.js), in the same style */
.ui-autocomplete.ui-menu {
    max-height: 18rem;
    overflow-y: auto;
    padding: 0.375rem;
    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    box-shadow: var(--dld-shadow);
    font-family: var(--bs-body-font-family);
    font-size: 0.9375rem;
    z-index: 1060;
}

.ui-menu .ui-menu-item-wrapper {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 0;
}

.ui-menu .ui-menu-item-wrapper.ui-state-active {
    margin: 0;
    color: var(--dld-primary-dark);
    background: var(--dld-primary-soft);
    border: 0;
}

/* ---- Success ---- */

.success-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    font-size: 2rem;
    color: #fff;
    background: linear-gradient(135deg, #22a06b, #2bb57c);
    box-shadow: 0 10px 24px rgba(34, 160, 107, 0.3);
}

/* ---- Lists and sharing (reviewlist/*.vm, share-link.vm) ---- */

.eyebrow {
    color: var(--dld-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.list-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .list-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.list-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--bs-body-color);
    text-decoration: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.list-card:hover {
    color: var(--bs-body-color);
    box-shadow: var(--dld-shadow);
}

.list-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    background: var(--dld-primary-soft);
    color: var(--dld-primary);
    font-size: 1.125rem;
}

.list-card-name {
    display: block;
    font-weight: 700;
}

.list-card-meta {
    display: block;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

/* The review's own link covers the tile (.review-title a::after): the list's buttons stay above it */
.list-item-foot {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--bs-border-color);
}

.review-tile .review-text.review-text-full {
    -webkit-line-clamp: unset;
    display: block;
}

.review-actions {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .review-actions {
        grid-template-columns: 1fr 1fr;
    }
}

.share-panel,
.new-list-form {
    padding: 1.25rem;
}

.share-option + .share-option {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color);
}

.share-link {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* The link on a line of its own on a phone, the buttons below it side by side */
.share-link .form-control {
    min-width: 0;
    flex: 1 1 100%;
    background: var(--bs-tertiary-bg);
}

.share-link .btn {
    flex: 1 1 0;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .share-link .form-control {
        flex-basis: 0;
    }

    .share-link .btn {
        flex: 0 0 auto;
    }
}

.btn.copied {
    background: var(--dld-primary-soft);
    color: var(--dld-primary-dark);
}

.list-settings summary {
    cursor: pointer;
}

/* ---- Help center (help/*.vm) ---- */

.help-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    color: var(--bs-secondary-color);
}

.help-breadcrumb li + li::before {
    content: "/";
    margin-right: 0.25rem;
    color: var(--bs-border-color);
}

.help-hero {
    padding: 1.75rem 1.5rem;
    margin-bottom: 2rem;
    background: var(--dld-gradient);
    color: #fff;
    border: 0;
}

.help-hero h1 {
    color: #fff;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
}

.help-hero .lead {
    color: rgba(255, 255, 255, 0.85);
}

.help-filter {
    position: relative;
    max-width: 36rem;
}

.help-filter i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
}

.help-filter .form-control {
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 0;
    border-radius: 999px;
}

.help-category {
    margin-bottom: 2rem;
}

.help-category h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.help-category h2 i {
    color: var(--dld-primary);
}

.help-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .help-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .help-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.help-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    color: var(--bs-body-color);
    text-decoration: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.help-card:hover {
    color: var(--bs-body-color);
    border-color: #c3e4e0;
    box-shadow: var(--dld-shadow);
}

.help-card-title {
    font-weight: 700;
    color: var(--dld-primary-dark);
}

.help-card-text {
    font-size: 0.9375rem;
    color: var(--bs-secondary-color);
}

.help-layout {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .help-layout {
        grid-template-columns: minmax(0, 1fr) 18rem;
        align-items: start;
    }

    .help-aside {
        position: sticky;
        top: 1rem;
    }
}

.help-article {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .help-article {
        padding: 2.25rem 2.5rem;
    }
}

.help-article-head h1 {
    font-size: clamp(1.625rem, 4.5vw, 2.25rem);
    margin: 0.25rem 0 0.75rem;
}

.help-article-head {
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.help-toc {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bs-tertiary-bg);
    border-radius: 0.75rem;
}

.help-toc ul {
    margin: 0;
    padding-left: 1.125rem;
}

.help-body {
    font-size: 1.0625rem;
    line-height: 1.7;
}

.help-body h2 {
    font-size: 1.375rem;
    margin: 2rem 0 0.75rem;
    scroll-margin-top: 1rem;
}

.help-body h3 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.5rem;
    scroll-margin-top: 1rem;
}

.help-body > :first-child {
    margin-top: 0;
}

/* Numbered steps as circles */
.help-body ol {
    list-style: none;
    counter-reset: step;
    padding-left: 0;
}

.help-body ol li {
    counter-increment: step;
    position: relative;
    padding-left: 2.75rem;
    margin-bottom: 0.875rem;
}

.help-body ol li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.125rem;
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 50%;
    background: var(--dld-primary-soft);
    color: var(--dld-primary-dark);
    font-weight: 700;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-body ul li {
    margin-bottom: 0.375rem;
}

.help-body code {
    color: var(--dld-primary-dark);
    background: var(--bs-tertiary-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 0.375rem;
}

.help-tip {
    display: flex;
    gap: 0.75rem;
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: var(--dld-accent-soft);
    border-radius: 0.75rem;
}

.help-tip i {
    color: var(--dld-accent-dark);
    margin-top: 0.375rem;
}

.help-tip p {
    margin: 0;
}

.help-related {
    padding: 1.25rem;
}

.help-related ul {
    margin: 0;
    padding-left: 1.125rem;
}

.help-related li {
    margin-bottom: 0.5rem;
}

/* ---- Login ---- */

.auth-card {
    max-width: 26rem;
    margin: 3rem auto;
    padding: 2rem;
}

.auth-card .auth-logo {
    width: 64px;
    height: 64px;
    border-radius: 22%;
    box-shadow: var(--dld-shadow);
}

/* ---- Footer ---- */

.site-footer {
    margin-top: 3rem;
    padding: 2rem 0;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    border-top: 1px solid var(--bs-border-color);
    background: #fff;
}

.site-footer a {
    color: #3b4e53;
}

/* ---- Wait overlay (common.js) ---- */

.wait-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 31, 36, 0.45);
}

.wait-overlay .wait-box {
    padding: 1.5rem 2rem;
    text-align: center;
    background: #fff;
    border-radius: var(--dld-radius);
    box-shadow: var(--dld-shadow-lg);
}

/* ---- Core's inline editing of CMS blocks (superusers) ---- */

.toggle-inline-editor {
    min-width: 12px;
    min-height: 24px
}

.toggle-inline-editor .edit-button {
    opacity: 0.8;
    display: none;
}

.toggle-inline-editor:hover {
    background-color: #FFFFFF;
    cursor: pointer;
}

.toggle-inline-editor.editing .edit-button {
    display: block;
    visibility: visible;
    opacity: 1.0;
}

.toggleTr .toggle-inline-editor .edit-button {
    display: none
}

.toggleTr .toggle-inline-editor.editing .edit-button,
.toggleTr .toggle-inline-editor:hover .edit-button {
    display: inline-block
}

.toggle-inline-editor:hover * {
    cursor: pointer
}

.toggle-inline-editor.editing * {
    text-decoration: none;
}

.toggle-inline-editor.editing {
    z-index: 10000;
    position: absolute;
    border: 2px dashed black;
    padding: 2px;
    margin: 2px;
    min-width: 200px;
    background-color: white;
}

.toggle-inline-editor.editing form {
    padding: 2px;
}

.toggle-inline-editor.updating {
    opacity: 0.5;
}

.toggle-inline-editor .inlineform:after {
    clear: both;
}

.toggle-inline-editor:hover .object-container {
    border: 1px dashed black !important;
}

/* What is known about a barcode (lookup.js): the open database's photo with its credit, and the aco shops */
.barcode-lookup {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    margin-top: 0.75rem;
}
.barcode-lookup-photo {
    margin: 0;
}
.barcode-lookup-photo img {
    display: block;
    max-width: 9rem;
    max-height: 9rem;
    object-fit: contain;
    border-radius: 0.75rem;
    background: var(--dld-surface);
    box-shadow: var(--dld-shadow-sm);
    padding: 0.25rem;
}
.barcode-lookup-photo figcaption {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    margin-top: 0.25rem;
}
.barcode-lookup-shops {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.barcode-lookup-shops-title {
    font-weight: 600;
    font-size: 0.875rem;
    width: 100%;
}
.barcode-lookup.d-none {
    display: none !important;
}

/* Ratings in a list (templates/list-ratings.vm): everyone's stars, the favourite, and one-tap rating */
.list-ratings {
    position: relative;
    z-index: 1;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color);
}
.list-ratings-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.favourite-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--dld-accent-dark);
    background: var(--dld-accent-soft);
}
.review-tile.is-favourite {
    box-shadow: 0 0 0 2px var(--dld-accent), var(--dld-shadow);
}
.list-ratings-people {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}
.list-ratings-people li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
    padding: 0.125rem 0;
}
.list-ratings-name {
    font-weight: 600;
}
.list-ratings-text {
    flex-basis: 100%;
    color: var(--bs-secondary-color);
}
.list-rate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    margin-top: 0.75rem;
}
.list-rate-label {
    font-size: 0.875rem;
    font-weight: 600;
}
.list-rate-stars {
    display: inline-flex;
}
.list-rate-star {
    border: 0;
    background: none;
    padding: 0.25rem 0.3rem;
    font-size: 1.375rem;
    line-height: 1;
    color: var(--dld-star);
    min-width: 2.25rem;
    min-height: 2.25rem;
}
.list-rate-star .fa-regular {
    color: #b9c6c6;
}
.list-rate-star:hover .fa-regular,
.list-rate-star:focus-visible .fa-regular {
    color: var(--dld-star);
}
.list-rate-star:focus-visible {
    outline: 2px solid var(--dld-primary);
    border-radius: 0.5rem;
}
.list-rate-more {
    flex-basis: 100%;
    font-size: 0.875rem;
}
.list-rate-more summary {
    color: var(--dld-primary);
    cursor: pointer;
}
.list-sort {
    display: flex;
    gap: 0.5rem;
}

/* Logged in or not (knowledge/features/accounts-and-lists.md#logging-in): the visitor's initial in the header, a
   "Log in" button when nobody is logged in, and a note on the review form. */
.account-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--dld-gradient);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--dld-shadow-sm);
    flex-shrink: 0;
}

.account-chip:hover, .account-chip:focus {
    color: #fff;
}

.account-chip-sm {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.8rem;
    box-shadow: none;
}

.header-sign-in {
    white-space: nowrap;
}

.signed-out-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--dld-radius);
    background: var(--dld-accent-soft);
    color: var(--dld-ink);
}

.signed-out-note > i {
    color: var(--dld-accent-dark);
    font-size: 1.25rem;
}

.signed-out-note > span {
    flex: 1;
}

/* The review form without a barcode: a big tile that invites scanning first (knowledge/features/reviews.md#barcode-first) */
.scan-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem;
    border: 0;
    border-radius: var(--dld-radius);
    color: #fff;
    background: var(--dld-gradient);
    box-shadow: var(--dld-shadow);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.scan-tile:hover {
    box-shadow: var(--dld-shadow-lg);
}

.scan-tile:active {
    transform: scale(0.98);
}

.scan-tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.875rem;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.6rem;
    flex-shrink: 0;
}

.scan-tile-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    line-height: 1.3;
}

.scan-tile-text strong {
    font-size: 1.15rem;
}

.scan-tile-text span {
    opacity: 0.85;
    font-size: 0.925rem;
}
