/**
 * Food Discovery Full Screen Override
 * 
 * This file ensures the food discovery interface takes full screen
 * regardless of theme or plugin styles
 */

/* Hide page header/title */
body.page .entry-header,
body.page .page-header,

body.single .entry-header {
    display: none !important;
}

/* Remove padding/margins from all parent containers */
body .entry-content,
body .site-content,
body .content-area,
body article,
body .post-content,
body #content,
body #main,
body .inside-article,
body .ast-container {
    position: relative;
    z-index: 50;
    /* ensure pill sits above the halo pseudo-element */
}

body .container,
body .site-main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* Ensure body has no overflow */
body {
    overflow-x: hidden !important;
}

/* Food discovery container - simple and clean */
.rwm-food-discovery-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;

    background: transparent !important;
    /* Reinforced override for transparency */
    /* Remove fixed height - make it dynamic based on content */
    min-height: auto !important;
    height: auto !important;
}

/* Additional override to prevent theme backgrounds from being blocked */
body:has(.rwm-food-discovery-container),
html:has(.rwm-food-discovery-container) {
    background-attachment: fixed !important;
    /* Helps if theme uses background images */
}

/* Make main grid and results container dynamic height */
.rwm-main-grid {
    flex: 0 1 auto !important;
    min-height: auto !important;
    height: auto !important;
}

.rwm-results-column {
    min-height: auto !important;
    height: auto !important;
}

.rwm-results-container {
    flex: 0 1 auto !important;
    min-height: auto !important;
    height: auto !important;
}

/* Prominent search pill styling (branded) */
.rwm-search-bar-wrapper {
    position: relative;
    z-index: 40;
    /* sit above subtle background overlay */
    display: flex;
    justify-content: center;
    padding: 24px 16px 12px;
}

/* Normal flow for the search area. Remove forced full-viewport centering so the
   hero aligns normally with the page flow and respects surrounding content.
   Keep a modest, branded spacing and center the search pill horizontally. */
.rwm-search-section {
    min-height: auto !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    /* stack hero and search pill vertically */
    align-items: center;
    /* center horizontally */
    justify-content: flex-start !important;
    /* flow from the top instead of centering */
    gap: 8px;
    /* smaller space between title and pill */
    padding: 20px 16px 12px;
    /* modest vertical padding rather than occupying whole viewport */
}

.rwm-search-section .rwm-search-bar-wrapper {
    padding: 0 16px 8px;
    /* reduced padding when centered */
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Tighten spacing around location controls and sliders (all viewports) */
.rwm-location-prompt {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    padding: 10px 14px !important;
    gap: 8px !important;
}

.rwm-location-status {
    margin-top: 6px !important;
    margin-bottom: 0 !important;
    padding: 8px 14px !important;
}

.rwm-featured-section {
    padding-top: 4px !important;
    padding-bottom: 6px !important;
}

/* Desktop: keep comfortable spacing but avoid forcing tall hero areas. */
@media (min-width: 769px) {
    .rwm-search-section {
        min-height: auto !important;
        /* don't force a tall hero on desktop */
        height: auto !important;
        padding: 32px 24px;
    }

    .rwm-hero-title,
    .rwm-hero-subtitle {
        text-align: center;
        margin-bottom: 14px;
        max-width: 1000px;
        width: 100%;
    }
}

/* When results are visible the JS adds .rwm-has-border to the search section.
   Collapse the hero area so results appear close below the search pill. */
.rwm-search-section.rwm-has-border {
    /* let content determine height instead of full-viewport */
    min-height: auto !important;
    height: auto !important;
    padding-top: 28px !important;
    padding-bottom: 18px !important;
    justify-content: flex-start !important;
    /* move items toward top */
    transition: height 220ms ease, padding 220ms ease, transform 220ms ease;
}

/* Slightly tighten spacing between the bar and results grid when results present */
.rwm-search-section.rwm-has-border+.rwm-results-container,
.rwm-results-container.rwm-after-search {
    margin-top: 12px !important;
    padding-top: 12px !important;
}

/* (loading-state positioning overrides removed — restored to original stylesheet behavior) */

/* Prevent the halo from being clipped by parents */
.rwm-search-bar-wrapper,
.rwm-search-bar {
    overflow: visible !important;
}

.rwm-search-bar {
    position: relative;
    z-index: 50;
    /* ensure pill sits above the halo pseudo-element */
}

/* Ensure container won't clip halo */
.rwm-food-discovery-container {
    overflow: visible !important;
}

.rwm-search-bar {
    width: clamp(420px, 60vw, 980px);
    /* responsive but keeps a wide pill */
    max-width: 980px;
    border-radius: 56px;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(10, 72, 52, 0.72) 0%, rgba(0, 0, 0, 0.18) 100%);
    box-shadow: 0 10px 40px rgba(56, 197, 114, 0.12), inset 0 2px 8px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    /* Force a solid branded border that overrides theme styles */
    border: 2px solid rgba(10, 72, 52, 0.6) !important;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
    /* ensure centered inside wrapper */
}

/* Site logo above hero/title */
.rwm-site-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px auto 6px;
    /* tighter so it's directly above the hero title */
    z-index: 70;
}

.rwm-site-logo img {
    max-height: 56px;
    width: auto;
    height: auto;
    display: block;
}

.rwm-site-title {
    font-size: 20px;
    color: var(--rwm-text-primary, #0A4834);
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 768px) {
    .rwm-site-logo {
        margin-top: 6px;
        margin-bottom: 6px;
    }

    .rwm-site-logo img {
        max-height: 44px;
    }

    .rwm-site-title {
        font-size: 18px;
    }
}

/* Site icon (favicon) styling when used as fallback */
.rwm-site-icon {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .rwm-site-icon {
        width: 44px;
        height: 44px;
    }
}

/* Gradient halo: use pseudo-element on the wrapper so it doesn't clip the pill */
.rwm-search-bar-wrapper::before {
    /* Smaller, subtler halo so the page doesn't feel empty/overspaced */
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 140px);
    height: calc(100% + 68px);
    border-radius: 88px;
    background: radial-gradient(closest-side, rgba(56, 197, 114, 0.22) 0%, rgba(247, 148, 29, 0.16) 40%, rgba(56, 197, 114, 0.12) 70%, transparent 100%);
    filter: blur(28px) saturate(110%);
    opacity: 0.95;
    z-index: 8;
    /* behind the pill */
    pointer-events: none;
    mix-blend-mode: screen;
    transition: filter 260ms ease, opacity 260ms ease, transform 260ms ease;
}

/* Force results-grid to have no margin when empty */
.rwm-results-grid:empty {
    margin: 0 !important;
    padding: 0 !important;
    display: none !important;
}

/* PROFESSIONAL EMPTY/REFINEMENT STATE */
.rwm-empty-state {
    display: none;
    /* toggled by JS */
    width: 100%;
    padding: 0 20px !important;
    /* no top padding */
    margin-top: 0 !important;
    box-sizing: border-box;
}

.rwm-empty-card {
    width: 100%;
    max-width: 900px;
    /* center the card with max width */
    margin: 0 auto 20px;
    /* center horizontally */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(4, 10, 10, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    padding: 0 24px;
    /* no top/bottom padding for minimal spacing */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* center all content */
    gap: 0 !important;
    /* no gap between sections */
    box-sizing: border-box;
    text-align: center;
    /* center text */
}

/* Entrance animation */
.rwm-empty-card.rwm-empty-appear {
    animation: rwm-empty-appear 420ms cubic-bezier(.2, .9, .2, 1) both;
}

@keyframes rwm-empty-appear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.998);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Pill and button focus styles */
.rwm-alt-pill {
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 120ms ease;
}

.rwm-alt-pill:focus,
.rwm-alt-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10, 72, 52, 0.18);
    outline: none;
    border-color: rgba(255, 255, 255, 0.18);
}

.rwm-btn:focus,
.rwm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(10, 72, 52, 0.18);
    outline: none;
}

/* Reduced motion: disable animations */
@media (prefers-reduced-motion: reduce) {
    .rwm-empty-card.rwm-empty-appear {
        animation: none !important;
    }

    .rwm-alt-pill,
    .rwm-btn {
        transition: none !important;
    }
}

.rwm-empty-card-left {
    display: flex;
    flex-direction: column;
    gap: 4px !important;
    align-items: center;
    width: 100%;
}

.rwm-empty-visual {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 72, 52, 0.12);
    color: var(--rwm-text-primary, #ffffff);
    box-shadow: 0 8px 26px rgba(10, 72, 52, 0.08) inset;
}

.rwm-empty-visual .dashicons {
    font-size: 34px;
}

.rwm-empty-copy {
    max-width: 100%;
    text-align: center;
}

.rwm-empty-title {
    font-size: 24px;
    margin: 0 0 8px;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.rwm-empty-subtitle {
    margin: 0 !important;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
    font-size: 15px;
    text-align: center;
}

.rwm-ai-diagnostic {
    margin: 0 !important;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.95);
    background: transparent;
    border-radius: 10px;
    font-size: 15px;
    display: block;
    text-align: center;
}

.rwm-empty-suggestions-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
}

.rwm-suggestions-title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    font-size: 15px;
    text-align: center;
}

.rwm-empty-suggestions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.rwm-empty-suggestions .rwm-empty-suggestion-item {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    white-space: nowrap;
}

.rwm-empty-suggestion-item .dashicons {
    color: var(--rwm-accent-secondary, #F7941D);
    margin-top: 0;
    font-size: 16px;
}

.rwm-empty-card-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
    margin-top: 0;
}

.rwm-alternatives-title {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.98);
    font-weight: 800;
    font-size: 15px;
    text-align: center;
}

.rwm-alternative-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.rwm-alternative-links .rwm-alt-pill {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
}

.rwm-alternative-links .rwm-alt-pill:hover {
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.rwm-empty-actions {
    display: flex;
    flex-direction: row;
    gap: 14px;
    justify-content: center;
    align-items: center;
}

.rwm-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.rwm-btn-primary {
    background: linear-gradient(90deg, var(--rwm-accent-secondary, #F7941D), var(--rwm-accent-blue, #0A4834));
    color: #fff;
    box-shadow: 0 8px 26px rgba(10, 72, 52, 0.28);
}

.rwm-btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 900px) {
    .rwm-empty-card {
        padding: 24px;
        gap: 8px !important;
    }

    .rwm-empty-card-left {
        gap: 8px !important;
    }

    .rwm-empty-card-right {
        gap: 4px !important;
        margin-top: 8px !important;
    }

    .rwm-empty-visual {
        width: 72px;
        height: 72px;
    }

    /* Keep suggestions horizontal but allow wrapping */
    .rwm-empty-suggestions {
        gap: 8px;
    }

    .rwm-empty-suggestions .rwm-empty-suggestion-item {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Make alternative pills wrap nicely */
    .rwm-alternative-links {
        gap: 10px;
    }

    .rwm-alternative-links .rwm-alt-pill {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {

    /* On very small screens, stack buttons vertically */
    .rwm-empty-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .rwm-btn {
        width: 100%;
    }
}

.rwm-search-bar-wrapper:hover::before,
.rwm-search-bar:focus-within::before {
    filter: blur(36px) saturate(130%);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02);
}

/* Inner thin gradient ring to enhance separation */
.rwm-search-bar::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 56px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    z-index: 60;
    /* above halo, below content */
}

.rwm-search-input {
    flex: 1 1 auto;
    padding: 18px 20px;
    font-size: 16px;
    /* Ensure high contrast on dark/gradient backgrounds: force text to white */
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
}

/* Placeholder color: slightly muted dark so it doesn't clash with background */
.rwm-search-input::placeholder {
    /* lighter white placeholder for legibility while indicating placeholder state */
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Ensure hero subtitle/description is white so it doesn't blend into dark background */
.rwm-hero-subtitle {
    color: #ffffff !important;
}

.rwm-search-button {
    flex: 0 0 auto;
    margin-left: 8px;
    padding: 14px 26px;
    border-radius: 40px;
    background: linear-gradient(135deg, #F7941D 0%, #0A4834 50%, rgba(10, 72, 52, 0.6) 100%) !important;
    color: white !important;
    font-weight: 700;
    border: none !important;
    box-shadow: 0 18px 48px rgba(56, 197, 114, 0.28), 0 6px 18px rgba(0, 0, 0, 0.36) !important;
    background-size: 200% 200% !important;
    transition: background-position 260ms ease, transform 160ms ease, box-shadow 220ms ease;
    position: relative !important;
    overflow: visible !important;
}

/* Loading state for the search button: shows a small spinner and dims the button */
.rwm-search-button.loading {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}

.rwm-search-button.loading::before {
    /* Use ::before for the spinner so it doesn't conflict with the glow ::after */
    content: '';
    position: absolute;
    inset: 0;
    /* top/right/bottom/left = 0 */
    width: 24px;
    /* larger spinner */
    height: 24px;
    margin: auto;
    /* center within the button */
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.28);
    border-top-color: rgba(255, 255, 255, 0.98);
    box-sizing: border-box;
    animation: rwm-button-spin 700ms linear infinite;
    z-index: 9999;
    /* ensure spinner sits above glow and content */
    pointer-events: none;
}

/* Hide the original magnifier icon while loading */
.rwm-search-button.loading .dashicons {
    opacity: 0 !important;
    transform: scale(0.9);
}

/* Hide the textual label during loading but keep button width stable */
.rwm-search-button.loading .rwm-search-button-text {
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease, visibility 120ms ease;
}

/* Slightly nudge content center when loading to compensate for internal padding */
.rwm-search-button.loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes rwm-button-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rwm-search-button .dashicons {
    /* Use dark icon color to match input text for better contrast */
    color: white !important;
}

/* Make the pill glow subtly on hover/focus */
.rwm-search-bar:hover,
.rwm-search-input:focus~.rwm-search-button,
.rwm-search-bar:focus-within {
    box-shadow: 0 28px 96px rgba(56, 197, 114, 0.22), inset 0 2px 12px rgba(0, 0, 0, 0.44);
    transform: translateY(-1px) scale(1.01);
}

.rwm-search-button:hover {
    background-color: linear-gradient(135deg, #F7941D 50%, rgba(10, 72, 52, 0.6) 100%, ) !important;
    background-position: 100% 0 !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 30px 110px rgba(56, 197, 114, 0.30), 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

/* Per-button glow pseudo-element (enhances contrast and separation) */
.rwm-search-button::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 36px);
    height: calc(100% + 36px);
    border-radius: 44px;
    background: radial-gradient(circle at 30% 30%, rgba(247, 148, 29, 0.36) 0%, rgba(56, 197, 114, 0.18) 45%, transparent 70%);
    filter: blur(14px);
    opacity: 0.95;
    z-index: -1;
    pointer-events: none;
}

/* Ensure compact mobile layout remains usable */
@media (max-width: 768px) {
    .rwm-search-bar {
        width: calc(100% - 32px);
        padding: 10px 12px;
        border-radius: 40px;
    }

    .rwm-search-input {
        padding: 12px 12px;
        font-size: 15px;
    }

    .rwm-search-button {
        padding: 12px 18px;
        min-width: 86px;
    }
}

/* Restore product card arrow pseudo-element (was forced transparent by broad overrides).
   Use very specific selectors and !important where necessary so themes can't hide it.
*/
.rwm-results-container .rwm-product-card::before,
.rwm-food-discovery-container .rwm-results-container .rwm-product-card::before {
    content: '→' !important;
    position: absolute !important;
    right: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: block !important;
    pointer-events: none !important;
    /* re-apply the branded gradient text treatment */
    background: white !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    opacity: 0.75 !important;
    transition: all 0.25s ease !important;
    z-index: 62 !important;
    /* above most card content */
}

.rwm-results-container .rwm-product-card:hover::before,
.rwm-food-discovery-container .rwm-results-container .rwm-product-card:hover::before {
    opacity: 1 !important;
    right: 20px !important;
    transform: translateY(-50%) scale(1.08) !important;
}

@media (max-width: 768px) {

    .rwm-results-container .rwm-product-card::before,
    .rwm-food-discovery-container .rwm-results-container .rwm-product-card::before {
        font-size: 22px !important;
        right: 16px !important;
    }
}

/* Mobile fixes: tighten spacing, improve tap targets, ensure halo & pill remain visible
   These overrides are intentionally scoped to small screens only so desktop remains unchanged */
@media (max-width: 768px) {

    /* Reduce the oversized vertical centering so the hero and pill are visible above the fold */
    .rwm-search-section {
        min-height: auto !important;
        height: auto !important;
        padding: 16px 12px 10px !important;
        justify-content: flex-start !important;
        gap: 6px !important;
    }

    /* Keep the halo visible but smaller on mobile to avoid excessive bleed */
    .rwm-search-bar-wrapper::before {
        width: calc(100% + 120px) !important;
        height: calc(100% + 60px) !important;
        filter: blur(28px) !important;
        opacity: 0.95 !important;
    }

    /* Make the search pill more compact and fully tappable */
    .rwm-search-bar {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        border-radius: 40px !important;
        padding: 10px 12px !important;
        box-shadow: 0 18px 54px rgba(56, 197, 114, 0.12) !important;
    }

    /* Pull the location controls closer to the search pill */
    .rwm-search-bar-wrapper {
        margin-bottom: 4px !important;
    }

    .rwm-location-prompt {
        margin-top: 2px !important;
        margin-bottom: 2px !important;
        padding: 8px 12px !important;
        gap: 6px !important;
    }

    .rwm-location-status {
        margin-top: 2px !important;
        margin-bottom: 0 !important;
        padding: 6px 12px !important;
    }

    /* Tighten the space before featured sliders */
    .rwm-featured-section {
        padding-top: 2px !important;
        padding-bottom: 4px !important;
    }

    .rwm-search-input {
        padding: 12px 10px !important;
        font-size: 15px !important;
    }

    .rwm-search-button {
        padding: 12px 16px !important;
        min-width: 86px !important;
        margin-left: 8px !important;
        border-radius: 36px !important;
    }

    /* Ensure the results grid stacks into a single column on very small screens */
    .rwm-results-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 12px 16px !important;
    }

    /* Product cards should span full width and increase vertical spacing for tappability */
    .rwm-product-card {
        width: 100% !important;
        padding: 12px !important;
        border-radius: 12px !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) !important;
    }

    /* Reduce oversized hero text on mobile and allow wrapping */
    .rwm-hero-title {
        font-size: 28px !important;
        margin-bottom: 8px !important;
        line-height: 1.08 !important;
        text-align: center !important;
        padding: 0 12px !important;
    }

    .rwm-hero-subtitle {
        font-size: 14px !important;
        margin-bottom: 12px !important;
        padding: 0 18px !important;
    }

    /* Make sure the search history / results containers do not overlap the search pill */
    .rwm-search-section.rwm-has-border+.rwm-results-container,
    .rwm-results-container.rwm-after-search {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Remove any vertical centering on mobile */
    .rwm-results-container {
        justify-content: flex-start !important;
        padding: 0 16px !important;
    }

    /* Remove bottom margins from notification elements on mobile */
    .rwm-correction-notification,
    .rwm-context-indicator,
    .rwm-clarification-request {
        margin-bottom: 0 !important;
    }

    /* Tighten empty state spacing on mobile - use negative margin to pull up */
    .rwm-empty-state {
        padding: 0 16px !important;
        margin-top: -20px !important;
    }

    .rwm-empty-card {
        margin: 0 auto 0 !important;
        padding: 0 16px !important;
        gap: 0 !important;
    }

    .rwm-empty-card-right {
        margin-top: 0 !important;
        gap: 0 !important;
    }

    .rwm-alternative-searches {
        margin-top: 0 !important;
        margin-bottom: 12px !important;
    }

    .rwm-alternatives-title {
        margin: 0 0 8px !important;
    }

    /* Ensure floating elements (like a bottom action button) don't cover content */
    .rwm-food-discovery-container>.rwm-pagination {
        margin-bottom: 84px !important;
    }
    
    /* Context indicator should stay compact in empty state */
    .rwm-food-discovery-container .rwm-context-indicator {
        margin-bottom: 4px !important;
    }

    /* Accessibility: increase hit-area for interactive inline icons */
    .rwm-search-button .dashicons,
    .rwm-location-button .dashicons {
        width: 18px !important;
        height: 18px !important;
        font-size: 18px !important;
    }

    .rwm-voice-button .dashicons,
    #rwm-voice-button .dashicons {
        width: 18px !important;
        height: 18px !important;
        font-size: 18px !important;
        transform: scale(0.85) !important;
        transform-origin: center !important;
    }

    /* Prevent the halo pseudo-element from overlapping the browser safe area on iOS */
    @supports (padding: max(0px)) {
        .rwm-search-bar-wrapper::before {
            transform: translate(-50%, calc(-50% + env(safe-area-inset-top) * 0.25)) !important;
        }
    }
}

/* Fix full-bleed breakout on small screens: remove negative margin-left and use 100% width
   This prevents the page content from shifting left on mobile where 100vw and
   calc(-50vw + 50%) can misalign due to scrollbars / safe-area insets. */
@media (max-width: 768px) {

    .rwm-food-discovery-container,
    .ast-container .rwm-food-discovery-container,
    .ast-separate-container .rwm-food-discovery-container,
    .inside-article .rwm-food-discovery-container,
    .site-content .rwm-food-discovery-container,
    #content .rwm-food-discovery-container,
    #main .rwm-food-discovery-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
        left: 0 !important;
        transform: none !important;
    }

    /* Ensure inner result areas include comfortable gutters so content isn't flush to the edge */
    .rwm-results-container,
    .rwm-main-grid,
    .rwm-results-grid {
        padding-left: 2px !important;
        padding-right: 2px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Remove any accidental per-card horizontal offsets */
    .rwm-product-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Slightly reduce grid gap on very small screens */
    .rwm-results-grid {
        gap: 12px !important;
    }

    /* Block horizontal overflow from theme shells */
    html,
    body,
    .rwm-food-discovery-container {
        overflow-x: hidden !important;
    }

    /* Respect safe-area insets on iOS devices when present */
    .rwm-food-discovery-container {
        padding-left: calc(16px + env(safe-area-inset-left, 0px)) !important;
        padding-right: calc(16px + env(safe-area-inset-right, 0px)) !important;
    }

    /* Ensure results area stretches and doesn't center children awkwardly */
    .rwm-results-container {
        align-items: stretch !important;
    }

    /* Box-sizing on grid to prevent card overflow */
    .rwm-results-grid {
        box-sizing: border-box !important;
    }
}

/* Medium/small screens: ensure theme breakouts (100vw + negative margins) are neutralized
   and the plugin content is centered with comfortable gutters up to tablet widths. */
@media (max-width: 980px) {

    .ast-container .rwm-food-discovery-container,
    .ast-separate-container .rwm-food-discovery-container,
    .inside-article .rwm-food-discovery-container,
    .site-content .rwm-food-discovery-container,
    #content .rwm-food-discovery-container,
    #main .rwm-food-discovery-container,
    .rwm-food-discovery-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        left: 0 !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    .rwm-main-grid,
    .rwm-results-container,
    .rwm-results-grid {
        max-width: 980px !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
        box-sizing: border-box !important;
    }

    .rwm-product-card {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure no horizontal scroll is possible from theme wrappers */
    html,
    body {
        overflow-x: hidden !important;
    }
}

/* Empty state / no-results contrast fixes: force text/icon colors to white for visibility on dark backgrounds */
.rwm-empty-state {
    /* keep display control as is elsewhere; color rules only */
    color: #ffffff !important;
}

.rwm-empty-icon {
    display: block;
    width: 96px;
    height: 96px;
    margin: 18px auto 6px;
}

.rwm-empty-icon .dashicons {
    font-size: 56px;
    color: #ffffff !important;
    /* ensure the icon is visible */
}

.rwm-empty-state h3 {
    color: #ffffff !important;
    /* primary empty-state heading */
}

.rwm-empty-message {
    color: rgba(255, 255, 255, 0.85) !important;
    /* explanatory text */
}

/* Suggestions and alternative searches */
.rwm-suggestions-title,
.rwm-empty-suggestions .rwm-empty-suggestion-item,
.rwm-alternatives-title,
.rwm-alternative-links,
.rwm-alternative-search-link {
    color: #ffffff !important;
}

.rwm-empty-suggestion-item .dashicons,
.rwm-empty-suggestions .rwm-empty-suggestion-item .dashicons {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Make sure pagination/info in empty area is also visible */
.rwm-pagination-info,
.rwm-context-message {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Loading state contrast: spinner and text should be white on dark backgrounds */
.rwm-loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #ffffff !important;
}

.rwm-spinner {
    width: 40px !important;
    height: 40px !important;
    border: 3px solid rgba(255, 255, 255, 0.18) !important;
    /* subtle track */
    border-top: 3px solid #ffffff !important;
    /* visible white spinner */
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
    margin: 0 auto 16px !important;
}

.rwm-loading-state p {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 !important;
}

/* Voice button: small circular mic button that complements the search button */
.rwm-voice-button,
#rwm-voice-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    margin-left: 8px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 999px !important;
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.06) !important;
    color: var(--rwm-accent-secondary, #F7941D) !important;
    cursor: pointer !important;
    transition: transform 180ms ease, box-shadow 220ms ease, background-color 200ms ease, color 160ms ease !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.36) !important;
    position: relative !important;
    z-index: 70 !important;
}

.rwm-voice-button .dashicons,
#rwm-voice-button .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    color: var(--rwm-accent-secondary, #F7941D);
    transform: scale(0.85) !important;
    transform-origin: center !important;
}

.rwm-voice-button:hover,
#rwm-voice-button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 40px rgba(10, 72, 52, 0.18), 0 6px 18px rgba(0, 0, 0, 0.36);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Listening state: branded glow and stronger accent color */
.rwm-voice-button.listening,
#rwm-voice-button.listening {
    background: linear-gradient(135deg, var(--rwm-accent-secondary, #F7941D) 0%, #FF6B35 50%, var(--rwm-accent-blue, #0A4834) 100%) !important;
    color: #ffffff !important;
    border-color: var(--rwm-accent-secondary, #F7941D) !important;
    border-width: 3px !important;
    transform: translateY(-1px) scale(1.04) !important;
    box-shadow: 0 0 20px rgba(247, 148, 29, 0.6), 0 0 40px rgba(247, 148, 29, 0.3) !important;
    animation: pulse-listening 1.5s ease-in-out infinite !important;
}

.rwm-voice-button.listening .dashicons,
#rwm-voice-button.listening .dashicons {
    color: #ffffff !important;
    transform: scale(1) !important;
}

@keyframes pulse-listening {
    0%, 100% {
        box-shadow: 0 0 20px rgba(247, 148, 29, 0.6), 0 0 40px rgba(247, 148, 29, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(247, 148, 29, 0.8), 0 0 60px rgba(247, 148, 29, 0.5);
    }
}

/* Pulse glow while listening */
.rwm-voice-button.listening::after,
#rwm-voice-button.listening::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 84px;
    height: 84px;
    border-radius: 999px;
    /* stronger, warmer glow that blends the accent yellow and brand green */
    background: radial-gradient(circle, rgba(247, 148, 29, 0.28) 0%, rgba(10, 72, 52, 0.18) 40%, transparent 70%);
    filter: blur(10px);
    opacity: 1;
    z-index: 60;
    pointer-events: none;
    /* faster, bouncier pulse */
    animation: rwm-voice-pulse 1000ms cubic-bezier(.2, .9, .3, 1) infinite;
    box-shadow: 0 18px 48px rgba(10, 72, 52, 0.12), 0 6px 20px rgba(247, 148, 29, 0.12);
}

@keyframes rwm-voice-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.95;
    }

    40% {
        transform: translate(-50%, -50%) scale(1.18);
        opacity: 0.7;
    }

    80% {
        transform: translate(-50%, -50%) scale(1.02);
        opacity: 0.35;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.0;
    }
}

/* Accessible focus ring */
.rwm-voice-button:focus,
#rwm-voice-button:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(10, 72, 52, 0.12), 0 10px 30px rgba(10, 72, 52, 0.12);
}

/* Shared compact icon button used by voice and search when space is constrained.
   Placed here to override earlier width/height defaults (defined above). */
.rwm-icon-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    border: 1.5px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28) !important;
    margin-left: 6px !important;
    color: var(--rwm-accent-secondary, #F7941D) !important;
    transition: transform 160ms ease, box-shadow 200ms ease, border-color 140ms ease !important;
    position: relative !important;
    z-index: 70 !important;
}

.rwm-icon-button .dashicons {
    font-size: 15px !important;
    line-height: 1 !important;
    color: var(--rwm-accent-secondary, #F7941D) !important;
}

.rwm-icon-button:hover {
    transform: translateY(-2px) scale(1.03) !important;
    box-shadow: 0 12px 34px rgba(10, 72, 52, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Mobile tweaks: make icon buttons even smaller on narrow screens */
@media (max-width: 768px) {
    .rwm-icon-button {
        width: 34px !important;
        height: 34px !important;
        margin-left: 6px !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22) !important;
    }

    .rwm-icon-button .dashicons {
        font-size: 14px !important;
    }
}

/* ============================================
   RESTAURANT CARD THEME OVERRIDES
   Nuclear-level specificity to override any theme
   ============================================ */

/* Force restaurant card base styles - PURE BLACK gradient, NO GREEN */
.rwm-food-discovery-container .rwm-restaurant-card,
.rwm-results-container .rwm-restaurant-card,
.rwm-results-grid .rwm-restaurant-card,
body .rwm-restaurant-card,
html .rwm-restaurant-card,
.rwm-food-discovery-container .rwm-product-card,
.rwm-results-container .rwm-product-card,
.rwm-results-grid .rwm-product-card,
body .rwm-product-card,
html .rwm-product-card {
    width: 100% !important;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(10, 10, 10, 0.92) 50%, 
        rgba(0, 0, 0, 0.88) 100%) !important;
    border: 2px solid rgba(56, 193, 114, 0.25) !important;
    padding: 24px !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 2px 8px rgba(56, 193, 114, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    margin-bottom: 20px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Remove ALL white/green backgrounds from content wrappers and headers */
.rwm-restaurant-card .rwm-product-content,
.rwm-restaurant-card .rwm-restaurant-content,
.rwm-restaurant-card .rwm-product-header,
.rwm-restaurant-card .rwm-restaurant-header,
.rwm-restaurant-card .rwm-restaurant-meta,
.rwm-product-card .rwm-product-content,
.rwm-product-card .rwm-product-header,
body .rwm-restaurant-card .rwm-product-content,
html .rwm-restaurant-card .rwm-restaurant-content,
body .rwm-restaurant-card .rwm-product-header,
html .rwm-restaurant-card .rwm-restaurant-header,
body .rwm-product-card .rwm-product-content,
html .rwm-product-card .rwm-product-header {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Force restaurant card hover state - PURE BLACK, NO GREEN */
.rwm-food-discovery-container .rwm-restaurant-card:hover,
.rwm-results-container .rwm-restaurant-card:hover,
.rwm-results-grid .rwm-restaurant-card:hover,
body .rwm-restaurant-card:hover,
html .rwm-restaurant-card:hover,
.rwm-food-discovery-container .rwm-product-card:hover,
.rwm-results-container .rwm-product-card:hover,
.rwm-results-grid .rwm-product-card:hover,
body .rwm-product-card:hover,
html .rwm-product-card:hover {
    transform: translateY(-6px) scale(1.01) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                0 8px 24px rgba(56, 193, 114, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(56, 193, 114, 0.45) !important;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.98) 0%, 
        rgba(15, 15, 15, 0.95) 50%, 
        rgba(0, 0, 0, 0.92) 100%) !important;
}

/* Force restaurant name to be white with maximum specificity */
.rwm-food-discovery-container .rwm-restaurant-name,
.rwm-results-container .rwm-restaurant-name,
.rwm-restaurant-card .rwm-restaurant-name,
.rwm-restaurant-card h3.rwm-restaurant-name,
.rwm-restaurant-card .rwm-product-name.rwm-restaurant-name,
.rwm-restaurant-card h3.rwm-product-name.rwm-restaurant-name,
body .rwm-restaurant-name,
html .rwm-restaurant-name,
body .rwm-restaurant-card .rwm-restaurant-name,
html .rwm-restaurant-card .rwm-restaurant-name {
    color: #ffffff !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Force restaurant name links to be white with nuclear specificity */
.rwm-food-discovery-container .rwm-restaurant-card .rwm-restaurant-name a,
.rwm-results-container .rwm-restaurant-card .rwm-restaurant-name a,
.rwm-restaurant-card .rwm-restaurant-name a,
.rwm-restaurant-card .rwm-product-name.rwm-restaurant-name a,
.rwm-restaurant-card h3.rwm-restaurant-name a,
.rwm-restaurant-card h3.rwm-product-name.rwm-restaurant-name a,
body .rwm-restaurant-card .rwm-restaurant-name a,
html .rwm-restaurant-card .rwm-restaurant-name a,
.rwm-food-discovery-container .rwm-results-container .rwm-results-grid .rwm-restaurant-card .rwm-restaurant-name a,
body .rwm-restaurant-card .rwm-product-name.rwm-restaurant-name a,
html .rwm-restaurant-card .rwm-product-name.rwm-restaurant-name a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
}

.rwm-restaurant-card .rwm-restaurant-name a:hover,
.rwm-restaurant-card .rwm-product-name.rwm-restaurant-name a:hover {
    color: #38C172 !important;
    -webkit-text-fill-color: #38C172 !important;
}

/* Force arrow visibility with gradient */
.rwm-food-discovery-container .rwm-restaurant-card::before,
.rwm-results-container .rwm-restaurant-card::before,
.rwm-results-grid .rwm-restaurant-card::before,
body .rwm-restaurant-card::before,
html .rwm-restaurant-card::before {
    content: '→' !important;
    display: block !important;
    position: absolute !important;
    right: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #38C172 0%, #F7941D 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    opacity: 0.7 !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

.rwm-food-discovery-container .rwm-restaurant-card:hover::before,
.rwm-results-container .rwm-restaurant-card:hover::before,
.rwm-results-grid .rwm-restaurant-card:hover::before,
body .rwm-restaurant-card:hover::before,
html .rwm-restaurant-card:hover::before {
    opacity: 1 !important;
    right: 24px !important;
    transform: translateY(-50%) scale(1.15) !important;
}

/* Force avatar styles */
.rwm-restaurant-card .rwm-restaurant-avatar,
.rwm-restaurant-card .rwm-product-image.rwm-restaurant-avatar,
body .rwm-restaurant-avatar,
html .rwm-restaurant-avatar {
    width: 96px !important;
    height: 96px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, 
        rgba(56, 193, 114, 0.2), 
        rgba(247, 148, 29, 0.15)) !important;
    border: 2px solid rgba(56, 193, 114, 0.3) !important;
    box-shadow: 0 8px 24px rgba(56, 193, 114, 0.2),
                inset 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Force button styles */
.rwm-restaurant-card .rwm-btn,
.rwm-restaurant-actions .rwm-btn,
body .rwm-restaurant-card .rwm-btn {
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.rwm-restaurant-card .rwm-view-menu,
.rwm-restaurant-actions .rwm-view-menu,
body .rwm-restaurant-card .rwm-view-menu {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.rwm-restaurant-card .rwm-view-menu:hover,
.rwm-restaurant-actions .rwm-view-menu:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
}

.rwm-restaurant-card .rwm-make-reservation,
.rwm-restaurant-actions .rwm-make-reservation,
body .rwm-restaurant-card .rwm-make-reservation {
    background: linear-gradient(135deg, #F7941D 0%, #E67E00 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(247, 148, 29, 0.35),
                0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.rwm-restaurant-card .rwm-make-reservation:hover,
.rwm-restaurant-actions .rwm-make-reservation:hover {
    background: linear-gradient(135deg, #FF9D2E 0%, #F7941D 100%) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 32px rgba(247, 148, 29, 0.45),
                0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Force meta text colors with maximum specificity */
.rwm-restaurant-card .rwm-restaurant-meta,
.rwm-restaurant-card .rwm-restaurant-location,
.rwm-restaurant-card .rwm-restaurant-hours,
.rwm-restaurant-card .rwm-restaurant-description,
.rwm-restaurant-card div.rwm-restaurant-meta,
.rwm-restaurant-card div.rwm-restaurant-location,
.rwm-restaurant-card p.rwm-restaurant-description,
body .rwm-restaurant-card .rwm-restaurant-meta,
html .rwm-restaurant-card .rwm-restaurant-meta,
body .rwm-restaurant-card .rwm-restaurant-location,
html .rwm-restaurant-card .rwm-restaurant-location {
    color: rgba(255, 255, 255, 0.85) !important;
    background: none !important;
}

.rwm-restaurant-card .rwm-restaurant-availability,
.rwm-restaurant-card span.rwm-restaurant-availability {
    color: #38C172 !important;
    font-weight: 600 !important;
}

.rwm-restaurant-card .rwm-restaurant-hours,
.rwm-restaurant-card span.rwm-restaurant-hours {
    color: rgba(255, 255, 255, 0.7) !important;
}

.rwm-restaurant-card .rwm-restaurant-product-count,
.rwm-restaurant-card span.rwm-restaurant-product-count {
    color: #38C172 !important;
    background: rgba(56, 193, 114, 0.15) !important;
    border: 1px solid rgba(56, 193, 114, 0.25) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

/* Force location icon color */
.rwm-restaurant-card .rwm-restaurant-location .dashicons,
.rwm-restaurant-card .rwm-restaurant-location span.dashicons {
    color: #F7941D !important;
}

/* Force transparent backgrounds on ALL nested elements */
.rwm-restaurant-card *:not(.rwm-btn):not(.rwm-restaurant-product-count):not(.rwm-top-right-status):not(.rwm-category-tag):not(img),
.rwm-product-card *:not(.rwm-btn):not(.rwm-restaurant-product-count):not(.rwm-top-right-status):not(.rwm-category-tag):not(img):not(.rwm-add-to-cart-btn):not(.rwm-product-in-cart) {
    background: transparent !important;
    background-color: transparent !important;
}

/* Specifically target common wrapper elements */
.rwm-restaurant-card > div:not(.rwm-product-image):not(.rwm-restaurant-avatar),
.rwm-product-card > div:not(.rwm-product-image) {
    background: transparent !important;
    background-color: transparent !important;
}

/* Mobile overrides */
@media (max-width: 768px) {
    .rwm-restaurant-card,
    body .rwm-restaurant-card {
        padding: 20px !important;
    }
    
    .rwm-restaurant-card .rwm-restaurant-avatar,
    body .rwm-restaurant-avatar {
        width: 80px !important;
        height: 80px !important;
    }
    
    .rwm-restaurant-card .rwm-restaurant-name,
    body .rwm-restaurant-name {
        font-size: 20px !important;
    }
}

@media (max-width: 640px) {
    .rwm-restaurant-card,
    body .rwm-restaurant-card {
        padding: 16px !important;
    }
    
    .rwm-restaurant-card .rwm-restaurant-avatar,
    body .rwm-restaurant-avatar {
        width: 64px !important;
        height: 64px !important;
    }
    
    .rwm-restaurant-card .rwm-restaurant-name,
    body .rwm-restaurant-name {
        font-size: 18px !important;
    }
    
    .rwm-restaurant-card .rwm-btn,
    body .rwm-restaurant-card .rwm-btn {
        width: 100% !important;
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
}

/* Debug: ensure dynamically-generated product price ID elements are visible
   (helpful when investigating display issues) */
div[id^="rwm-product-price-"],
.rwm-product-card .rwm-product-price,
.rwm-results-grid .rwm-product-card .rwm-product-price {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
}

/* Ensure price text is visible with proper styling - CRITICAL FIX */
/* The base CSS uses -webkit-text-fill-color: transparent which hides the text */
/* This override uses a solid orange color for guaranteed visibility */
.rwm-price,
span.rwm-price,
.rwm-product-card .rwm-price,
.rwm-product-card .rwm-product-price .rwm-price,
.rwm-results-grid .rwm-product-card .rwm-price,
.rwm-food-discovery-container .rwm-price,
.rwm-food-discovery-container .rwm-product-card .rwm-price,
div[id^="rwm-product-price-"] .rwm-price {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    /* Use solid orange color for visibility */
    color: #F7941D !important;
    -webkit-text-fill-color: #F7941D !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-shadow: none !important;
    margin-right: 8px !important;
    white-space: nowrap !important;
}

/* Sale price styling */
.rwm-price-sale,
span.rwm-price-sale,
.rwm-product-card .rwm-price-sale,
.rwm-product-card .rwm-product-price .rwm-price-sale,
.rwm-results-grid .rwm-product-card .rwm-price-sale,
.rwm-food-discovery-container .rwm-price-sale,
div[id^="rwm-product-price-"] .rwm-price-sale {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #38C172 !important;
    -webkit-text-fill-color: #38C172 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-shadow: none !important;
}

/* Regular price (strikethrough for sale items) */
.rwm-product-card .rwm-price-regular,
.rwm-results-grid .rwm-product-card .rwm-price-regular {
    font-size: 14px !important;
    text-decoration: line-through !important;
    color: rgba(255, 255, 255, 0.5) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important;
    background-clip: unset !important;
}

/* ============================================
   FORCE REMOVE EMPTY STATE SPACING
   Nuclear-level specificity to eliminate all gaps
   ============================================ */
.rwm-food-discovery-container .rwm-empty-state .rwm-empty-card,
.rwm-empty-state .rwm-empty-card,
body .rwm-empty-card,
html .rwm-empty-card {
    gap: 0 !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

.rwm-food-discovery-container .rwm-empty-state .rwm-empty-card-left,
.rwm-empty-state .rwm-empty-card-left,
body .rwm-empty-card-left,
html .rwm-empty-card-left {
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rwm-food-discovery-container .rwm-empty-state .rwm-empty-subtitle,
.rwm-empty-state .rwm-empty-subtitle,
body .rwm-empty-subtitle,
html .rwm-empty-subtitle {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

.rwm-food-discovery-container .rwm-empty-state .rwm-ai-diagnostic,
.rwm-empty-state .rwm-ai-diagnostic,
body .rwm-ai-diagnostic,
html .rwm-ai-diagnostic {
    margin: 0 !important;
    padding: 0 !important;
    display: none !important;
}

.rwm-food-discovery-container .rwm-empty-state .rwm-empty-suggestions-container,
.rwm-empty-state .rwm-empty-suggestions-container,
body .rwm-empty-suggestions-container,
html .rwm-empty-suggestions-container {
    margin: 0 !important;
    padding: 0 !important;
}

.rwm-food-discovery-container .rwm-empty-state .rwm-suggestions-title,
.rwm-empty-state .rwm-suggestions-title,
body .rwm-suggestions-title,
html .rwm-suggestions-title {
    margin: 8px 0 10px 0 !important;
    padding: 0 !important;
}

.rwm-food-discovery-container .rwm-empty-state .rwm-empty-copy,
.rwm-empty-state .rwm-empty-copy,
body .rwm-empty-copy,
html .rwm-empty-copy {
    margin: 0 !important;
    padding: 0 !important;
}

.rwm-food-discovery-container .rwm-empty-state .rwm-empty-title,
.rwm-empty-state .rwm-empty-title,
body .rwm-empty-title,
html .rwm-empty-title {
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
}

/* ============================================
   FORCE COMPACT CONTEXT INDICATOR
   Remove all excessive height and spacing
   ============================================ */
.rwm-context-indicator,
.rwm-food-discovery-container .rwm-context-indicator,
.rwm-empty-state .rwm-context-indicator,
body .rwm-context-indicator,
html .rwm-context-indicator {
    margin: 0 auto 4px !important;
    padding: 8px 12px !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
}

.rwm-context-content,
.rwm-food-discovery-container .rwm-context-content,
body .rwm-context-content,
html .rwm-context-content {
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 8px !important;
}

.rwm-context-message,
.rwm-food-discovery-container .rwm-context-message,
body .rwm-context-message,
html .rwm-context-message {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

/* Mobile: ensure context indicator stays compact */
@media (max-width: 768px) {
    .rwm-context-indicator,
    .rwm-food-discovery-container .rwm-context-indicator,
    body .rwm-context-indicator {
        margin: 0 16px 4px !important;
        margin-bottom: 4px !important;
        padding: 6px 10px !important;
    }
}