/* Recipes page - B60 OS light theme. Tokens only (--ds-*). */

.recipes-page {
    padding: 0;
}

.recipes-layout {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: var(--ds-space-4);
    align-items: stretch;
    width: 100%;
    flex: 1;
    min-height: 0;
}

@media (max-width: 840px) {
    .recipes-layout {
        grid-template-columns: 1fr;
    }
}

.recipes-sidebar {
    padding: var(--ds-space-3);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.recipes-sidebar-title {
    margin: 0 0 var(--ds-space-3) 0;
    padding-inline: var(--ds-space-2);
}

.recipes-product-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.recipes-product-row {
    padding: var(--ds-space-3);
    border-radius: var(--ds-radius-md);
    cursor: pointer;
    margin-block-end: 2px;
    transition: background-color var(--ds-motion-hover) var(--ds-ease-standard);
}

.recipes-product-row:hover {
    background: var(--ds-surface-alt);
}

.recipes-product-row.is-active {
    background: var(--ds-primary-tint);
    box-shadow: inset 0 0 0 1px var(--ds-primary);
}

.recipes-product-row-name {
    font-weight: var(--ds-fw-semibold);
    color: var(--ds-text-primary);
}

.recipes-product-row-meta {
    font-size: var(--ds-text-xs);
    color: var(--ds-text-secondary);
    margin-block-start: 2px;
}

.recipes-editor {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.recipes-editor-header {
    padding: var(--ds-space-4) var(--ds-space-5);
    border-block-end: 1px solid var(--ds-border-default);
}

.recipes-editor-header h3 {
    margin: 0;
}

.recipes-editor-body {
    padding: var(--ds-space-4);
    flex: 1;
}

.recipes-cost-banner {
    padding: var(--ds-space-2) var(--ds-space-3);
    background: var(--ds-warning-tint);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    margin-block-end: var(--ds-space-3);
    font-size: var(--ds-text-sm);
    color: var(--ds-warning);
}

.recipes-cost-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ds-space-2);
    margin-block-end: var(--ds-space-3);
}

.recipes-cost-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ds-space-3);
    padding: var(--ds-space-4);
    background: var(--ds-surface-alt);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    margin-block-end: var(--ds-space-4);
}

.recipes-cost-card-row {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-1);
}

.recipes-cost-card-label {
    font-size: var(--ds-text-xs);
    color: var(--ds-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.recipes-cost-card-value {
    font-size: var(--ds-text-lg);
    font-weight: var(--ds-fw-bold);
    color: var(--ds-text-primary);
}

.recipes-cost-card-row.is-highlight .recipes-cost-card-value {
    font-size: var(--ds-text-xl);
}

.recipes-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
}

.recipes-table-wrap .ds-table {
    width: 100%;
    margin: 0;
}

.recipes-empty-editor {
    min-height: 56vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipes-empty-editor .ds-empty {
    max-width: 360px;
}

@media (max-width: 640px) {
    .recipes-cost-card {
        grid-template-columns: 1fr;
    }
}

.recipes-margin-positive {
    color: var(--ds-success);
}

.recipes-margin-negative {
    color: var(--ds-danger);
}
