/* theme_culinario.css - Tema Globale NutriEm per NutriApp */

:root {
    --primary: #fcd116; /* Giallo NutriEm */
    --background-color: #f5f5f5;
    --text-main: #000000;
    
    --table-header-bg: #000000;
    --table-header-color: #ffffff;
    --table-totale-bg: #fcd116;
    --table-border: #cccccc;
    --panel-bg: #e0e0e0;
    
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

* {
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

/* =========================================================
   INTESTAZIONE E PULSANTI GLOBALI NUTRIEM
   ========================================================= */

.main-header,
.header {
    background-color: var(--primary) !important;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000000;
    margin-bottom: 20px;
}

.main-header h1,
.main-header h2,
.main-header span,
.main-header strong,
.header h1,
.header h2,
.header span,
.header strong {
    color: #000000 !important;
}

button,
[role="button"],
.header-btn,
.btn {
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.header-btn,
.btn {
    background: #ffffff;
    border: 1px solid #cccccc;
    color: #000000 !important;
    padding: 4px 10px;
    font-size: 12px;
}

.header-btn:hover,
.btn:hover {
    background: #eeeeee;
}

button.outline,
[role="button"].outline {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
}

.btn-green {
    background-color: #5cb85c !important;
    color: #ffffff !important;
    border: 1px solid #4cae4c !important;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
}

.btn-green:hover {
    background-color: #449d44 !important;
}

/* =========================================================
   PANNELLI E CONTROLLI FORM
   ========================================================= */

.panel {
    background: #ffffff;
    border: 1px solid #cccccc;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.panel-title {
    margin-top: 0;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-size: 15px;
    color: #000000;
    font-weight: bold;
}

.form-label,
.macro-label {
    font-size: 12px;
    font-weight: bold;
    color: #000000;
    display: block;
    margin-bottom: 4px;
}

.form-input,
.form-select {
    width: 100%;
    font-size: 13px;
    padding: 6px 8px;
    margin-bottom: 15px;
    border: 1px solid #aaaaaa;
    border-radius: 3px;
    background: #ffffff;
    color: #000000;
}

.macro-input {
    width: 70px !important;
    min-width: 70px !important;
    height: 28px !important;
    padding: 2px 4px !important;
    border: 1px solid #aaaaaa !important;
    border-radius: 3px !important;
    font-size: 13px !important;
    text-align: center !important;
    background: #ffffff !important;
    margin: 0 !important;
}

.macro-input[readonly] {
    background: #eeeeee !important;
    color: #333333 !important;
}

/* =========================================================
   TABELLE RIGIDE NUTRIEM (.nutriem-table)
   ========================================================= */

table.nutriem-table {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    background: #ffffff;
    font-size: 12px;
    margin-bottom: 20px;
}

table.nutriem-table thead {
    display: table-header-group !important;
}

table.nutriem-table tbody {
    display: table-row-group !important;
}

table.nutriem-table tr {
    display: table-row !important;
}

table.nutriem-table th,
table.nutriem-table td {
    display: table-cell !important;
    border: 1px solid var(--table-border) !important;
    padding: 5px 6px !important;
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
}

table.nutriem-table thead th {
    background-color: var(--table-header-bg) !important;
    color: var(--table-header-color) !important;
    font-weight: bold;
    border: 1px solid #000000 !important;
}

table.nutriem-table tbody td.text-left,
table.nutriem-table tbody td.col-desc {
    text-align: left !important;
    font-weight: bold;
    text-overflow: ellipsis;
}

table.nutriem-table input[type="number"] {
    width: 100% !important;
    max-width: 50px !important;
    padding: 2px !important;
    text-align: center !important;
    font-size: 11px !important;
    border: 1px solid #cccccc !important;
    margin: 0 auto !important;
    display: block !important;
}

table.nutriem-table .row-totale td {
    background-color: var(--table-totale-bg) !important;
    color: #000000 !important;
    font-weight: bold;
    border-color: #d4ad00 !important;
}

/* Larghezze colonne Builder Dieta */
.col-cod   { width: 4%; }
.col-desc  { width: 18%; }
.col-q     { width: 4%; }
.col-macro { width: 4.8%; }
.col-act   { width: 6.8%; }

/* Indicatori di stato e semafori nutrizionali */
.text-red {
    color: #FF0000 !important;
    font-weight: bold;
}

.text-green {
    color: #11BD2F !important;
    font-weight: bold;
}