.recipe-container {
    max-width: 1440px;
    margin: 40px auto;
    padding: 0 16px 40px;
    font-family: var(--font-primary, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    line-height: 1.6;
}

.recipe-hero {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  margin-bottom: 20px;
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3d7d4;
    color: #7b1f1a;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}

.tag-chip:hover,
.tag-chip:focus-visible {
    text-decoration: none;
    color: #7b1f1a;
}

.tag-chip--soft {
    background: #e6f1ff;
    color: #1c3f6e;
}

.recipe-title {
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    margin: 6px 0 10px;
    font-weight: 900;
    line-height: 1.15;
}

.recipe-lead {
    margin: 0 auto 14px;
    max-width: 720px;
    color: #4b5563;
    font-size: 1.05rem;
}

.recipe-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
    color: #111827;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f5f5f5;
    font-weight: 700;
    font-size: 0.95rem;
}

.recipe-main-image {
    margin: 20px 0;
    text-align: center;
}

.recipe-main-image img {
    width: 100%;
    border-radius: 12px;
    display: inline-block;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
}

.recipe-description {
    max-width: 920px;
    margin: 6px auto 26px;
    color: #1f2937;
    font-size: 1.05rem;
}

.recipe-description p {
    margin: 0 0 12px;
}

.recipe-description p:last-child {
    margin-bottom: 0;
}

.recipe-description ul,
.recipe-description ol {
    margin: 10px 0 14px 20px;
}

.recipe-section {
    margin-top: 24px;
    padding: 20px 10px;
    border-radius: 14px;
}

.recipe-card-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.ingredients-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.servings-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.servings-inline .btn {
    min-width: 36px;
    padding: 0.35rem 0.65rem;
}

.servings-value {
    min-width: 20px;
    text-align: center;
    font-weight: 700;
}

.recipe-ingredients,
.recipe-tools {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recipe-steps {
    margin-left: 1.2rem;
}

.recipe-step {
    margin-bottom: 20px;
}

.recipe-lang-switch {
    margin-top: 24px;
    font-size: 0.9rem;
}
.recipe-lang-switch a {
    text-decoration: none;
    margin-right: 8px;
}
.recipe-lang-switch a.active {
    font-weight: 600;
}

.ingredients-actions {
    margin-top: 12px;
}

.send-list-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #0088FF;
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.send-list-btn:hover {
    background: #144f82;
        color: #fff;

}

.send-list-btn:active {
    transform: translateY(1px);
}

.send-list-btn-text {
    white-space: nowrap;
}

.send-list-btn-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.send-list-btn-icon svg {
    width: 100%;
    height: 100%;
    fill: #229ed9;
}

.ingredient-item {
    margin-bottom: 10px;
}

.ingredient-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ingredient-checkbox {
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    opacity: 0;
    cursor: pointer;
}

.checkbox-visual {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #c6c6c6;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.06);
    background: linear-gradient(180deg, #fafafa, #f1f1f1);
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.checkbox-visual::after {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 3px solid #000;
    border-bottom: 3px solid #000;
    transform: rotate(-45deg) scale(0.1);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.ingredient-checkbox:checked + .checkbox-visual {
    border-color: #000;
    background: #ececec;
}

.ingredient-checkbox:checked + .checkbox-visual::after {
    opacity: 1;
    transform: rotate(-45deg) scale(1);
}

.ingredient-text {
    display: block;
}

.ingredient-text.is-checked {
    text-decoration: line-through;
    opacity: 0.6;
}

.ingredient-allergen {
    display: inline-block;
    margin-left: 6px;
    color: #d63b3b;
    font-weight: 700;
    font-size: 0.95rem;
    vertical-align: middle;
    position: relative;
    cursor: help;
}

.ingredient-allergen-trigger {
    border: none;
    background: transparent;
    padding: 0 4px;
    margin-left: 6px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    vertical-align: middle;
}

.ingredient-allergen-tooltip {
    position: absolute;
    left: 50%;
    top: 130%;
    transform: translateX(-50%) translateY(6px);
    z-index: 15;
    background: #fff7f4;
    color: #2c2c2c;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #f2c9c2;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    font-size: 0.9rem;
    line-height: 1.3;
    min-width: 220px;
    max-width: 280px;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    text-align: left;
    white-space: normal;
}

.ingredient-allergen:hover .ingredient-allergen-tooltip,
.ingredient-allergen:focus .ingredient-allergen-tooltip,
.ingredient-allergen:focus-within .ingredient-allergen-tooltip {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.ingredients-note {
    margin: 20px 0 6px;
    font-size: 0.85rem;
    font-style: italic;
    color: #555;
    max-width: 360px;
}

.allergen-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(1px);
    z-index: 900;
    display: none;
}

.allergen-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    padding: 16px 18px;
    width: min(420px, 90vw);
    z-index: 901;
    display: none;
}

.allergen-modal.is-open,
.allergen-modal-overlay.is-open {
    display: block;
}

.allergen-modal.is-open {
    transform: translate(-50%, -50%) scale(1);
}

.allergen-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.allergen-modal-title {
    font-size: 1rem;
}

.allergen-modal-close {
    border: none;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}

.allergen-modal-body {
    font-size: 0.95rem;
    color: #2c2c2c;
}

.allergen-modal-substitute-label {
    font-weight: 600;
    margin-bottom: 4px;
}
