/* 
 * VERSIONE ALTERNATIVA CSS FRONTEND CON CARD STYLE
 * Sostituisci css/frontend.css con questo file se preferisci lo stile a carte per mobile
 */

.coffee-quotes-frontend {
    margin: 20px 0;
}

.coffee-quotes-frontend h3 {
    font-size: 1.5em;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
    color: #fff;
}

.coffee-quotes-frontend h3:first-child {
    margin-top: 0;
}

/* Desktop: Tabella Normale */
@media screen and (min-width: 769px) {
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        margin-bottom: 20px;
        -webkit-overflow-scrolling: touch;
    }
    
    .coffee-quotes-table {
        width: 100%;
        border-collapse: collapse;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        min-width: 600px;
    }
    
    .coffee-quotes-table thead {
        background: #2c3e50;
        color: #fff;
    }
    
    .coffee-quotes-table th {
        padding: 12px 15px;
        text-align: left;
        font-weight: 600;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        white-space: nowrap;
    }
    
    .coffee-quotes-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #e0e0e0;
        font-size: 14px;
    }
    
    .coffee-quotes-table tbody tr:hover {
        background-color: #f5f5f5;
    }
    
    .coffee-quotes-table tbody tr:nth-child(even) {
        background-color: #f9f9f9;
    }
    
    .coffee-quotes-table tbody tr:last-child td {
        border-bottom: none;
    }
    
    .table-responsive::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }
}

/* Mobile: Vista Card */
@media screen and (max-width: 768px) {
    .table-responsive {
        overflow: visible;
    }
    
    .coffee-quotes-table {
        display: block;
        width: 100%;
    }
    
    .coffee-quotes-table thead {
        display: none;
    }
    
    .coffee-quotes-table tbody {
        display: block;
    }
    
    .coffee-quotes-table tr {
        display: block;
        background: white;
        margin-bottom: 15px;
        border-radius: 12px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.15);
        overflow: hidden;
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .coffee-quotes-table tr:active {
        transform: scale(0.98);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .coffee-quotes-table td {
        display: flex;
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
        align-items: center;
    }
    
    .coffee-quotes-table td:last-child {
        border-bottom: none;
    }
    
    /* Prima cella (Tipo) - Stile Header */
    .coffee-quotes-table td:first-child {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: white;
        font-weight: bold;
        font-size: 18px;
        justify-content: center;
        padding: 15px;
        text-align: center;
        letter-spacing: 1px;
    }
    
    /* Etichetta campo */
    .coffee-quotes-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        min-width: 130px;
        padding-right: 10px;
        font-size: 13px;
    }
    
    .coffee-quotes-table td:first-child:before {
        display: none;
    }
    
    /* Ultima cella (Prezzo) - Evidenziata */
    .coffee-quotes-table td:last-child {
        background: linear-gradient(135deg, #f0f6fc 0%, #e8f4f8 100%);
        font-weight: bold;
        font-size: 16px;
        color: #27ae60;
        padding: 15px;
    }
    
    .coffee-quotes-table td:last-child:before {
        color: #27ae60;
        font-weight: bold;
    }
    
    /* Valore del campo */
    .coffee-quotes-table td:after {
        content: attr(data-value);
        flex: 1;
        text-align: right;
        color: #333;
    }
}

/* Extra Small Mobile */
@media screen and (max-width: 480px) {
    .coffee-quotes-table td {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .coffee-quotes-table td:before {
        font-size: 12px;
        min-width: 110px;
    }
    
    .coffee-quotes-table td:first-child {
        font-size: 16px;
    }
    
    .coffee-quotes-frontend h3 {
        font-size: 1.2em;
    }
}

/* Stili comuni */
.coffee-quotes-table td:last-child {
    font-weight: 600;
    color: #27ae60;
}

.coffee-quotes-table tbody tr td:first-child {
    font-weight: 600;
}

.no-quotes-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.no-quotes-message p {
    margin: 10px 0;
    color: #666;
}

.quotes-count {
    text-align: right;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.quotes-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.last-update {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.coffee-section {
    margin-bottom: 40px;
}

.coffee-type-title {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #6B4423 0%, #8B5A3C 100%);
    color: white;
    border-radius: 30px;
    font-size: 1.3em;
    margin-bottom: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    font-weight: 600;
}

/* Animazione caricamento */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coffee-quotes-table tr {
    animation: fadeIn 0.3s ease-in;
}

.coffee-quotes-table tr:nth-child(1) { animation-delay: 0.05s; }
.coffee-quotes-table tr:nth-child(2) { animation-delay: 0.1s; }
.coffee-quotes-table tr:nth-child(3) { animation-delay: 0.15s; }
.coffee-quotes-table tr:nth-child(4) { animation-delay: 0.2s; }
.coffee-quotes-table tr:nth-child(5) { animation-delay: 0.25s; }