/* Recipe pages: ingredient/step lists, serving scaler and cook mode (js/recipe-tools.js) */

.recipe-body h2 {
    margin-top: 40px;
    font-size: 28px;
}

.recipe-body h3 {
    margin-top: 24px;
    font-size: 20px;
}

.recipe-body ul,
.recipe-body ol {
    padding-left: 24px;
    margin: 10px 0 20px;
}

.recipe-body li {
    margin: 6px 0;
    line-height: 1.55;
}

.recipe-body ol > li {
    margin: 12px 0;
    padding-left: 4px;
}

.recipe-body img {
    margin: 20px 0;
}

/* Tools row: scaler + start cooking */
.recipe-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 0;
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

.scale-label {
    font-size: 13px;
    font-weight: 600;
    color: #808080;
    margin-right: 4px;
}

.tools-left {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
}

.scale-btn,
.unit-btn {
    min-width: 42px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #404040;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.scale-btn.active,
.unit-btn.active {
    color: #fff;
    background: #e8772e;
    border-color: #e8772e;
}

.cook-start {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    background: #e8772e;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}

.cook-start:hover,
.cook-start:focus {
    background: #c95f1a;
}

/* Shopping checkboxes on ingredient lists */
.recipe-body ul.ingredient-list {
    list-style: none;
    padding-left: 0;
}

.recipe-body ul.ingredient-list > li {
    margin: 2px 0;
}

.ing-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 5px 0;
    font-weight: normal;
    cursor: pointer;
}

.ing-check input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 4px 0 0;
    accent-color: #e8772e;
    cursor: pointer;
}

.is-checked .ing-text {
    color: #aaa;
    text-decoration: line-through;
}

.tools-right {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.share-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #e8772e;
    background: transparent;
    border: 2px solid #e8772e;
    border-radius: 3px;
    cursor: pointer;
}

.share-btn:hover,
.share-btn:focus {
    color: #fff;
    background: #e8772e;
}

.ing-clear {
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #808080;
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.ing-clear:hover,
.ing-clear:focus {
    color: #404040;
    border-color: #bbb;
}

.is-scaled .qty,
.qty.converted,
.unit.converted {
    font-weight: 700;
    color: #c95f1a;
}

/* ===== Cook mode ===== */
html.cook-mode-open,
html.cook-mode-open body {
    overflow: hidden;
}

.cook-mode {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    flex-direction: column;
    background: #fffaf4;
    color: #2b2b2b;
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.cook-mode.open {
    display: flex;
}

.cm-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0e2d2;
}

.cm-title {
    font-weight: 700;
    font-size: 16px;
}

.cm-top-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cm-btn {
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #404040;
    background: #fff;
    border: 1px solid #e3d3c1;
    border-radius: 20px;
    cursor: pointer;
}

.cm-btn.on {
    color: #fff;
    background: #e8772e;
    border-color: #e8772e;
}

.cm-ingredients {
    max-height: 40vh;
    overflow-y: auto;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #f0e2d2;
}

.cm-ingredients ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2 260px;
}

.cm-ingredients li {
    margin: 4px 0;
    font-size: 16px;
    break-inside: avoid;
}

.cm-ingredients input:checked + span {
    text-decoration: line-through;
    color: #aaa;
}

.cm-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.cm-progress {
    font-size: 14px;
    font-weight: 700;
    color: #e8772e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cm-section {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 700;
    color: #808080;
}

.cm-step {
    margin: 16px 0;
    font-family: 'Lora', 'Times New Roman', serif;
    font-size: 30px;
    line-height: 1.45;
}

@media (max-width: 767px) {
    .cm-step { font-size: 23px; }
    .cm-btn span { display: none; }
}

.cm-step-timers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cm-timer-chip {
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 600;
    color: #c95f1a;
    background: #fff;
    border: 2px solid #f4a259;
    border-radius: 20px;
    cursor: pointer;
}

.cm-timers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
}

.cm-timers:empty {
    display: none;
}

.cm-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px 8px 6px 14px;
    font-size: 15px;
    background: #fff;
    border: 1px solid #e3d3c1;
    border-radius: 20px;
}

.cm-timer strong {
    font-variant-numeric: tabular-nums;
}

.cm-timer.done {
    color: #fff;
    background: #d9480f;
    border-color: #d9480f;
    animation: cm-pulse 1s infinite alternate;
}

@keyframes cm-pulse {
    from { opacity: 1; }
    to { opacity: 0.6; }
}

.cm-timer-cancel {
    padding: 0 6px;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

.cm-nav {
    display: flex;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid #f0e2d2;
}

.cm-nav-btn {
    flex: 1;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    color: #404040;
    background: #fff;
    border: 1px solid #e3d3c1;
    border-radius: 6px;
    cursor: pointer;
}

.cm-nav-btn.cm-next {
    flex: 2;
    color: #fff;
    background: #e8772e;
    border-color: #e8772e;
}

.cm-nav-btn.cm-repeat {
    flex: 0 0 64px;
}

.cm-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.cm-hint {
    padding: 0 16px 10px;
    font-size: 13px;
    text-align: center;
    color: #808080;
}

.cm-hint:empty {
    display: none;
}

/* "Cooked this?" box at the end of each recipe */
.cooked-this {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin: 50px 0 10px;
    padding: 22px 24px;
    background: #fffaf4;
    border: 1px solid #f0e2d2;
    border-radius: 10px;
}

.cooked-this-icon {
    flex: none;
    font-size: 30px;
    color: #e8772e;
}

.cooked-this h3 {
    margin: 0 0 6px;
    font-size: 22px;
}

.cooked-this p {
    margin: 0 0 14px;
    font-size: 17px;
}

.cooked-this-email {
    word-break: break-all;
}

.cooked-this-btn {
    display: inline-block;
    padding: 9px 18px;
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    background: #e8772e;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}

.cooked-this-btn:hover,
.cooked-this-btn:focus {
    background: #c95f1a;
}

.cooked-this-btn.copied {
    background: #2f8f46;
}

.cooked-this-status {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #808080;
}

.cooked-this-status:empty {
    display: none;
}

@media print {
    .cooked-this,
    .recipe-tools,
    .cook-mode {
        display: none !important;
    }
}
