/* ==========================================================================
   Restaurantji Design System (RJ DS) — v1.0
   --------------------------------------------------------------------------
   Reusable tokens + components for all Restaurantji pages.
   Source of truth for colors/typography: www/for-restaurants (the reference
   page). Full documentation: DESIGN_SYSTEM.md in the repo root.

   The brand layer that sits ON TOP of this file — logo, identity colors,
   awards, tone of voice — is BRANDBOOK.md (rendered live at /brandbook.html).
   Rule of thumb: this file styles the INTERFACE (green), the brandbook owns
   the IDENTITY (yellow + charcoal). They never swap roles.

   How to include on a PHP view (inline, generator-safe):
       <style><?php echo minifyCSS($_SERVER["DOCUMENT_ROOT"] . '/css/rj-design-system.css'); ?></style>
   Place it AFTER main-new-*.css so DS rules win the cascade.

   Sections:
     1. Tokens            (:root custom properties)
     2. Typography        (.rj-h1/.rj-h2/.rj-h3, .rj-eyebrow, .rj-small ...)
     3. Cards             (.rj-card)
     4. Buttons           (.rj-btn + variants)
     5. Chips             (.rj-chip)
     6. Forms             (.rj-field, .rj-label, .rj-input, .rj-select ...)
     7. Tables            (.rj-table)
     8. Modals            (.rj-modal — canonical modal window)
     9. Feedback bits     (.rj-skeleton, .rj-note, .rj-divider, .rj-banner)
    10. Legacy adapters   (restyle JS-generated modals: .commentPopup,
                           #set_report, #set_certificate, cookie banner, toasts)
   ========================================================================== */


/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root {
    /* --- Brand identity (the logo itself) — see BRANDBOOK.md ---
       Colors of the mark, award badges, merch and OG images. These are
       IDENTITY, not interface: never paint UI controls with them, and never
       use the yellow for text (it is 1.67:1 on white). */
    --rj-brand-yellow: #f6c114;
    /* burger in the mark, award ribbons — fills only */
    --rj-brand-charcoal: #232323;
    /* mark outlines + wordmark; the dark backdrop the logo may sit on */

    /* --- Brand palette --- */
    --rj-green: #82ca97;
    /* light brand green: icons, decorative */
    --rj-green-dark: #51ab6d;
    /* primary actions, solid buttons */
    --rj-green-deep: #2f8a52;
    /* hover/pressed state of primary */
    --rj-green-text: #27734a;
    /* AA-safe green for TEXT/links on white */
    --rj-green-tint: #edf7f0;
    /* soft green wash: chips, selected rows */
    --rj-yellow: #ffcc00;
    --rj-yellow-dark: #e6b800;
    --rj-yellow-deep: #e3bd00;
    --rj-yellow-text: #6d5900;
    --rj-yellow-tint: #fdf6c9;
    --rj-blue: #0054a6;
    /* rare secondary accent */
    --rj-star: #ff9800;
    /* ratings only (stars, progress fills) */
    --rj-star-empty: #e0d9cb;
    /* unfilled star outline (see images/stars/star-outline.svg) */
    --rj-danger: #c94f4f;
    --rj-danger-tint: #fdefef;

    /* --- Text --- */
    --rj-ink: #1b2a36;
    /* headings, strong text */
    --rj-text: #34434f;
    /* body copy */
    --rj-muted: #6b7a86;
    /* secondary text, labels, captions */

    /* --- Surfaces --- */
    --rj-surface: #ffffff;
    --rj-surface-soft: #f6faf7;
    /* page background, quiet blocks */
    --rj-border: #e7ecea;
    /* hairlines, dividers */
    --rj-border-strong: #d7dfda;
    /* form controls, outline buttons */

    /* --- Typography --- */
    --rj-font: "Poppins", Helvetica, Arial, sans-serif;
    --rj-fs-h1: clamp(23px, 2vw + 14px, 30px);
    --rj-fs-h2: 20px;
    --rj-fs-h3: 16px;
    --rj-fs-body: 14px;
    --rj-fs-small: 13px;
    --rj-fs-label: 12px;
    --rj-lh-tight: 1.25;
    --rj-lh-body: 1.65;

    /* --- Spacing scale (4px base) --- */
    --rj-sp-1: 4px;
    --rj-sp-2: 8px;
    --rj-sp-3: 12px;
    --rj-sp-4: 16px;
    --rj-sp-5: 20px;
    --rj-sp-6: 24px;
    --rj-sp-8: 32px;
    --rj-sp-10: 40px;
    --rj-sp-12: 48px;

    /* --- Radii --- */
    --rj-radius-sm: 10px;           /* inputs, slots, small controls */
    --rj-radius: 14px;              /* inner blocks, review cards */
    --rj-radius-lg: 18px;           /* cards, modals */
    --rj-radius-pill: 999px;        /* buttons, chips */

    /* --- Elevation --- */
    --rj-shadow: 0 10px 30px rgba(47, 138, 82, 0.08), 0 2px 6px rgba(27, 42, 54, 0.04);
    --rj-shadow-hover: 0 18px 40px rgba(47, 138, 82, 0.16), 0 4px 10px rgba(27, 42, 54, 0.06);
    --rj-shadow-modal: 0 24px 70px rgba(27, 42, 54, 0.30);

    /* --- Focus & motion --- */
    --rj-ring: 0 0 0 3px rgba(81, 171, 109, 0.28);
    --rj-fast: 0.15s ease;
    --rj-slow: 0.25s ease;

    /* --- Z-index scale --- */
    --rj-z-sticky: 100;
    --rj-z-overlay: 10000;          /* dimmed backdrops */
    --rj-z-modal: 10050;            /* dialogs */
    --rj-z-toast: 10100;            /* toasts / cookie banner */
}


/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */
.rj-h1 {
    font-family: var(--rj-font);
    font-size: var(--rj-fs-h1);
    font-weight: 700;
    line-height: var(--rj-lh-tight);
    letter-spacing: -0.02em;
    color: var(--rj-ink);
    margin: 0 0 var(--rj-sp-3);
}

.rj-h2 {
    font-family: var(--rj-font);
    font-size: var(--rj-fs-h2);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--rj-ink);
    margin: var(--rj-sp-8) 0 var(--rj-sp-3);
}

.rj-h3 {
    font-family: var(--rj-font);
    font-size: var(--rj-fs-h3);
    font-weight: 600;
    line-height: 1.35;
    color: var(--rj-ink);
    margin: var(--rj-sp-5) 0 var(--rj-sp-2);
}

/* Small uppercase section label. Deliberately NEUTRAL (never brand green). */
.rj-eyebrow {
    font-family: var(--rj-font);
    font-size: var(--rj-fs-label);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rj-muted);
    margin: 0 0 var(--rj-sp-3);
}

.rj-small {
    font-size: var(--rj-fs-small);
    color: var(--rj-muted);
}

.rj-link {
    color: var(--rj-green-text);
    text-decoration: none;
    transition: color var(--rj-fast);
}

.rj-link:hover,
.rj-link:focus {
    color: var(--rj-green-deep);
    text-decoration: underline;
}


/* ==========================================================================
   3. CARDS
   ========================================================================== */
.rj-card {
    background: var(--rj-surface);
    border: 1px solid var(--rj-border);
    border-radius: var(--rj-radius-lg);
    box-shadow: var(--rj-shadow);
    padding: var(--rj-sp-5);
}

.rj-card--soft {
    background: var(--rj-surface-soft);
    border-color: transparent;
    box-shadow: none;
}

.rj-card--flush {
    padding: 0;
    overflow: hidden;
}

.rj-card__title {
    font-family: var(--rj-font);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rj-ink);
    margin: 0 0 var(--rj-sp-4);
}


/* ==========================================================================
   4. BUTTONS
   ========================================================================== */
.rj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--rj-sp-2);
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--rj-radius-pill);
    font-family: var(--rj-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--rj-fast), color var(--rj-fast), border-color var(--rj-fast), box-shadow var(--rj-fast);
}

.rj-btn:focus-visible {
    outline: none;
    box-shadow: var(--rj-ring);
}

.rj-btn--primary {
    background: var(--rj-green-dark);
    color: #fff;
}

.rj-btn--primary:hover,
.rj-btn--primary:focus {
    background: var(--rj-green-deep);
    color: #fff;
    text-decoration: none;
}

.rj-btn--outline {
    background: var(--rj-surface);
    border-color: var(--rj-border-strong);
    color: var(--rj-ink);
}

.rj-btn--outline:hover,
.rj-btn--outline:focus {
    border-color: var(--rj-green-dark);
    color: var(--rj-green-deep);
    text-decoration: none;
}

.rj-btn--ghost {
    background: transparent;
    color: var(--rj-muted);
}

.rj-btn--ghost:hover,
.rj-btn--ghost:focus {
    background: var(--rj-surface-soft);
    color: var(--rj-ink);
    text-decoration: none;
}

.rj-btn--danger {
    background: var(--rj-danger-tint);
    color: var(--rj-danger);
}

.rj-btn--danger:hover,
.rj-btn--danger:focus {
    background: var(--rj-danger);
    color: #fff;
}

.rj-btn--sm {
    padding: 7px 14px;
    font-size: 13px;
}

.rj-btn--lg {
    padding: 13px 26px;
    font-size: 15px;
}

.rj-btn--block {
    display: flex;
    width: 100%;
}

.rj-btn[disabled],
.rj-btn.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}


/* ==========================================================================
   5. CHIPS  (tags, amenities, favorites)
   ========================================================================== */
.rj-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--rj-border);
    border-radius: var(--rj-radius-pill);
    background: var(--rj-surface-soft);
    font-family: var(--rj-font);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--rj-text);
}

.rj-chip--tint {
    background: var(--rj-green-tint);
    border-color: transparent;
    color: var(--rj-green-text);
}

.rj-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rj-sp-2);
}


/* ==========================================================================
   6. FORMS
   ========================================================================== */
.rj-field {
    margin-bottom: var(--rj-sp-4);
}

.rj-label {
    display: block;
    font-family: var(--rj-font);
    font-size: var(--rj-fs-label);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rj-muted);
    margin: 0 0 6px;
}

.rj-input,
.rj-select,
.rj-textarea {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--rj-border-strong);
    border-radius: var(--rj-radius-sm);
    background-color: var(--rj-surface);
    font-family: var(--rj-font);
    font-size: 14px;
    color: var(--rj-ink);
    transition: border-color var(--rj-fast), box-shadow var(--rj-fast);
}

.rj-input:focus,
.rj-select:focus,
.rj-textarea:focus {
    outline: none;
    border-color: var(--rj-green-dark);
    box-shadow: var(--rj-ring);
}

.rj-input::placeholder,
.rj-textarea::placeholder {
    color: var(--rj-muted);
    opacity: 0.8;
}

.rj-textarea {
    height: auto;
    min-height: 110px;
    padding: 12px 14px;
    resize: vertical;
}

/* Select and date inputs share one custom chevron so they look identical */
.rj-select,
.rj-input--picker {
    padding-right: 36px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%3E%3Cpath%20d='M2.5,4.5L6,8L9.5,4.5'%20fill='none'%20stroke='%236b7a86'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 12px;
}


/* ==========================================================================
   7. TABLES  (e.g. opening hours)
   ========================================================================== */
.rj-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--rj-font);
    font-size: var(--rj-fs-body);
}

.rj-table td,
.rj-table th {
    padding: 10px 4px;
    border-bottom: 1px solid var(--rj-border);
    text-align: left;
}

.rj-table tr:last-child td {
    border-bottom: 0;
}

.rj-table td:first-child {
    font-weight: 500;
    color: var(--rj-ink);
}

.rj-table td+td {
    color: var(--rj-muted);
}


/* ==========================================================================
   8. MODALS — canonical modal window
   --------------------------------------------------------------------------
   Markup:
   <div class="rj-modal" aria-hidden="true">
     <div class="rj-modal__backdrop" data-close></div>
     <div class="rj-modal__dialog" role="dialog" aria-modal="true" aria-label="...">
       <div class="rj-modal__header">
         <span class="rj-modal__title">Title</span>
         <button type="button" class="rj-modal__close" aria-label="Close">&times;</button>
       </div>
       <div class="rj-modal__body">…</div>
       <div class="rj-modal__footer">…buttons…</div>
     </div>
   </div>
   Open with .is-open on .rj-modal + .modal-open on <body>.
   Sizes: default 560px, --sm 420px, --lg 720px.
   --frame: fixed-height dialog for embedded iframes (goes fullscreen on phones).
   ========================================================================== */
.rj-modal {
    position: fixed;
    inset: 0;
    z-index: var(--rj-z-modal);
    display: none;
}

.rj-modal.is-open {
    display: block;
}

.rj-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 30, 25, 0.52);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.rj-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(560px, calc(100vw - 24px));
    max-height: min(92dvh, 860px);
    margin: max(4vh, 16px) auto;
    background: var(--rj-surface);
    border-radius: var(--rj-radius-lg);
    box-shadow: var(--rj-shadow-modal);
    overflow: hidden;
    animation: rjModalIn 0.22s ease;
}

.rj-modal--sm .rj-modal__dialog,
.rj-modal__dialog.rj-modal--sm {
    width: min(420px, calc(100vw - 24px));
}

.rj-modal--lg .rj-modal__dialog,
.rj-modal__dialog.rj-modal--lg {
    width: min(720px, calc(100vw - 24px));
}

/* Fixed-height dialog for iframe embeds (booking widget etc.) */
.rj-modal--frame .rj-modal__dialog,
.rj-modal__dialog.rj-modal--frame {
    width: min(440px, 94vw);
    height: min(88vh, 760px);
    max-height: none;
}

.rj-modal__header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rj-sp-3);
    padding: 14px 12px 14px var(--rj-sp-5);
    border-bottom: 1px solid var(--rj-border);
}

.rj-modal__title {
    font-family: var(--rj-font);
    font-size: 16px;
    font-weight: 600;
    color: var(--rj-ink);
    margin: 0;
}

.rj-modal__close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--rj-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--rj-fast), color var(--rj-fast);
}

.rj-modal__close:hover,
.rj-modal__close:focus {
    background: var(--rj-surface-soft);
    color: var(--rj-ink);
    outline: none;
}

.rj-modal__body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: var(--rj-sp-5);
    font-family: var(--rj-font);
    font-size: var(--rj-fs-body);
    color: var(--rj-text);
}

.rj-modal__body--flush {
    padding: 0;
    overflow: hidden;
}

.rj-modal__body--flush iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.rj-modal__footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: var(--rj-sp-3);
    padding: 14px var(--rj-sp-5);
    border-top: 1px solid var(--rj-border);
}

.rj-modal__loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rj-muted);
    font-family: var(--rj-font);
    font-size: 14px;
}

@keyframes rjModalIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 575.98px) {

    .rj-modal--frame .rj-modal__dialog,
    .rj-modal__dialog.rj-modal--frame {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        border-radius: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rj-modal__dialog {
        animation: none;
    }
}


/* ==========================================================================
   9. FEEDBACK BITS
   ========================================================================== */
.rj-skeleton {
    border-radius: var(--rj-radius-sm);
    background: #eef1ef;
    animation: rjPulse 1.2s ease-in-out infinite;
}

@keyframes rjPulse {

    0%,
    100% {
        opacity: 0.55;
    }

    50% {
        opacity: 1;
    }
}

.rj-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--rj-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--rj-green-text);
}

.rj-divider {
    border: 0;
    border-top: 1px solid var(--rj-border);
    margin: var(--rj-sp-5) 0;
}

/* Floating bottom banner (cookie consent etc.) */
.rj-banner {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: var(--rj-z-toast);
    width: min(720px, calc(100% - 24px));
    background: var(--rj-surface);
    border: 1px solid var(--rj-border);
    border-radius: var(--rj-radius-lg);
    box-shadow: var(--rj-shadow-hover);
    padding: 14px 18px;
    font-family: var(--rj-font);
    font-size: 14px;
    color: var(--rj-text);
}


/* ==========================================================================
   9.5 UPLOADER  (.rj-upload — modern image-upload dialog)
   --------------------------------------------------------------------------
   Used by the "Add a Photo" / "Add a Menu" modals (createAddphotoForm in
   js/brand_business_page_rest_new.js). Dialog shell reuses .rj-modal__header /
   __footer; the body hosts a drag&drop zone and a thumbnail grid.
   States: .is-has-files (hides the big dropzone), .is-drag (drop highlight).
   ========================================================================== */
.rj-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(560px, calc(100vw - 24px));
    max-height: min(92dvh, 760px);
    background: var(--rj-surface);
    border-radius: var(--rj-radius-lg);
    box-shadow: var(--rj-shadow-modal);
    font-family: var(--rj-font);
    overflow: hidden;
    animation: rjModalIn 0.22s ease;
}

.rj-upload.is-drag {
    box-shadow: var(--rj-shadow-modal), var(--rj-ring);
}

.rj-upload__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: var(--rj-sp-5);
}

.rj-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: var(--rj-sp-8) var(--rj-sp-5);
    border: 2px dashed var(--rj-border-strong);
    border-radius: var(--rj-radius);
    background: var(--rj-surface-soft);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--rj-fast), background var(--rj-fast);
}

.rj-dropzone:hover,
.rj-upload.is-drag .rj-dropzone {
    border-color: var(--rj-green-dark);
    background: var(--rj-green-tint);
}

.rj-dropzone__icon {
    width: 40px;
    height: 40px;
    fill: var(--rj-muted);
    margin-bottom: 4px;
}

.rj-dropzone__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--rj-ink);
}

.rj-dropzone__hint {
    font-size: 13px;
    color: var(--rj-muted);
}

.rj-dropzone__browse {
    color: var(--rj-green-text);
    font-weight: 600;
    text-decoration: underline;
}

.rj-upload__input {
    display: none;
}

.rj-upload.is-has-files .rj-dropzone {
    display: none;
}

.rj-upload__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: var(--rj-sp-2);
}

.rj-upload.is-has-files .rj-upload__grid {
    margin-top: 0;
}

.rj-upload__thumb {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--rj-border);
    border-radius: var(--rj-radius-sm);
    overflow: hidden;
    background: var(--rj-surface-soft);
}

.rj-upload__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rj-upload__remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(27, 42, 54, 0.72);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--rj-fast);
}

.rj-upload__remove:hover {
    background: var(--rj-danger);
}

/* "+" tile to add more images once the grid is visible */
.rj-upload__add {
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--rj-border-strong);
    border-radius: var(--rj-radius-sm);
    background: transparent;
    color: var(--rj-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: border-color var(--rj-fast), color var(--rj-fast), background var(--rj-fast);
}

.rj-upload__add:hover {
    border-color: var(--rj-green-dark);
    color: var(--rj-green-text);
    background: var(--rj-green-tint);
}

.rj-upload__error {
    display: none;
    margin-top: var(--rj-sp-3);
    padding: 10px 14px;
    border-radius: var(--rj-radius-sm);
    background: var(--rj-danger-tint);
    color: var(--rj-danger);
    font-size: 13px;
    line-height: 1.5;
}

.rj-upload__error.is-visible {
    display: block;
}

.rj-upload__note {
    margin-top: var(--rj-sp-3);
    padding: 10px 14px;
    border-radius: var(--rj-radius-sm);
    background: var(--rj-surface-soft);
    color: var(--rj-muted);
    font-size: 12px;
    line-height: 1.55;
}

.rj-upload__count {
    margin-right: auto;
    font-size: 13px;
    font-weight: 500;
    color: var(--rj-muted);
    align-self: center;
}


/* ==========================================================================
   10. LEGACY ADAPTERS
   --------------------------------------------------------------------------
   The site's existing modals are generated by shared JS (js/form.js and
   js/brand_business_page_rest_new.js) with fixed class names. These rules
   re-skin them to the DS look WITHOUT touching the JS. Any page that loads
   this file after main-new-*.css (and test.css) gets modernized modals.
   ========================================================================== */

/* ---- Shared dimmed backdrop (.modal = suggest-edit / certificate) ------- */
.modal {
    background: rgba(20, 30, 25, 0.52);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: var(--rj-z-overlay);
}

.commentPopup {
    background: rgba(20, 30, 25, 0.52);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: var(--rj-z-overlay);
    padding: 12px;
}

/* ---- Dialog shells ------------------------------------------------------ */
.modal .set_report,
.modal .set_report_badge {
    width: min(600px, calc(100vw - 24px));
    min-width: 0;
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border-radius: var(--rj-radius-lg);
    box-shadow: var(--rj-shadow-modal);
    font-family: var(--rj-font);
    animation: rjModalIn 0.22s ease;
}

.commentPopup .commentForm {
    width: min(560px, calc(100vw - 24px));
    max-height: min(92dvh, 845px);
    border-radius: var(--rj-radius-lg);
    box-shadow: var(--rj-shadow-modal);
    font-family: var(--rj-font);
    animation: rjModalIn 0.22s ease;
}

/* ---- Dialog header (.reviev_title) -------------------------------------- */
.modal .reviev_title,
.commentPopup .reviev_title {
    background: var(--rj-surface);
    color: var(--rj-ink);
    border-bottom: 1px solid var(--rj-border);
    border-radius: var(--rj-radius-lg) var(--rj-radius-lg) 0 0;
    padding: 16px 56px 14px 20px;
}

.modal .col-12.flex.reviev_title h3,
.commentPopup .col-12.flex.reviev_title h3 {
    font-family: var(--rj-font);
    font-size: 16px;
    font-weight: 600;
    color: var(--rj-ink);
    margin: 0;
}

.modal .reviev_title>p,
.commentPopup .reviev_title>p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--rj-muted);
}

/* ---- Close button (span-cross) ------------------------------------------ */
.modal .close-modal,
.commentPopup .close-modal {
    width: 32px;
    height: 32px;
    top: 12px;
    right: 12px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    transition: background var(--rj-fast);
}

.modal .close-modal:hover,
.commentPopup .close-modal:hover {
    transform: none;
    background: var(--rj-surface-soft);
}

.modal .close-modal .cris,
.modal .close-modal .cros,
.commentPopup .close-modal .cris,
.commentPopup .close-modal .cros {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--rj-muted);
    top: 15px;
    left: 8px;
}

/* ---- Dialog body & form rows -------------------------------------------- */
.report_body {
    padding: 16px 24px;
}

.revew_wrapp {
    padding: 12px 20px 4px;
}

.groupe-report_left {
    font-family: var(--rj-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--rj-muted);
}

.modal .set_report input:not([type=checkbox]):not([type=radio]),
.modal .set_report textarea,
.modal .set_report_badge input:not([type=checkbox]):not([type=radio]),
.commentPopup .commentForm .text-field__input {
    border: 1px solid var(--rj-border-strong);
    border-radius: var(--rj-radius-sm);
    padding: 10px 14px;
    font-family: var(--rj-font);
    font-size: 14px;
    color: var(--rj-ink);
    background: var(--rj-surface);
    transition: border-color var(--rj-fast), box-shadow var(--rj-fast);
}

.modal .set_report input:not([type=checkbox]):not([type=radio]):focus,
.modal .set_report textarea:focus,
.modal .set_report_badge input:not([type=checkbox]):not([type=radio]):focus,
.commentPopup .commentForm .text-field__input:focus {
    outline: none;
    border-color: var(--rj-green-dark);
    box-shadow: var(--rj-ring);
}

/* ---- Dialog footer (.send-wrap) ------------------------------------------ */
.send-wrap {
    border-top: 1px solid var(--rj-border);
    padding: 12px 20px 16px;
    align-items: center;
}

.send-wrap>.btn,
.btn.btn__primary {
    background: var(--rj-green-dark);
    color: #fff;
    border: 0;
    border-radius: var(--rj-radius-pill);
    padding: 10px 24px;
    font-family: var(--rj-font);
    font-size: 14px;
    font-weight: 600;
    transition: background var(--rj-fast);
}

.send-wrap>.btn:hover,
.btn.btn__primary:hover {
    transform: none;
    background: var(--rj-green-deep);
}

/* ---- Review stars in the comment form ------------------------------------ */
.star-cb-group .lablePlusSvg {
    fill: #d3dcd6;
}

.star-cb-group:hover>input+label {
    fill: #d3dcd6;
}

.star-cb-group>input:checked~label,
.star-cb-group>input+label:hover~label,
.star-cb-group>input+label:hover,
.star-cb-group:hover>input+label:hover~label,
.star-cb-group:hover>input+label:hover {
    fill: var(--rj-star);
    text-shadow: none;
}

.starRatingWrap {
    color: var(--rj-star);
}

.starError {
    border-radius: var(--rj-radius-sm);
    background: var(--rj-danger-tint);
    color: var(--rj-danger);
    border: 0;
    padding: 10px 14px;
    font-size: 13px;
    margin: 0 0 12px;
}

/* ---- Photo uploader in the comment form (compact dashed tiles) ----------
   The legacy markup is a stack of full-width solid-green "Upload image
   (optional)" buttons. Restyle .btn-2 (shared by createCommentForm, removePhoto
   and the addImg filled state) into small dashed add-tiles that flow in a row;
   font-size:0 hides the legacy text node, ::after supplies a short caption, and
   .is-filled turns a tile into a photo thumbnail. */
.comment_img_wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.commentForm .btn-2 {
    position: relative;
    width: 84px;
    height: 78px;
    min-height: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    background: var(--rj-surface-soft);
    border: 1.5px dashed var(--rj-border-strong);
    border-radius: var(--rj-radius-sm);
    color: var(--rj-muted);
    font-family: var(--rj-font);
    font-size: 0;
    cursor: pointer;
    overflow: hidden;
    transition: border-color var(--rj-fast), background var(--rj-fast), color var(--rj-fast);
}

.commentForm .btn-2::after {
    content: "Add photo";
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.commentForm .btn-2 svg {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    fill: var(--rj-green-dark) !important;
}

.commentForm .btn-2:hover {
    background: var(--rj-green-tint);
    border-color: var(--rj-green-dark);
    color: var(--rj-green-text);
}

.commentForm .btn-2:hover svg {
    fill: var(--rj-green-deep) !important;
}

/* filled state: the tile becomes a photo thumbnail with a delete control */
.commentForm .btn-2.is-filled {
    border-style: solid;
    border-color: var(--rj-border);
    background: transparent;
    cursor: default;
}

.commentForm .btn-2.is-filled::after {
    display: none;
}

.commentForm .btn-2.is-filled img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.commentForm .deletePhoto {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(20, 30, 25, .6);
    cursor: pointer;
}

.commentForm .deletePhoto svg {
    width: 11px !important;
    height: 11px !important;
    margin: 0 !important;
    fill: #fff !important;
}

/* review stars — smaller than the legacy 40px */
.star-cb-group .lablePlusSvg svg {
    width: 30px;
    height: 30px;
}

/* ---- "Thank you" toasts --------------------------------------------------- */
.thx,
.thxBadge,
.messageBox {
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rj-ink);
    border-radius: var(--rj-radius-pill);
    padding: 12px 24px;
    font-family: var(--rj-font);
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--rj-shadow-modal);
    z-index: var(--rj-z-toast);
}

.successModal .popup {
    box-shadow: var(--rj-shadow-modal);
    font-family: var(--rj-font);
}

/* ---- Cookie banner (#checkUPcookies) -------------------------------------- */
div#checkUPcookies {
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 24px));
}

div#checkUPcookies.active {
    bottom: 16px;
    width: min(720px, calc(100% - 24px));
    background: var(--rj-surface);
    border: 1px solid var(--rj-border);
    border-radius: var(--rj-radius-lg);
    box-shadow: var(--rj-shadow-hover);
    padding: 14px 18px;
    font-family: var(--rj-font);
    font-size: 14px;
    z-index: var(--rj-z-toast);
}

#checkUPcookies .banner_desc {
    color: var(--rj-text);
    font-size: 13px;
    line-height: 1.5;
}

#checkUPcookies .bunner_btn .menu-anchor_item {
    border: 1px solid transparent;
    border-radius: var(--rj-radius-pill);
    padding: 8px 18px;
    font-family: var(--rj-font);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    transition: background var(--rj-fast), color var(--rj-fast), border-color var(--rj-fast);
}

#checkUPcookies .bunner_btn .no {
    color: var(--rj-muted);
    border-color: transparent;
    background: transparent;
    margin-right: 8px;
}

#checkUPcookies .bunner_btn .no:hover {
    background: var(--rj-surface-soft);
    color: var(--rj-ink);
}

#checkUPcookies .bunner_btn .yes {
    color: #fff;
    background: var(--rj-green-dark);
    border-color: var(--rj-green-dark);
}

#checkUPcookies .bunner_btn .yes:hover {
    background: var(--rj-green-deep);
    border-color: var(--rj-green-deep);
    color: #fff;
}
