/* =======================================
   0) TOKENS / BASE
   ======================================= */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #667085;
  --panel-bg: #ffffff;
  --panel-border: #e6e6e6;
  --elev-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);

  --field-border: #d0d5dd;
  --field-focus: rgba(47, 116, 76, 0.25);

  --chip-bg: #fff;
  --chip-border: #e7e7e7;

  --soft-surface: #f7faf9;
  --brand: #2f744c;
  /* бренд вже є: --brand */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #fff;
}

/* =======================================
   1) OVERLAYS & LOADERS
   ======================================= */

/* Page loading overlay */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.4s ease;
}
#loading-overlay.hide-overlay {
  opacity: 0;
  pointer-events: none;
}

/* Route (page-to-page) loader */
.route-loader[hidden] {
  display: none !important;
}
.route-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.route-loader.fade-in {
  opacity: 1;
}
.route-loader.fade-out {
  opacity: 0;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #e6e6e6;
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Backdrop when popovers are open */
#ui-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: transparent;
  pointer-events: none;
}
#ui-backdrop.active {
  pointer-events: auto;
}

/* =======================================
   2) LAYOUT: HEADER / LOGO
   ======================================= */
header.updiv {
  position: sticky;
  top: 0;
  z-index: 1050;
  background: #fff;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 20px 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Logo */
.logo img {
  width: 100%;
  max-width: 317px;
  height: auto;
}
.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  z-index: 10;
}
.logo-image {
  width: 30px;
  height: auto;
}

/* Home / top buttons */
.home-icon-link {
  display: flex;
  align-items: center;
  margin-right: 10px;
}
.home-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.home-icon:hover {
  transform: scale(1.1);
}
.top-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =======================================
   3) MENUS (HEADER POPOVER / HAMBURGER)
   ======================================= */
#menu-root {
  position: relative;
}

.hamburger {
  background: #f5f5f5;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.filter-toggle {
  width: 40px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.filter-toggle .hamburger {
  width: 40px;
  height: 3px;
  background: #000;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
.filter-toggle .hamburger::before,
.filter-toggle .hamburger::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 3px;
  background: #000;
}
.filter-toggle .hamburger::before {
  top: -12px;
}
.filter-toggle .hamburger::after {
  top: 12px;
}
.hamburger-icon {
  width: 100%;
  height: auto;
  max-width: 40px;
  transition: transform 0.3s ease;
}

/* Floating menu popover (header grid of round buttons) */
#filter-container,
.filter-container {
  position: absolute;
  top: 97%;
  right: 12px;
  z-index: 1060;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  will-change: transform, opacity;
  max-width: 240px;
  width: max-content;
  overflow: hidden;
}
#filter-container.active,
.filter-container.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

#filter-container .menu-content,
.filter-container .menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  margin: 0 auto;
  text-align: center;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.menu-circle-btn {
  background: #f0f0f0;
  border: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s, background-color 0.25s;
  user-select: none;
}
.menu-circle-btn:hover {
  background: #28a745;
  transform: scale(1.07);
}
.menu-circle-btn:active {
  transform: scale(0.98);
}
.menu-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 6px;
}
.menu-button-caption {
  font: 600 13px/1.15 "Rubik", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: #222;
  pointer-events: none;
  user-select: none;
  text-align: center;
  white-space: nowrap;
  display: block;
  margin-top: 6px;
}

/* Round icon buttons inside popover */
.categories-button-flower,
.ingredients-button-flower,
.sorting-button-flower,
.settings-button-flower {
  background: #f0f0f0;
  border: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.categories-button-flower:hover,
.ingredients-button-flower:hover,
.sorting-button-flower:hover,
.settings-button-flower:hover {
  background: #28a745;
  transform: scale(1.07);
}
#misochka {
  transform: scale(1.2); /* 1.1 = +10%, 1.2 = +20% */
  transition: transform 0.2s ease;
}

/* =======================================
   4) SEARCH (INPUT + SUGGESTIONS)
   ======================================= */
.search-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 20px auto;
}

#search-input {
  width: 100%;
  padding: 12px 44px 12px 16px; /* room for icon */
  font-size: 16px;
  border: 2px solid #d0d5dd;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
#search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 116, 76, 0.25);
}

#search-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
}
#search-btn img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
#search-btn:hover img {
  opacity: 1;
}

/* Suggestions dropdown (unified) */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e9edf2;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.12);
  z-index: 9999;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}
.search-suggestions.active,
.search-suggestions.is-open {
  display: block;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: #1f2937;
  cursor: pointer;
  border-bottom: 1px solid #f2f4f7;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}
.suggestion-item:last-child {
  border-bottom: 0;
}
.suggestion-item:hover {
  background: #f7faf9;
  color: #87dbb0;
}
.suggestion-item.active {
  background: #bdf0b6;
  color: #fff;
}
.suggestion-item mark.hl {
  background: transparent;
  color: var(--brand);
  font-weight: 700;
}
.suggestion-item.active mark.hl {
  color: #fff;
}

.suggestions-empty {
  padding: 14px;
  font-size: 14px;
  color: #667085;
}

/* =======================================
   5) FILTERS (GENERIC LISTS + SELECT)
   ======================================= */
.filter-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.filter-list li {
  margin-bottom: 10px;
}
.filter-list label {
  font-size: 16px;
  color: #333;
  cursor: pointer;
}

.sort-select {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 20px;
  width: 100%;
  color: #333;
  background: #fff;
}

/* =======================================
   6) PANELS: INGREDIENTS / CATEGORIES / SORTING / SETTINGS (UNIFIED LOOK)
   ======================================= */

/* Shared floating containers */
.ingredients-container-flower,
.categories-container-flower,
.sorting-container-flower,
.settings-container-flower {
  position: fixed;
  top: 80px;
  right: 170px;
  width: 350px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  padding: 20px;
  display: none;
  z-index: 1100;
  transform: translateY(-6px);
  opacity: 0;
  transition: transform 0.16s ease, opacity 0.16s ease;
  max-height: calc(100vh - 140px);
  overflow: hidden;
}
.ingredients-container-flower.active,
.categories-container-flower.active,
.sorting-container-flower.active,
.settings-container-flower.active,
.ingredients-container-flower[style*="display: block"],
.categories-container-flower[style*="display: block"],
.sorting-container-flower[style*="display: block"],
.settings-container-flower[style*="display: block"] {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

/* Inner sections */
#ingredients-section,
#categories-section {
  padding: 16px 16px 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  max-height: calc(82vh - 40px);
  overflow: hidden;
}
#ingredients-section h3,
#categories-section h3 {
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 12px 0;
  color: #222;
}

/* Search inputs inside panels */
#ingredient-search,
#category-search {
  width: 100%;
  margin: 0 0 12px 0;
  padding: 12px 14px;
  border: 2px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}
#ingredient-search:focus,
#category-search:focus {
  border-color: #cfd3d6;
}

/* Sticky toolbar w/ pills */
#available-ingredients .ing-toolbar,
#available-categories .ing-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding: 8px 0 10px;
  margin: 0 0 8px;
  border-bottom: 1px solid #eee;
}
.ing-toolbar {
  display: grid;
  gap: 10px;
  margin: 6px 0 10px;
}
.ing-state-filter {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Pills */
.state-pill,
.vf-pill {
  appearance: none;
  border: 1.5px solid #e7e7e7;
  background: #fff;
  color: #222;
  padding: 8px 12px;
  border-radius: 999px;
  font: 500 14px/1 "Rubik", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease;
}
.state-pill:hover,
.vf-pill:hover {
  background: #fafafa;
}
.state-pill.active,
.vf-pill.active {
  background: #eaf6ef;
  border-color: var(--brand);
  color: #184a30;
}

/* Special “excluded” style toggle */
.state-pill[data-view="excluded"] {
  border-color: #f6c1bd;
  color: #9a352c;
  background: #fff;
}
.state-pill[data-view="excluded"].active {
  border-color: #f44336;
  background: #fdecea;
  color: #b71c1c;
}

/* Scroll areas */
#available-ingredients,
#available-categories {
  margin-top: 10px;
  max-height: calc(82vh - 220px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px; /* room for scrollbar */
}

/* Unified list rows (chips or full-width items) */
.ingredient-list,
.category-list {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.ingredient-item,
.category-item {
  display: block;
  user-select: none;
}
.ingredient-item .ingredient-text,
.category-item .category-text {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e7e7e7;
  border-radius: 14px;
  background: #fff;
  color: #222;
  transition: border-color 0.18s ease, background-color 0.18s ease,
    color 0.18s ease;
}
.ingredient-item:hover .ingredient-text,
.category-item:hover .category-text {
  background: #fafafa;
}

/* Selection / excluded states */
.ingredient-item.selected .ingredient-text,
.category-item.selected .category-text,
.ingredient-item input:checked + .ingredient-text,
.category-item input:checked + .category-text {
  border-color: var(--brand);
  background: #eaf6ef;
  color: #184a30;
}
.ingredient-item.excluded .ingredient-text,
.category-item.excluded .category-text {
  border-color: #f44336;
  background: #fdecea;
  color: #c62828;
  text-decoration: line-through;
}

/* Hide native checkboxes but keep a11y */
.ingredient-checkbox,
.category-checkbox {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

/* Sticky buttons (footer) */
#ingredients-section .buttons-group,
#categories-section .buttons-group {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0, #fff 18px);
  padding: 12px 0 4px;
  margin-top: 8px;
  border-top: 1px solid #eee;
  display: grid;
  gap: 10px;
}
.buttons-group {
  display: flex;
  background: #fff;
  flex-direction: column;
  gap: 10px;
}
.buttons-group button {
  flex: 1;
  padding: 12px 16px;
  border-radius: 24px;
  border: none;
  font: 500 16px/1 "Rubik", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  cursor: pointer;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  transition: filter 0.15s ease, transform 0.08s ease;
}
.apply-ingredients,
.apply-categories {
  background: var(--brand);
  color: #fff;
  border: none;
}
.apply-ingredients:hover,
.apply-categories:hover {
  filter: brightness(0.95);
}
.clear-ingredients,
.clear-categories {
  background: #f5f5f5;
}
.clear-ingredients:hover,
.clear-categories:hover {
  filter: brightness(0.97);
}

/* Helper text */
.ing-empty {
  color: #777;
  font-size: 14px;
  padding: 8px 4px;
}
/* 6b) SORTING (опції всередині панелі) */
.sorting-content-flower {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#sorting-section h3 {
  font-size: 18px;
  color: #222;
  margin: 2px 0 6px;
}

.sort-options {
  display: grid;
  gap: 10px;
}

/* Кнопка-опція сортування */
.sort-option {
  appearance: none;
  border: 2px solid #e7e7e7;
  background: #fff;
  color: #222;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font: 500 15px/1.2 "Rubik", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  transition: border-color 0.18s ease, background-color 0.18s ease,
    transform 0.08s ease;
  outline: none;
}

.sort-option:hover {
  border-color: #cfd3d6;
  background: #fafafa;
}

.sort-option:active {
  transform: translateY(1px);
}

.sort-option.active {
  border-color: var(--brand);
  background: #eaf6ef;
  color: #184a30;
}

.sort-option:focus-visible {
  box-shadow: 0 0 0 3px rgba(47, 116, 76, 0.25);
}

/* =======================================
   7) RECIPES GRID / CARDS
   ======================================= */
#recipes-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
}
#recipes-container.faded {
  opacity: 0.15;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

/* Card */
.recipe {
  text-align: center;
  padding: 10px;
  transition: transform 0.3s ease;
}
.recipe:hover {
  transform: scale(1.05);
}
.recipe-left {
  margin-right: 20px;
}
.recipe-right {
  flex: 1;
}

.recipe h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #333;
}
.recipe h3 {
  font-size: 20px;
  margin-bottom: 5px;
  color: #555;
}
.recipe p {
  font-size: 16px;
  line-height: 1.5;
  color: #666;
}

.recipe ul {
  list-style: disc;
  padding-left: 20px;
  margin: 10px 0;
}

.recipe-info {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.recipe-info span {
  font-size: 14px;
  color: #777;
}

/* Images */
.recipe-image-container {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
}
.recipe-image {
  width: 100%;
  height: 250px;
  object-fit: contain;
  border-radius: 8px;
  aspect-ratio: 4/3;
}
.recipe-details #recipe-image {
  height: 300px;
  width: auto;
}

/* =======================================
   8) RECIPE DETAILS LAYOUT
   ======================================= */
.recipe-details-layout {
  max-width: 1200px;
  margin: 60px auto 40px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.top-section {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 60px;
  align-items: flex-start;
  justify-content: center;
}
.left-column {
  flex: 1;
  min-width: 320px;
  text-align: center;
}
.left-column img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.left-column h1 {
  font-size: 26px;
  color: #222;
}
.right-column {
  flex: 1;
  min-width: 320px;
}

.details-section {
  padding: 20px 25px;
  background: transparent;
  border-radius: 10px;
  border: 3px solid var(--brand);
}
.details-section h2 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #222;
}
.details-section ul {
  list-style: none;
  padding-left: 0;
}
.details-section ul li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  font-size: 17px;
  line-height: 1.5;
}
.details-section ul li::before {
  content: "●";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-60%);
  color: var(--brand);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
#ingredients-withot {
  border: none !important;
  outline: none !important;
}

/* Додати відступ зверху 50px у блоку з додатковою інформацією */
#additional-info {
  margin-top: 50px;
}

/* =======================================
   9) BUTTONS / LINKS (GENERIC)
   ======================================= */
.upp,
.button-style,
.load-more-button,
.tutorial-popup .tp-ok,
.cookie-buttons button {
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.upp {
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #007bff;
  text-decoration: none;
  border-radius: 5px;
}
.upp:hover {
  background: #0056b3;
}

.button-style {
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 25px;
  cursor: pointer;
  background: #007bff;
  border: 0;
}
.button-style:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.load-more-button {
  padding: 12px 20px;
  font-size: 16px;
  color: #fff;
  background: #0dc374;
  border: 0;
  border-radius: 25px;
  cursor: pointer;
  display: block;
  margin: 20px auto;
  width: 200px;
  text-align: center;
}
.load-more-button:hover {
  background: #45a049;
  transform: translateY(-2px);
}
.load-more-button:active {
  transform: translateY(0);
}

.button-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* =======================================
   10) POPUPS / TUTORIAL / COOKIE CONSENT
   ======================================= */

/* Generic popup bits */
.popup-content p {
  margin-bottom: 20px;
}
.close-btn {
  font-size: 30px;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
}
.close-btn:hover {
  color: #f44336;
}
.panel-close {
  display: none;
}

/* Tutorial popup */
.tutorial-popup {
  position: fixed;
  top: 80px;
  right: 72px;
  left: auto;
  background: #fff;
  color: #000;
  padding: 18px 18px 58px;
  border-radius: 12px;
  width: min(420px, calc(100vw - 144px));
  max-height: calc(100vh - 140px);
  overflow: auto;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  z-index: 9999;
  display: none;
  opacity: 0;
  visibility: hidden;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.tutorial-popup.active {
  display: block;
  opacity: 1;
  visibility: visible;
}
.tutorial-popup .tp-title {
  font-weight: 700;
  font-size: 18px;
  margin: 2px 0 12px;
}
.tutorial-popup .tp-line {
  margin: 0;
  line-height: 1.5;
}
.tutorial-popup .tp-icon {
  height: 16px;
  vertical-align: middle;
  margin-left: 6px;
}
.tutorial-popup .tp-list {
  margin: 12px 0 0 18px;
  padding: 0;
  line-height: 1.5;
}
.tutorial-popup .tp-list li {
  margin-bottom: 6px;
  color: #222;
}
.tutorial-popup .tp-ok {
  display: block;
  margin: 20px auto 0;
  padding: 12px 20px;
  font-size: 15px;
  background: #f1d600;
  color: #000;
  border: 0;
  border-radius: 20px;
  cursor: pointer;
}
.tutorial-popup .tp-ok:hover {
  transform: translateY(-1px);
}
.tutorial-popup .tp-ok:active {
  transform: translateY(0);
}

/* Cookie consent (center modal) */
#cookie-consent-banner {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  max-width: 90%;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: center;
  z-index: 2000;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
#cookie-consent-banner p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}
#cookie-consent-banner a {
  color: #f1d600;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.cookie-buttons button {
  background: #f1d600;
  color: #000;
  border: 0;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 24px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  outline: 0;
  flex: 1;
  max-width: 150px;
}
.cookie-buttons button:hover {
  background: #ddb800;
  transform: translateY(-2px);
}
.cookie-buttons button:active {
  background: #c7a700;
  transform: translateY(0);
}

/* =======================================
   11) MISC / STATES
   ======================================= */
.selected-category,
.selected-ingredient {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  background: var(--brand);
  color: #fff;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 500;
  margin: 7px;
}
.selected-category:hover,
.selected-ingredient:hover {
  transform: scale(1.05);
}

body.menu-open {
  overflow: auto !important;
}

/* =======================================
   12) ACCESSIBILITY / REDUCED MOTION
   ======================================= */
@media (prefers-reduced-motion: reduce) {
  #filter-container,
  .filter-container,
  .categories-button-flower,
  .ingredients-button-flower,
  .sorting-button-flower,
  .settings-button-flower,
  .menu-btn {
    transition: none !important;
  }
}
/* ============================================================
   GRAY THEME (middle gray — комфортна, не надто темна, не світла)
   ============================================================ */
:root[data-theme="gray"] {
  /* Базові кольори */
  --bg: #e6e7ea; /* світло-сірий фон сторінки */
  --fg: #1e1f23; /* темний текст */
  --muted: #5d6068; /* приглушений текст */

  /* Панелі та картки */
  --panel-bg: #f5f6f8; /* панелі трохи світліші за фон */
  --panel-border: #cfd2d8;
  --elev-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

  /* Поля вводу */
  --field-border: #c2c6cc;
  --field-focus: rgba(0, 123, 255, 0.25);

  /* Чипи, кнопки, списки */
  --chip-bg: #f9f9fa;
  --chip-border: #d8dbe0;

  --soft-surface: #edeef1;
}

/* Загальний фон і текст */
:root[data-theme="gray"] html,
:root[data-theme="gray"] body {
  background: var(--bg);
  color: var(--fg);
}

/* Хедер */
:root[data-theme="gray"] header.updiv {
  background: #dcdfe4; /* середньо-сірий у тон до фото й логотипа */
  color: var(--fg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Панелі/модалки */
:root[data-theme="gray"] #filter-container,
:root[data-theme="gray"] .ingredients-container-flower,
:root[data-theme="gray"] .categories-container-flower,
:root[data-theme="gray"] .sorting-container-flower,
:root[data-theme="gray"] .settings-container-flower,
:root[data-theme="gray"] .tutorial-popup,
:root[data-theme="gray"] #cookie-consent-banner {
  background: var(--panel-bg);
  color: var(--fg);
  box-shadow: var(--elev-shadow);
}

/* Поля пошуку */
:root[data-theme="gray"] #search-input,
:root[data-theme="gray"] #ingredient-search,
:root[data-theme="gray"] #category-search {
  background: var(--panel-bg);
  color: var(--fg);
  border-color: var(--field-border);
}
:root[data-theme="gray"] #search-input:focus,
:root[data-theme="gray"] #ingredient-search:focus,
:root[data-theme="gray"] #category-search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--field-focus);
}

/* Кнопки (сортування / тема / state-pill) */
:root[data-theme="gray"] .sort-option,
:root[data-theme="gray"] .state-pill,
:root[data-theme="gray"] .vf-pill {
  border: 2px solid var(--panel-border);
  background: var(--chip-bg);
  color: var(--fg);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
:root[data-theme="gray"] .sort-option:hover,
:root[data-theme="gray"] .state-pill:hover,
:root[data-theme="gray"] .vf-pill:hover {
  background: var(--soft-surface);
  border-color: #b5b8bf;
}
:root[data-theme="gray"] .sort-option.active,
:root[data-theme="gray"] .state-pill.active,
:root[data-theme="gray"] .vf-pill.active {
  border-color: var(--brand);
  background: #eaf6ef;
  color: #184a30;
}

/* Списки інгредієнтів/категорій */
:root[data-theme="gray"] .ingredient-item .ingredient-text,
:root[data-theme="gray"] .category-item .category-text {
  background: var(--chip-bg);
  color: var(--fg);
  border-color: var(--chip-border);
}
:root[data-theme="gray"] .ingredient-item:hover .ingredient-text,
:root[data-theme="gray"] .category-item:hover .category-text {
  background: var(--soft-surface);
}

/* Списки підказок (autocomplete) */
:root[data-theme="gray"] .search-suggestions {
  background: var(--panel-bg);
  border-color: var(--panel-border);
}
:root[data-theme="gray"] .suggestion-item {
  color: var(--fg);
}
:root[data-theme="gray"] .suggestion-item:hover {
  background: var(--soft-surface);
}

/* Картки рецептів */
:root[data-theme="gray"] .recipe h2,
:root[data-theme="gray"] .recipe h3,
:root[data-theme="gray"] .recipe p,
:root[data-theme="gray"] .recipe-info span {
  color: var(--fg);
}

/* Зображення — легке затемнення */
:root[data-theme="gray"] img {
  filter: brightness(0.92);
}

/* Cookie банер */
:root[data-theme="gray"] #cookie-consent-banner {
  background: #dcdfe4;
  color: var(--fg);
}
