/* ========================================
   ESTILOS MODERNOS PARA MÓDULO DE RECETA
   ======================================== */

.receta-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.receta-container .col-md-12 {
    text-align: left !important;
}

/* HEADER */
.receta-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f4f8 100%);
    padding: 25px 30px !important;
    border-bottom: 2px solid #e0e6f2;
}

.receta-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.receta-header p {
    margin: 0 !important;
    font-size: 0.95em;
    color: #666;
    letter-spacing: 0.5px;
}

/* SECCIONES */
.receta-section-header {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    margin: 20px 0 15px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e6f2;
    position: relative;
    width: 100% !important;
    text-align: left !important;
}

.receta-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #143DD4 0%, #0f2aa0 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 13px;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(20, 61, 212, 0.3);
}

.receta-section-title {
    font-weight: 600;
    color: #222;
    margin: 0;
    font-size: 1.1em;
    flex-grow: 1;
    letter-spacing: 0.3px;
}

.receta-observations-title {
    font-weight: 600;
    color: #222;
    margin: 20px 0 15px 0;
    font-size: 1.05em;
    letter-spacing: 0.3px;
}

.receta-section-header .btn-add-component {
    margin-left: auto;
    padding: 6px 12px;
    background-color: #255494;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: auto;
    max-width: 180px;
}

.receta-section-header .btn-add-component:hover {
    background-color: #255494;
    box-shadow: 0 4px 12px #255494;
    transform: translateY(-2px);
}

.receta-section-header .btn-add-component i {
    font-size: 0.9em;
}

/* DATOS DEL PRODUCTO */
.receta-data-box {
    background: #f9fafb;
    border: 1px solid #e0e6f2;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.receta-data-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e6f2;
}

.receta-data-row:last-child {
    border-bottom: none;
}

.receta-data-label {
    display: flex;
    align-items: center;
    width: 150px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.receta-data-label i {
    margin-right: 8px;
    font-size: 1.1em;
}

.receta-data-value {
    flex-grow: 1;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e6f2;
    color: #555;
    font-weight: 500;
}

/* TABLA DE COMPONENTES */
.receta-table-wrapper {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.receta-table {
    margin-bottom: 0;
    background: white;
}

.receta-table.tabla-items thead {
    background: #255494 !important;
}

.receta-table.tabla-items thead tr {
    background: #255494 !important;
}

.receta-table.tabla-items thead tr th {
    background: #255494 !important;
    color: white !important;
    font-weight: 600;
    padding: 10px 10px !important;
    border: none !important;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.receta-table-body tr {
    border-bottom: 1px solid #e0e6f2;
    transition: all 0.2s ease;
}

.receta-table-body tr:hover {
    background-color: #f9fafb;
}

.receta-table td {
    padding: 12px 10px !important;
    vertical-align: middle;
    font-size: 0.95em;
}

/* TEXTAREA */
.receta-textarea {
    border-radius: 6px;
    border: 1px solid #e0e6f2;
    padding: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
}

.receta-textarea:focus {
    border-color: #143DD4;
    box-shadow: 0 0 0 3px rgba(20, 61, 212, 0.1);
    outline: none;
}

/* TOTALES */
.receta-totals-box {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8ecf4 100%);
    border: 2px solid #143DD4;
    border-radius: 8px;
    padding: 20px;
    text-align: right;
}

.receta-total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.receta-total-label {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.receta-total-value {
    color: #143DD4;
    font-weight: 700;
    font-size: 1.8em;
    letter-spacing: 1px;
}

.receta-total-row {
    background-color: #f0f4f8 !important;
    font-weight: 600;
}

.receta-total-row td:last-child {
    color: #143DD4 !important;
    font-size: 1.2em;
}

/* FOOTER Y BOTONES */
.receta-footer {
    background: #f9fafb;
    border-top: 2px solid #e0e6f2;
    padding: 20px !important;
    display: flex;
    justify-content: flex-end;
}

.receta-buttons-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.receta-btn-save,
.receta-btn-delete {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.receta-btn-save {
    background: linear-gradient(135deg, #143DD4 0%, #0f2aa0 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(20, 61, 212, 0.3);
}

.receta-btn-save:hover {
    background: linear-gradient(135deg, #0f2aa0 0%, #0a1f7f 100%);
    box-shadow: 0 6px 20px rgba(20, 61, 212, 0.4);
    transform: translateY(-2px);
}

.receta-btn-save:active {
    transform: translateY(0);
}

.receta-btn-delete {
    background-color: #ff6b6b;
    color: white;
}

.receta-btn-delete:hover {
    background-color: #ff5252;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transform: translateY(-2px);
}

.receta-btn-delete:active {
    transform: translateY(0);
}

.receta-btn-save i,
.receta-btn-delete i {
    font-size: 1.1em;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .receta-section-header {
        flex-wrap: wrap;
        margin: 15px 0;
    }

    .receta-section-header .btn-add-component {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }

    .receta-data-row {
        flex-wrap: wrap;
    }

    .receta-data-label {
        width: 100%;
        margin-bottom: 8px;
    }

    .receta-data-value {
        width: 100%;
    }

    .receta-buttons-wrapper {
        flex-direction: column;
        width: 100%;
    }

    .receta-btn-save,
    .receta-btn-delete {
        width: 100%;
        justify-content: center;
    }

    .receta-table-header th {
        font-size: 0.75em;
        padding: 10px 5px !important;
    }

    .receta-table td {
        padding: 8px 5px !important;
        font-size: 0.85em;
    }

    .receta-total-value {
        font-size: 1.4em;
    }
}

@media (max-width: 576px) {
    .receta-header {
        padding: 15px 20px !important;
    }

    .receta-header h1 {
        font-size: 1.5em;
    }

    .receta-step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
        margin-right: 10px;
    }

    .receta-section-title {
        font-size: 0.95em;
    }

    .receta-table-wrapper {
        margin: 15px -15px;
        border-radius: 0;
    }

    .receta-total-value {
        font-size: 1.2em;
    }
}

/* COMPATIBILIDAD CON ESTILOS EXISTENTES */
.receta-container .box-body {
    padding: 20px;
}

.receta-container input[type="hidden"] {
    display: none;
}

/* ANIMACIONES */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.receta-table-body tr {
    animation: slideIn 0.3s ease;
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    .receta-container {
        background: #1e1e1e;
        color: #fff;
    }

    .receta-header {
        background: linear-gradient(135deg, #2a2a2a 0%, #232323 100%);
        border-bottom-color: #3a3a3a;
    }

    .receta-section-header {
        border-bottom-color: #3a3a3a;
    }

    .receta-data-box {
        background: #242424;
        border-color: #3a3a3a;
    }

    .receta-data-row {
        border-bottom-color: #3a3a3a;
    }

    .receta-data-label {
        color: #e0e0e0;
    }

    .receta-data-value {
        background: #1a1a1a;
        border-color: #3a3a3a;
        color: #b0b0b0;
    }

    .receta-table {
        background: #1e1e1e;
    }

    .receta-table-body tr {
        border-bottom-color: #3a3a3a;
    }

    .receta-table-body tr:hover {
        background-color: #242424;
    }

    .receta-textarea {
        background: #242424;
        border-color: #3a3a3a;
        color: #e0e0e0;
    }

    .receta-textarea:focus {
        border-color: #4a7fd4;
    }

    .receta-totals-box {
        background: linear-gradient(135deg, #242424 0%, #1f1f1f 100%);
        border-color: #4a7fd4;
    }

    .receta-footer {
        background: #242424;
        border-top-color: #3a3a3a;
    }
}
