/* =========================================
   RECIPE & CALCULATOR MODULE
   Based on: kerststol.html structure
   ========================================= */

/* 1. CORE VARIABLES (Defaults)
   Override --accent in your HTML <style> tag for specific recipes.
*/
:root {
    --accent: #d35400;       /* Default (Kerststol Orange) */
    --bg-calc: #f4f4f5;      /* Default calculator background */
    --calc-border: #e0e0e0;  /* Default border color */
}

/* 2. CUSTOM HEADER LAYOUT
   Overrides standard header to allow side-by-side layout or stacked on mobile.
*/
header.custom-header {
    display: block;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
    margin-bottom: 3rem;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Safety for smaller screens */
}

.header-intro {
    font-size: 1.05rem;
    color: var(--text-main);
    max-width: 600px;
    margin-top: 0;
}

/* 3. THE CALCULATOR BOX
   Sticky sidebar element for ingredient scaling.
*/
.calculator-box {
    background-color: var(--bg-calc);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--calc-border);
    margin: 2rem 0;
    
    /* Sticky positioning for long recipes */
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.input-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.calculator-box label {
    font-family: var(--font-sans);
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.calculator-box input {
    padding: 0.5rem;
    font-size: 1.2rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 90px;
    font-family: var(--font-sans);
    font-weight: bold;
    text-align: center;
    color: var(--accent);
}

.calc-result {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--accent);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.calc-subtext, 
.calc-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    margin-top: 5px;
    font-weight: 400;
}

/* 4. INGREDIENT GRID & LISTS */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }
}

.section-header {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    padding-bottom: 5px;
    font-family: var(--font-sans);
    color: var(--text-main);
}

/* Ingredient List Items */
.grid-container ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.grid-container li {
    margin-bottom: 0.6rem;
    border-bottom: 1px dotted #eee;
    padding-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.ingredient-name {
    flex-grow: 1;
    font-size: 0.95rem;
    color: var(--text-main);
}

.amount-wrapper {
    font-family: var(--font-sans);
    white-space: nowrap;
}

.ingredient-amount {
    font-weight: 700;
    color: #111; /* Kept dark for readability, distinct from accent */
}

.unit {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 2px;
    width: 25px;
    display: inline-block;
    text-align: left;
}

/* 5. PROCESS / INSTRUCTIONS */
.process-step {
    display: flex;
    margin-bottom: 1.5rem;
}

.step-number {
    font-family: var(--font-sans);
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 3px; /* Optical alignment with text */
}

.process-step strong {
    font-family: var(--font-sans);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

/* 6. UTILITIES (From various files) */
.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
    border: 1px solid var(--border);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}