.tuduu-page-content {
  max-width: 1200px;
  padding: 16px;
  width: 100%;
}

.tuduu-recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 0 0 32px;
  margin-top: 36px;
}

.tuduu-hide {
  display: none !important;
}

h1, h2, h3 {
  font-weight: bold;
}

h1 {
  font-size: 40px;
  margin-bottom: 16px;
}

h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

h3 {
  margin-bottom: 16px;
}

h3.tuduu-recipe-detail-data-key {
  margin-top: 16px;
}

.tuduu-empty-recipes {
  display: flex;
  align-items: center;
  height: 170px;
  grid-column: 1 / -1;
  justify-self: center;
}

.tuduu-recipe-detail-container {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.tuduu-recipe-detail-container h1 {
  margin-top: 8px;
  margin-bottom: 16px;
}

.tuduu-recipe-detail-container li {
  margin: 16px 0;
}

.tuduu-recipe-detail-image {
  object-fit: cover;
  border-radius: 16px;
  max-height: 400px;
  position: sticky;
  top: 16px;
  margin-right: 16px;
  max-width: 100%;
  aspect-ratio: 1;
}

.tuduu-recipe-detail-data-grid {
  display: grid;
  grid-template-columns: min(50%, 1fr) auto;
  gap: 8px;
  padding: 0 16px 16px 0;
}

.tuduu-recipe-detail-data-grid-ingredients h3 {
  padding-left: 16px;
}

.tuduu-recipe-detail-data-grid h3 {
  padding-left: 0;
}

.tuduu-recipe-detail-data-grid-ingredients,
.tuduu-recipe-detail-data-grid-tools {
  background-color: rgb(249 249 249 / 80%);
  border-radius: 16px;
  padding: 0 16px 16px;
  margin-left: -16px;
  grid-template-columns: 1fr auto;
  margin-bottom: 16px;
}

.tuduu-recipe-detail-data-grid-tools {
  margin-top: 16px;
}

.tuduu-recipe-detail-divider,
.tuduu-recipe-filters-divider {
  display: block !important;
  height: 1px;
  background-color: #ededed;
  grid-column: 1 / 3;
  align-self: center;
}

.tuduu-recipe-filters-divider {
  margin: 8px 0;
  background-color: #dcdcdc;
}

.tuduu-recipe-detail-data-grid > *:last-child.tuduu-recipe-detail-divider {
  display: none !important;
}

.tuduu-recipe-detail-data-key {
  grid-column-start: 1;
  align-self: center;
}

.tuduu-recipe-detail-data-value {
  font-weight: bold;
  grid-column-start: 2;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tuduu-recipe-detail-data-key-not-ingredient {
  font-weight: bold;
  grid-column: 1 / 3;
  text-align: left;
}

.tuduu-sponsored-product-price-container {
  display: flex;
  flex-direction: revert;
  align-items: center;
  margin: 16px;
  gap: 8px;
}

.tuduu-sponsored-product-price-with-savings-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tuduu-sponsored-product-price {
  font-size: 24px;
  font-weight: bold;
}

.tuduu-sponsored-product-price-old-price {
  text-decoration: line-through;
  color: #666;
  font-size: 12px;
}

.tuduu-sponsored-product-price-savings {
  color: var(--tuduu-cta-foreground-color);
  background-color: var(--tuduu-cta-background-color);
  border-radius: 16px;
  padding: 0 8px;
  font-size: 12px;
}

.tuduu-sponsored-product-container {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.tuduu-sponsored-product-container img {
  background-color: white;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  margin-right: 16px;
}

.tuduu-sponsored-product-price-quantity {
  font-size: 14px;
  color: #666;
}

.tuduu-recipe-detail-data-grid a {
  text-decoration: none;
  color: black;
}

.tuduu-custom-checkbox {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  align-self: center;
}

.tuduu-custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0; /* Nasconde la checkbox nativa */
  width: 0;
  height: 0;
}

.tuduu-custom-checkbox label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tuduu-custom-checkbox input[type="checkbox"]:checked + label {
  background-color: var(--tuduu-cta-background-color);
  border-color: var(--tuduu-cta-background-color);
}

.tuduu-custom-checkbox input[type="checkbox"]:focus + label {
  outline: 2px solid var(--tuduu-cta-background-color);
  outline-offset: 2px; /* Distanza tra il bordo e l'etichetta */
}

.tuduu-custom-checkbox input[type="checkbox"]:checked:hover + label {
  background-color: var(--tuduu-cta-background-color-light);
}

.tuduu-custom-checkbox input[type="checkbox"]:checked + label::after {
  content: "✓";
  font-size: 16px;
  color: var(--tuduu-cta-foreground-color);
  position: absolute;
}

.tuduu-recipe-detail-buy-form {
  position: sticky;
  top: 2px;
  display: flex;
  justify-content: center;
  padding: 16px;
  z-index: 1;
}

.tuduu-recipe-detail-buy-form button {
  background-color: var(--tuduu-cta-background-color);
  color: var(--tuduu-cta-foreground-color);
  border: none;
  border-radius: 32px;
  padding: 16px 32px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  font-size: 16px;
}

.tuduu-recipes-filter-container svg {
  width: 20px;
  height: 20px;
}

.tuduu-recipes-toggle-extra-filters svg {
  width: 16px;
  height: 16px;
}

.tuduu-recipe-info-badge svg {
  margin-right: 4px;
  color: var(--tuduu-cta-foreground-color);
}

.tuduu-recipe-detail-buy-form button svg {
  margin-right: 8px;
  width: 20px;
  height: 20px;
}

.tuduu-recipe-detail-buy-form button:hover {
  background-color: var(--tuduu-cta-background-color-light);
}

.tuduu-recipe-detail-sponsored-product-row {
  display: block;
}

.tuduu-recipe-detail-people-buttons-container {
  display: flex;
  align-items: center;
}

#tuduu-decrease-people,
#tuduu-increase-people {
  border: none;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--tuduu-cta-background-color);
  margin: 0;
  display: flex;
  align-items: center;
  padding: 2px;
}

#tuduu-decrease-people:hover,
#tuduu-increase-people:hover {
  color: var(--tuduu-cta-background-color-light);
}

.tuduu-buy-button-disabled {
  background-color: #ccc !important;
}

.tuduu-recipe-detail-n-persone {
  width: 200px;
}

.tuduu-powered-by-tuduu-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 34px;
  border-top: 1px solid #e5e7eb;
}

.tuduu-powered-by-tuduu-section a {
  text-decoration: none;
}

.tuduu-powered-by-tuduu-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.tuduu-powered-by-tuduu-content p {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
}

.tuduu-recipe-container,
.tuduu-recipe-container a {
  text-decoration: none;
}

.tuduu-page-container section {
  overflow: visible;
}

.tuduu-recipe-card {
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  aspect-ratio: 6 / 7;
  display: flex;
}

/* L'ho chiamato così perché è un nome di classe molto comune e si rischiano collisioni */
.tuduu-gradient {
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgb(0 0 0 / 80%) 0%, transparent 35%);
}

.tuduu-recipe-card img {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tuduu-recipe-card:hover img {
  transform: scale(1.1);
}

.tuduu-recipe-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
}

.tuduu-recipe-card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 0 0 8px 8px;
  z-index: 1;
  flex: 1;
}

.tuduu-recipe-card-infos-container {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.tuduu-recipe-info-badge {
  display: flex;
  flex-grow: 1;
  align-items: center;
  justify-content: center;
  background-color: rgb(0 0 0 / 50%);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(12px);
}

.tuduu-recipe-info-badge span {
  color: #fff;
  font-size: 12px;
}

.tuduu-recipes-filters-grid,
.tuduu-recipes-extra-filters {
  display: flex;
  flex-flow: row wrap;
  gap: 8px;
}

.tuduu-recipes-filters-grid a,
.tuduu-recipes-extra-filters a {
  text-decoration: none;
  color: #1b1b1b;
  display: flex;
}

.tuduu-recipes-extra-filters {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  margin-bottom: 0;
}

.tuduu-recipes-extra-filters.open {
  max-height: 800px;
  margin-top: 8px;
}

.tuduu-recipes-toggle-extra-filters,
.tuduu-recipes-filter-container {
  height: 32px;
}

.tuduu-recipes-toggle-extra-filters {
  width: 32px;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid #dcdcdc;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  align-self: center;
  padding: 0;
  color: var(--tuduu-cta-background-color);
}

.tuduu-recipes-toggle-extra-filters:hover {
  background-color: #f5f5f5;
  transition: background-color 0.2s;
  color: var(--tuduu-cta-background-color);
  border: 1px solid #dcdcdc;
}

.tuduu-recipes-filter-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  background-color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid #dcdcdc;
}

.tuduu-recipes-filter-container:hover {
  background-color: #f5f5f5;
  transition: all 0.2s;
}

.tuduu-recipes-selected-filter {
  background-color: var(--tuduu-cta-background-color);
  border: 1px solid var(--tuduu-cta-background-color);
  color: var(--tuduu-cta-foreground-color);
}

.tuduu-recipes-selected-filter:hover {
  background-color: var(--tuduu-cta-background-color-light);
}

.tuduu-page-container {
  display: flex;
  justify-content: center;
}

.tuduu-sponsored-product-price-with-unit-quantity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tuduu-sponsored-product-savings-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tuduu-page-content p {
  margin-bottom: 8px;
}

.tuduu-instagram-container {
  display: none;
  justify-content: center;
}

.tuduu-spinner {
  width: 20px;
  height: 20px;
  border: 5px solid #e5e5e5;
  border-top-color: var(--tuduu-cta-background-color);
  border-radius: 50%;
  animation: tuduu-spin 1s linear infinite;
  margin: 10px auto;
}

@keyframes tuduu-spin {
  to {
    transform: rotate(360deg);
  }
}

.tuduu-watch-video-button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--tuduu-cta-background-color);
}

.tuduu-watch-video-button :first-child {
  margin-right: 4px;
}

.tuduu-watch-video-button:hover {
  cursor: pointer;
  color: var(--tuduu-cta-background-color-light);
}

@media (width <= 950px) {
  .tuduu-recipe-detail-container {
    flex-direction: column;
    padding: 0 16px;
  }

  .tuduu-recipe-detail-buy-form button {
    margin: 16px 0;
  }

  .tuduu-recipe-detail-image {
    max-width: 100%;
    margin-bottom: 16px;
    align-self: center;
    margin-left: 0;
    margin-right: 0;
    position: static;
    top: 0;
  }

  .tuduu-page-content {
    padding: 8px 16px;
  }

  .tuduu-page-container {
    display: block;
  }

  .tuduu-recipe-detail-data-value {
    display: block;
    text-align: right;
  }

  .tuduu-custom-checkbox {
    justify-self: flex-end;
  }

  .tuduu-recipe-detail-n-persone {
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 14px 0;
    justify-self: flex-end;
  }
}

@media (width <= 600px) {
  .instagram-container {
    justify-content: normal;
  }

  .tuduu-recipes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 0 8px;
  }

  .tuduu-recipe-filters-divider {
    margin: 4px 0;
  }

  .tuduu-recipes-extra-filters.open {
    margin-top: 4px;
  }

  .tuduu-recipes-filters-grid {
    gap: 4px;
  }

  .tuduu-recipes-extra-filters {
    gap: 4px;
  }

  .tuduu-recipe-info-badge {
    padding: 2px 4px;
  }

  .tuduu-powered-by-tuduu-section {
    padding: 16px;
  }

  .tuduu-recipe-detail-data-grid-ingredients,
  .tuduu-recipe-detail-data-grid-tools {
    margin-left: 0;
    padding: 0 10px 16px;
    grid-template-columns: none;
  }

  .tuduu-recipe-detail-divider {
    margin: 4px 0;
  }

  .tuduu-recipe-detail-data-grid {
    gap: 2px;
  }

  .tuduu-recipe-detail-container {
    padding: 0;
  }

  .tuduu-sponsored-product-price-container {
    margin: 4px 0;
  }

  .tuduu-recipe-detail-buy-form {
    padding: 0;
  }
}

@media (width <= 400px) {
  .tuduu-recipe-card {
    aspect-ratio: 6 / 8;
  }
}
