﻿/* CONTENEDOR */
.receta-container {
    padding: 1.5rem;
    border-radius: 22px;
    animation: fadeUp .3s ease;
}

/* HEADER */
.receta-header {
    margin-bottom: 1.2rem;
}

    .receta-header h2 {
        margin: 0;
    }

    .receta-header span {
        font-size: .9rem;
        opacity: .7;
    }

/* GRID PRINCIPAL */
.receta-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

/* SECCIONES */
.receta-section {
    border-radius: 16px;
    background: rgba(var(--rz-base-contrast-rgb), .03);
    border: 1px solid rgba(var(--rz-base-contrast-rgb), .08);
    display: flex;
    flex-direction: column;
}

/* HEADER DE CADA SECCIÓN */
.section-header {
    padding: .8rem 1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(var(--rz-base-contrast-rgb), .08);
}

/* BODY */
.section-body {
    padding: .8rem;
    flex: 1;
}

/* DETALLE (ABAJO) */
.receta-detalle {
    margin-top: 1.2rem;
}

/* ACCIONES */
.receta-actions {
    margin-top: 1.2rem;
    display: flex;
    justify-content: flex-end;
    gap: .8rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .receta-layout {
        grid-template-columns: 1fr;
    }
}

/* CARD PRODUCTOS */

/* CARD */
.producto-card {
    position: relative;
    border-radius: 16px;
    padding: .8rem;
    background: var(--rz-base-default);
    border: 1px solid rgba(var(--rz-base-contrast-rgb), .08);
    cursor: pointer;
    transition: all .25s ease;
}

    /* HOVER */
    .producto-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(0,0,0,.08);
    }

    /* ACTIVO */
    .producto-card.active {
        border: 2px solid var(--rz-primary);
        background: rgba(var(--rz-primary-rgb), .08);
    }

/* IMAGEN */
.producto-img {
    display: flex;
    justify-content: center;
    margin-bottom: .5rem;
}

    .producto-img img {
        width: 70px;
        height: 70px;
        border-radius: 12px;
        object-fit: cover;
    }

/* PLACEHOLDER */
.producto-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--rz-primary-rgb), .08);
    color: var(--rz-primary);
}

/* INFO */
.producto-info {
    text-align: center;
}

.producto-nombre {
    display: block;
    font-weight: 700;
    font-size: .9rem;
}

.producto-categoria {
    font-size: .75rem;
    opacity: .7;
}

/* CHECK */
.producto-check {
    position: absolute;
    top: 6px;
    right: 6px;
    color: var(--rz-primary);
    font-size: 20px;
}

.producto-card.active {
    transform: scale(1.02);
}

/* CARD PRODUCTOS */

/* BUSCADOR PRODUCTOS */

/* TOOLBAR */
.producto-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

/* ================= SEARCH ================= */
.producto-search {
    position: relative;
    width: min(320px, 100%);
}

.producto-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rz-primary);
    font-size: 18px;
    z-index: 2;
}

.producto-search-input {
    width: 100%;
    padding-left: 2.5rem !important;
    border-radius: 14px !important;
    border: 2px solid rgba(var(--rz-base-contrast-rgb), .1);
    background: var(--rz-base-default);
}

    /* FOCUS */
    .producto-search-input:focus {
        border-color: var(--rz-primary) !important;
        box-shadow: 0 0 0 3px rgba(var(--rz-primary-rgb), .15);
    }

/* ================= DROPDOWN ================= */
.producto-dropdown {
    border-radius: 14px !important;
    min-width: 200px;
}

/* ================= CLEAR BUTTON ================= */
.producto-clear-btn {
    border-radius: 12px !important;
    height: 42px;
}

/* ================= DARK MODE ================= */
html.dark .producto-search-input,
.rz-dark .producto-search-input {
    background: rgba(var(--rz-base-contrast-rgb), .05) !important;
    border-color: rgba(var(--rz-base-contrast-rgb), .15) !important;
}

html.dark .producto-search-icon,
.rz-dark .producto-search-icon {
    color: rgba(var(--rz-text-secondary-color-rgb), .8);
}

/* BUSCADOR PRODUCTOS */

/* MATERIAS PRIMAS */
/* CONTENEDOR */
.mp-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* CHIP */
.mp-chip {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .75rem;
    border-radius: 999px;
    background: rgba(var(--rz-base-contrast-rgb), .06);
    border: 1px solid rgba(var(--rz-base-contrast-rgb), .1);
    cursor: pointer;
    font-size: .85rem;
    transition: all .2s ease;
}

    /* HOVER */
    .mp-chip:hover {
        transform: translateY(-2px);
        background: rgba(var(--rz-primary-rgb), .08);
    }

    /* ACTIVO */
    .mp-chip.active {
        background: rgba(var(--rz-success-rgb), .15);
        border-color: var(--rz-success);
        color: var(--rz-success);
    }

/* ICONO CHECK */
.mp-check {
    font-size: 16px;
}

/* DARK MODE */
html.dark .mp-chip,
.rz-dark .mp-chip {
    background: rgba(var(--rz-base-contrast-rgb), .08);
}

.mp-chip.active {
    transform: scale(1.05);
}
/* MATERIAS PRIMAS */

/* DETALLES TABLA */
/* CONTENEDOR */
.detalle-receta-container {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

/* ITEM */
.detalle-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: .7rem .9rem;
    border-radius: 14px;
    background: var(--rz-base-default);
    border: 1px solid rgba(var(--rz-base-contrast-rgb), .08);
    transition: all .2s ease;
}

    /* HOVER */
    .detalle-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0,0,0,.06);
    }

/* NOMBRE */
.detalle-nombre {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}

/* CONTROLES */
.detalle-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* INPUT */
.detalle-input {
    width: 90px;
}

/* DROPDOWN */
.detalle-dropdown {
    width: 120px;
}

/* REMOVE */
.detalle-remove {
    display: flex;
    align-items: center;
}

/* EMPTY */
.detalle-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1.2rem;
    border-radius: 14px;
    background: rgba(var(--rz-base-contrast-rgb), .04);
    color: var(--rz-text-secondary-color);
}

/* DARK MODE */
html.dark .detalle-item,
.rz-dark .detalle-item {
    background: rgba(var(--rz-base-contrast-rgb), .05);
}

.detalle-item.new {
    animation: fadeInUp .3s ease;
}
/* DETALLES TABLA */