/* FRUTTY51 - Stili globali per l'interfaccia utente
   Creato il: 10 Aprile 2025
   Versione: 1.0
*/

/* ===== STILI GENERALI OTTIMIZZATI PER TOUCH ===== */

/* Contenitori principali */
.container-touch {
    padding: 16px !important;
}

.section-touch {
    padding: 20px !important;
    margin-bottom: 24px !important;
    border-radius: 12px !important;
    background-color: white !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}

/* Form elements */
.form-group-touch {
    margin-bottom: 20px !important;
}

.touch-button {
    min-height: 56px !important;
    min-width: 80px !important;
    font-size: 16px !important;
    padding: 10px 16px !important;
    margin: 8px 4px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.touch-input {
    min-height: 48px !important;
    font-size: 16px !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
}

.touch-select {
    min-height: 48px !important;
    font-size: 16px !important;
    padding: 8px 35px 8px 12px !important; /* Spazio per la freccia dropdown */
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.number-input {
    min-width: 80px !important;
    min-height: 48px !important;
    font-size: 18px !important;
    text-align: center !important;
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
}

/* ===== Listino a peso / tooltip parametri ===== */
/* output.css (Tailwind 4 precompilato) non include tutte le sfumature (es. bg-indigo-50, bg-indigo-200, bg-sky-600). */
.listino-peso-params-wrap {
    background-color: #eef2ff;
}

/* Cerchietto "i" come tab Listino prodotti a pezzo (Prezzo vendita proposto): verde 16×16, stesso aspetto del Literal in code-behind */
.info-param-help-icon {
    display: inline-flex !important;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: #16a34a; /* green-600 */
    color: #fff;
    font-size: 0.75rem; /* text-xs */
    font-weight: 700;
    line-height: 1rem;
    cursor: help;
    flex-shrink: 0;
    box-sizing: border-box;
}

.info-param-help-icon:focus-visible {
    outline: 2px solid #15803d; /* green-700 */
    outline-offset: 2px;
}

/* ===== STILI DEL MENU PRINCIPALE ===== */

.menu-card {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 90px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    padding: 16px !important;
    text-align: center !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

    .menu-card:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2) !important;
    }

/* Colori per ogni fase del processo */
.card-pianificazione {
    background-color: #3b82f6 !important; /* blue-500 */
    color: white !important;
}

    .card-pianificazione:hover {
        background-color: #2563eb !important; /* blue-600 */
    }

.card-rimanenza {
    background-color: #ef4444 !important; /* red-500 */
    color: white !important;
}

    .card-rimanenza:hover {
        background-color: #dc2626 !important; /* red-600 */
    }

.card-produzione {
    background-color: #10b981 !important; /* green-500 */
    color: white !important;
}

    .card-produzione:hover {
        background-color: #059669 !important; /* green-600 */
    }

.card-stoccaggio {
    background-color: #f59e0b !important; /* yellow-500 */
    color: white !important;
}

    .card-stoccaggio:hover {
        background-color: #d97706 !important; /* yellow-600 */
    }

.card-gusti {
    background-color: #ec4899 !important; /* pink-500 */
    color: white !important;
}

    .card-gusti:hover {
        background-color: #db2777 !important; /* pink-600 */
    }

.card-richieste {
    background-color: #14b8a6 !important; /* teal-500 */
    color: white !important;
}

    .card-richieste:hover {
        background-color: #0d9488 !important; /* teal-600 */
    }

.card-utility {
    background-color: #4b5563 !important; /* gray-600 */
    color: white !important;
}

    .card-utility:hover {
        background-color: #374151 !important; /* gray-700 */
    }

/* ===== STILI PER LE GRIGLIE DATI ===== */

.grid-touch-spacing td,
.grid-touch-spacing th {
    padding: 12px 8px !important; /* Padding aumentato per le celle */
}

.grid-header {
    background-color: #1f2937 !important; /* gray-800 */
    color: white !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 12px 8px !important;
}

.grid-row {
    border-bottom: 1px solid #e5e7eb !important; /* gray-200 */
}

    .grid-row:hover {
        background-color: #f3f4f6 !important; /* gray-100 */
    }

.grid-cell {
    padding: 12px 8px !important;
}

.grid-cell-center {
    text-align: center !important;
}

/* ===== STILI PER LISTE NUMERATE INFORMATIVE ===== */

.step-list {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

.step-item {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 1rem !important;
}

.step-number {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 2rem !important;
    height: 2rem !important;
    border-radius: 9999px !important;
    background-color: #3b82f6 !important; /* blue-500 */
    color: white !important;
    font-weight: 700 !important;
    margin-right: 0.75rem !important;
}

.step-content {
    flex-grow: 1 !important;
}

.step-title {
    font-weight: 700 !important;
    margin-bottom: 0.25rem !important;
}

/* ===== STILI PER MESSAGGI DI AVVISO ===== */

.alert {
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
}

.alert-info {
    background-color: #eff6ff !important; /* blue-50 */
    border: 1px solid #bfdbfe !important; /* blue-200 */
    color: #1e40af !important; /* blue-800 */
}

.alert-warning {
    background-color: #fffbeb !important; /* yellow-50 */
    border: 1px solid #fef3c7 !important; /* yellow-200 */
    color: #92400e !important; /* yellow-800 */
}

.alert-danger {
    background-color: #fee2e2 !important; /* red-50 */
    border: 1px solid #fecaca !important; /* red-200 */
    color: #b91c1c !important; /* red-800 */
}

.alert-success {
    background-color: #ecfdf5 !important; /* green-50 */
    border: 1px solid #a7f3d0 !important; /* green-200 */
    color: #065f46 !important; /* green-800 */
}

/* ===== STILI PER LA STAMPA ===== */

@media print {
    /* Nascondi il menu, header e footer */
    nav,
    aside,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        margin: 0;
        padding: 0;
    }

    main {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* Stile per la tabella */
    .print-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

        .print-table th,
        .print-table td {
            border: 1px solid black !important;
            padding: 8px !important;
            text-align: left !important;
        }

        .print-table th {
            background-color: #eee !important;
            font-weight: bold !important;
        }

    /* Stile per le Label create per la stampa */
    .print-value {
        display: inline-block !important;
        width: 100% !important;
        text-align: center !important;
        border: 1px solid black !important;
        padding: 2px !important;
    }
}

/* ===== STILI PER LAYOUT RESPONSIVE ===== */

/* Riduzione colonne della griglia su dispositivi mobili */
@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr !important;
    }

    .action-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
    }

        .action-buttons .touch-button {
            width: 100% !important;
            margin: 3px 0 !important;
        }
}

/* Media query per tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .action-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
    }

        .action-buttons .touch-button {
            width: 100% !important;
            margin: 3px 0 !important;
        }
}
