/* Custom styles — Tailwind CDN handles utilities */
:root {
    --primary-orange: #ff6b35;
}

/* Recipe cards with colorful top border */
.recipe-card {
    position: relative;
    overflow: hidden;
}

.recipe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #fbbf24, #4ade80);
}

/* Ingredient badges */
.ingredient-badge {
    display: inline;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    border: 1px solid #fbbf24;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    color: #92400e;
}

.cookware-badge {
    display: inline;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border: 1px solid #4ade80;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    color: #065f46;
    font-style: italic;
}

.timer-badge {
    display: inline;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #f87171;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    color: #7f1d1d;
}

/* Step number circles */
.step-number {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    background: linear-gradient(135deg, #ff6b35, #f97316);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    color: white;
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.2);
}

/* Metadata pills */
.metadata-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    white-space: nowrap;
}

html { scroll-behavior: smooth; }

/* Scroll buttons — visible at 800px wide (touch kiosk), hidden on larger screens */
.scroll-btn {
    display: none !important;
    position: fixed;
    right: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 1.5rem;
    color: #374151;
    cursor: pointer;
    z-index: 50;
    opacity: 0.5;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.scroll-btn:active {
    background: #f3f4f6;
}

.scroll-btn-up { top: 1rem; }
.scroll-btn-down { top: calc(1rem + 56px + 0.75rem); }

/* Fullscreen toggle — kiosk only */
.kiosk-fullscreen-btn {
    display: none !important;
}

@media (min-width: 441px) and (max-width: 801px) {
    .scroll-btn { display: flex !important; align-items: center; justify-content: center; }

    .kiosk-fullscreen-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 1rem;
        left: 1rem;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 2px solid #e5e7eb;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        font-size: 1.25rem;
        color: #374151;
        cursor: pointer;
        z-index: 50;
        opacity: 0.5;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .kiosk-fullscreen-btn:active { background: #f3f4f6; }

    /* Compact header for kiosk screen (800×400) */
    body > .max-w-6xl { padding-top: 1rem; padding-bottom: 1rem; }
    nav.mb-6 { margin-bottom: 0.5rem; }
    nav a { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
    .mb-8 { margin-bottom: 1rem; }
    .mb-6 { margin-bottom: 0.5rem; }
    .mb-4 { margin-bottom: 0.25rem; }
    h1 { font-size: 1.5rem !important; line-height: 1.2; }
    .tag { padding: 0.125rem 0.5rem; font-size: 0.625rem; }
    .metadata-pill { padding: 0.2rem 0.5rem; font-size: 0.75rem; }
    .gap-3 { gap: 0.375rem; }
    .gap-2 { gap: 0.25rem; }
}

/* Print */
@media print {
    @page { size: landscape; margin: 0.4in; }
    nav { display: none; }
    body { background: white; }
    .shadow-lg, .shadow-md { box-shadow: none; }
    .scroll-btn { display: none; }
    .kiosk-fullscreen-btn { display: none !important; }

    /* Keep everything on the page flowing without forced breaks */
    .max-w-6xl { max-width: none; }
    .py-8 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
    .mb-8, .mb-12, .mb-6 { margin-bottom: 0.5rem; }
    .p-6 { padding: 0.75rem; }
    .rounded-2xl, .rounded-xl, .rounded-lg { border-radius: 0.5rem; }

    /* Avoid orphaned section headers / broken metadata */
    h1, h2, h3 { page-break-after: avoid; break-after: avoid; }
    .metadata-pill, #tags-container, #servings-scaler { page-break-inside: avoid; break-inside: avoid; }
    .grid { page-break-before: avoid; break-before: avoid; }

    /* Sticky sidebar breaks print layout */
    .sticky { position: static !important; }

    /* Keep two-column layout when printing landscape */
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; display: grid !important; }
    .md\:col-span-1 { grid-column: span 1 / span 1 !important; }
    .md\:col-span-2 { grid-column: span 2 / span 2 !important; }

    ol li { page-break-inside: avoid; break-inside: avoid; }
}
