/* Shark recipe card. Tokens can be overridden per site, e.g. .sag-recipe{--sag-recipe-accent:#0b5cad}. */
/* Icons: Tabler Icons 3.19.0 (MIT), https://tabler.io/icons */
.sag-recipe {
    --sag-recipe-accent: #c2410c;
    --sag-recipe-accent-strong: #9a3412;
    --sag-recipe-accent-soft: #fff1e6;
    --sag-recipe-ink: #2a1f1a;
    --sag-recipe-text: #4a3d35;
    --sag-recipe-muted: #7a6a60;
    --sag-recipe-border: #efe4da;
    --sag-recipe-surface: #fbf6f0;
    --sag-recipe-tip: #fff7ed;
    --sag-recipe-tip-border: #fde3c8;
    --sag-recipe-heading-font: inherit;
    container-type: inline-size;
    position: relative;
    background: #fff;
    border: 1px solid var(--sag-recipe-border);
    border-radius: 22px;
    padding: clamp(18px, 3vw, 32px);
    margin: 36px 0;
    color: var(--sag-recipe-ink);
    font-family: inherit;
    line-height: 1.6;
    overflow-wrap: break-word;
    box-sizing: border-box;
}
.sag-recipe *, .sag-recipe *::before, .sag-recipe *::after { box-sizing: border-box; }
.sag-recipe figure { margin: 0; }
.sag-recipe img { display: block; width: 100%; max-width: 100%; height: auto; border: 0; border-radius: 14px; box-shadow: none; }

/* Neutralise theme decorations (side bars, underlines, pseudo icons) inside the card. */
.sag-recipe h2, .sag-recipe h3, .sag-recipe h4 {
    border: 0; padding: 0; background: none; box-shadow: none;
    text-transform: none; letter-spacing: normal; text-align: start;
    font-family: var(--sag-recipe-heading-font); color: var(--sag-recipe-ink);
}
.sag-recipe h2::before, .sag-recipe h2::after, .sag-recipe h3::before, .sag-recipe h3::after, .sag-recipe h4::before, .sag-recipe h4::after { content: none; display: none; }
.sag-recipe dl, .sag-recipe dd { margin: 0; padding: 0; }
.sag-recipe dt, .sag-recipe dd { text-decoration: none; border: 0; }
.sag-recipe ul, .sag-recipe ol { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.sag-recipe li { margin: 0; }
.sag-recipe li::marker { content: none; }
.sag-recipe h3 { font-size: 1.28em; line-height: 1.3; font-weight: 700; margin: 0 0 16px; }
.sag-recipe h4 { font-size: 1.06em; line-height: 1.4; font-weight: 700; margin: 0 0 6px; }

/* Header */
.sag-recipe .sag-recipe__eyebrow {
    display: inline-block; margin: 0 0 10px !important; padding: 5px 12px;
    border-radius: 999px; background: var(--sag-recipe-accent-soft); color: var(--sag-recipe-accent-strong);
    font-size: .74em; font-weight: 700; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase;
}
.sag-recipe .sag-recipe__title { font-size: 1.75em; font-size: clamp(1.45em, 4.2cqi, 2.1em); line-height: 1.18; font-weight: 700; margin: 0 0 18px; }
.sag-recipe__hero { margin: 0 0 20px !important; }
.sag-recipe__hero img { aspect-ratio: 16 / 9; max-height: 480px; object-fit: cover; border-radius: 18px; }
.sag-recipe__description { margin: 0 0 20px; font-size: 1.05em; line-height: 1.7; color: var(--sag-recipe-text); white-space: pre-line; }
.sag-recipe__meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 !important; }
.sag-recipe__meta > div { flex: 1 1 auto; min-width: 92px; background: var(--sag-recipe-surface); border: 1px solid var(--sag-recipe-border); border-radius: 14px; padding: 11px 14px; }
.sag-recipe__meta dt { overflow-wrap: normal; white-space: nowrap; font-size: .7em; font-weight: 600; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--sag-recipe-muted); }
.sag-recipe__meta dd { margin-top: 3px; font-size: 1.08em; font-weight: 700; line-height: 1.3; color: var(--sag-recipe-ink); }

/* Servings and print bar, added by recipe.js */
.sag-recipe__controls {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
    margin: 16px 0 0; padding: 10px 12px 10px 18px; border-radius: 16px; background: var(--sag-recipe-surface);
}
.sag-recipe__servings { display: flex; align-items: center; gap: 12px; }
.sag-recipe__servings label { font-size: .9em; font-weight: 600; color: var(--sag-recipe-muted); white-space: nowrap; margin: 0; }
.sag-recipe__stepper { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--sag-recipe-border); border-radius: 999px; padding: 2px; }
.sag-recipe .sag-recipe__step-button {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 0;
    margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none;
    color: var(--sag-recipe-accent); font: inherit; font-size: 1.25em; font-weight: 700; line-height: 1; cursor: pointer;
}
.sag-recipe .sag-recipe__step-button:hover { background: var(--sag-recipe-accent-soft); }
.sag-recipe .sag-recipe__stepper input {
    width: 3.2em; min-height: 36px; margin: 0; padding: 0 2px; border: 0; border-radius: 8px; background: transparent; box-shadow: none;
    color: var(--sag-recipe-ink); font: inherit; font-weight: 700; text-align: center;
}
.sag-recipe .sag-recipe__stepper input[aria-invalid=true] { color: #a92c2c; background: #fdecec; }
.sag-recipe .sag-recipe__print {
    display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 18px; min-height: 0;
    border: 1.5px solid var(--sag-recipe-accent); border-radius: 999px; background: #fff; box-shadow: none;
    color: var(--sag-recipe-accent); font: inherit; font-size: .92em; font-weight: 600; line-height: 1.3;
    text-transform: none; letter-spacing: normal; cursor: pointer; transition: background-color .15s, color .15s;
}
.sag-recipe .sag-recipe__print::before {
    content: ""; width: 17px; height: 17px; flex: none; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath d='M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2'/%3E%3Cpath d='M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4'/%3E%3Cpath d='M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath d='M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2'/%3E%3Cpath d='M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4'/%3E%3Cpath d='M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sag-recipe .sag-recipe__print:hover { background: var(--sag-recipe-accent); color: #fff; }
.sag-recipe__controls button:focus-visible, .sag-recipe__controls input:focus-visible, .sag-recipe__check:focus-visible { outline: 3px solid #f3b68f; outline-offset: 2px; }
.sag-recipe__print-frame { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }

/* Body: stacked by default, two columns when the card itself is wide enough. */
.sag-recipe__body { display: flex; flex-direction: column; gap: 28px; margin-top: 28px; }
.sag-recipe__body > * { min-width: 0; }

/* Ingredients */
.sag-recipe__ingredients { background: var(--sag-recipe-surface); border-radius: 18px; padding: 20px 20px 8px; }
.sag-recipe__ingredient { position: relative; padding: 11px 0; line-height: 1.5; border-bottom: 1px dashed #e6d6c7; break-inside: avoid; }
.sag-recipe[data-enhanced] .sag-recipe__ingredient { padding-inline-start: 36px; }
.sag-recipe__ingredient:last-child { border-bottom: 0; }
.sag-recipe__ingredient::before { content: none; }
.sag-recipe__amount, .sag-recipe__unit { font-weight: 700; color: var(--sag-recipe-ink); }
.sag-recipe__amount, .sag-recipe__unit, .sag-recipe__food { unicode-bidi: isolate; }
.sag-recipe__unit::before { content: "\00a0"; }
.sag-recipe__food::before { content: " "; }
.sag-recipe__food { color: var(--sag-recipe-text); }
.sag-recipe__notes { display: block; font-size: .86em; line-height: 1.45; color: var(--sag-recipe-muted); }
.sag-recipe .sag-recipe__check {
    -webkit-appearance: none; appearance: none; position: absolute; top: 12px; inset-inline-start: 0;
    width: 22px; height: 22px; margin: 0; padding: 0;
    border: 2px solid #d9c6b5; border-radius: 7px; background: #fff center / 14px no-repeat; cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.sag-recipe .sag-recipe__check:hover { border-color: var(--sag-recipe-accent); }
.sag-recipe .sag-recipe__check:checked {
    border-color: var(--sag-recipe-accent); background-color: var(--sag-recipe-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E");
}
.sag-recipe__ingredient.is-checked .sag-recipe__amount, .sag-recipe__ingredient.is-checked .sag-recipe__unit, .sag-recipe__ingredient.is-checked .sag-recipe__notes { color: var(--sag-recipe-muted); }
.sag-recipe__ingredient.is-checked .sag-recipe__food { text-decoration: line-through; color: var(--sag-recipe-muted); }

/* Steps */
.sag-recipe__step-list { counter-reset: sag-step; }
.sag-recipe .sag-recipe__step { position: relative; counter-increment: sag-step; padding-inline-start: 52px; padding-bottom: 26px; line-height: 1.7; }
.sag-recipe .sag-recipe__step::before {
    content: counter(sag-step); position: absolute; top: -2px; inset-inline-start: 0;
    display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--sag-recipe-accent); color: #fff; font-size: .9em; font-weight: 700; line-height: 1;
}
.sag-recipe .sag-recipe__step::after { content: ""; position: absolute; top: 40px; bottom: 6px; inset-inline-start: 16px; border-inline-start: 2px dotted #f0cdb5; }
.sag-recipe .sag-recipe__step:last-child { padding-bottom: 0; }
.sag-recipe .sag-recipe__step:last-child::after { content: none; }
.sag-recipe__step h4 { padding-top: 3px; }
.sag-recipe__step p, .sag-recipe__tip p { margin: 0 0 10px; color: var(--sag-recipe-text); white-space: pre-line; }
.sag-recipe__step p:last-child, .sag-recipe__tip p:last-child { margin-bottom: 0; }
.sag-recipe__step figure { margin-top: 14px; }
.sag-recipe__step img { aspect-ratio: 16 / 10; object-fit: cover; }

/* Nutrition */
.sag-recipe__nutrition { border: 1px solid var(--sag-recipe-border); border-radius: 18px; padding: 20px; }
.sag-recipe__nutrition h3 { margin-bottom: 4px; }
.sag-recipe__estimate { font-size: .82em; line-height: 1.4; color: var(--sag-recipe-muted); margin: 0 0 14px; }
.sag-recipe__nutrition dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sag-recipe__nutrition dl > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 0; padding: 12px 10px; border-radius: 14px; background: var(--sag-recipe-surface); text-align: center; }
.sag-recipe__nutrition dt { font-size: .74em; line-height: 1.3; color: var(--sag-recipe-muted); }
.sag-recipe__nutrition dd { font-size: 1.05em; font-weight: 700; line-height: 1.3; color: var(--sag-recipe-ink); }
.sag-recipe .sag-recipe__sources { margin: 14px 0 0 !important; font-size: .74em; line-height: 1.5; overflow-wrap: anywhere; }
.sag-recipe__sources li { margin-bottom: 6px; }
.sag-recipe__sources span { display: block; color: var(--sag-recipe-muted); }
.sag-recipe__sources a { color: var(--sag-recipe-accent-strong); }

/* Tip */
.sag-recipe__tip { position: relative; background: var(--sag-recipe-tip); border: 1px solid var(--sag-recipe-tip-border); border-radius: 18px; padding: 18px 20px; padding-inline-start: 62px; }
.sag-recipe__tip::before {
    content: ""; position: absolute; top: 18px; inset-inline-start: 20px; width: 26px; height: 26px; background: var(--sag-recipe-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath d='M3 12h1m8 -9v1m8 8h1m-15.4 -6.4l.7 .7m12.1 -.7l-.7 .7'/%3E%3Cpath d='M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0 -1 3a2 2 0 0 1 -4 0a3.5 3.5 0 0 0 -1 -3'/%3E%3Cpath d='M9.7 17l4.6 0'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath d='M3 12h1m8 -9v1m8 8h1m-15.4 -6.4l.7 .7m12.1 -.7l-.7 .7'/%3E%3Cpath d='M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0 -1 3a2 2 0 0 1 -4 0a3.5 3.5 0 0 0 -1 -3'/%3E%3Cpath d='M9.7 17l4.6 0'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sag-recipe__tip h3 { font-size: 1.1em; margin-bottom: 4px; }

@container (min-width: 500px) { .sag-recipe__nutrition dl { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* Stacked card with room to spare: ingredients flow in two columns. */
@container (min-width: 560px) and (max-width: 719.98px) {
    .sag-recipe__ingredient-list { columns: 2; column-gap: 28px; }
    .sag-recipe__ingredient:last-child { border-bottom: 1px dashed #e6d6c7; }
}
/* Wide card: ingredients beside the preparation; nutrition and tip below both. */
@container (min-width: 720px) {
    .sag-recipe__body { display: grid; grid-template-columns: minmax(240px, .85fr) minmax(0, 1.4fr); gap: 28px 36px; align-items: start; }
    .sag-recipe__ingredients { grid-column: 1; grid-row: 1; }
    .sag-recipe__steps { grid-column: 2; grid-row: 1; }
    .sag-recipe__nutrition, .sag-recipe__tip, .sag-recipe-editor__nutrition { grid-column: 1 / -1; }
    /* La lista fija se para al terminar los pasos: su límite es el envoltorio (que ocupa solo la fila de los pasos),
       no todo el cuerpo, que también tiene debajo la nutrición y el consejo */
    .sag-recipe__aside { grid-column: 1; grid-row: 1; align-self: stretch; }
    .sag-recipe:not(.sag-recipe-editor) .sag-recipe__aside > .sag-recipe__ingredients { position: sticky; top: 24px; }
}
@media (max-width: 480px) {
    .sag-recipe { padding: 18px 14px; border-radius: 18px; margin: 28px 0; }
    .sag-recipe__meta { gap: 8px; }
    .sag-recipe__controls { padding: 10px 12px; }
    .sag-recipe__ingredients { padding: 16px 14px 6px; }
    .sag-recipe .sag-recipe__step { padding-inline-start: 44px; }
    .sag-recipe .sag-recipe__step::before { width: 30px; height: 30px; }
    .sag-recipe .sag-recipe__step::after { top: 36px; inset-inline-start: 14px; }
    .sag-recipe__tip { padding: 16px; padding-inline-start: 54px; }
    .sag-recipe__tip::before { inset-inline-start: 16px; top: 16px; }
}

/* Block editor */
.sag-recipe-editor__row { border: 1px solid var(--sag-recipe-border); padding: 14px; border-radius: 8px; margin-bottom: 16px; background: #fff; }
.sag-recipe-editor__columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sag-recipe-editor__columns > * { min-width: 0; }
.sag-recipe-editor__row-actions, .sag-recipe-editor__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.sag-recipe-editor__actions { margin-top: 16px; }
.sag-recipe-editor__media img { max-width: 240px; margin-bottom: 10px; }
.sag-recipe-editor__media .components-button { margin: 0; margin-inline-end: 8px; margin-bottom: 10px; }
.sag-recipe-editor .block-editor-inner-blocks, .sag-recipe-editor .block-editor-block-list__layout { display: contents; }
.sag-recipe-editor .block-editor-block-list__block { min-width: 0; }
.sag-recipe-editor__nutrition .sag-recipe__nutrition { padding: 12px; }
.sag-recipe-editor .components-base-control { margin-bottom: 12px; }
.sag-recipe-editor .components-notice__content { white-space: pre-line; }
.sag-recipe-editor select { max-width: 100%; }
@container (max-width: 719.98px) {
    .sag-recipe-editor .block-editor-inner-blocks, .sag-recipe-editor .block-editor-block-list__layout { display: block; }
    .sag-recipe-editor .block-editor-block-list__block { margin-bottom: 22px; }
}

@media print {
    .sag-recipe { border: 0; box-shadow: none; padding: 0; margin: 0; font-size: 11pt; break-inside: auto; }
    .sag-recipe__controls, .sag-recipe__check { display: none !important; }
    .sag-recipe[data-enhanced] .sag-recipe__ingredient { padding-inline-start: 0; }
    .sag-recipe__body { display: block; }
    .sag-recipe__ingredients, .sag-recipe__nutrition, .sag-recipe__tip { position: static !important; margin-bottom: 20px; background: none; border: 1px solid #ddd; }
    .sag-recipe__meta > div { background: none; }
    .sag-recipe__step, .sag-recipe__nutrition, .sag-recipe__tip { break-inside: avoid; }
    .sag-recipe .sag-recipe__step::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .sag-recipe img { max-height: 260px; object-fit: contain; aspect-ratio: auto; }
}
