.right, .left, .center{
	float: left;
	width: 33%;
}

.minus-btn, .plus-btn{
	height: 30px !important;
	width: 23px !important;
	text-align: center;
	margin: 0;
	padding: 0;
}

.minus-btn{
	float: right;
}

.plus-btn{
	float: left;
}

.endBlock{
   clear: left;
}

.content-pietanza-ordine{
   width: 100%;
   padding-bottom: 10px;
   padding-top: 10px;
   border-bottom: solid #8c6239;
}

.content-pietanza-riepilogo{
    border-bottom: 1px solid #8c6239;
	padding-top: 5px;
	padding-bottom: 5px;
}

.nome-pietanza{
	width: 41%;
}

.prezzo-pietanza-ordine{
	text-align: center;
	width: 25%;
}

/* ============================================ */
/* ALLERGENI - STILE PULITO SENZA BORDI */
/* ============================================ */
.allergeni-container {
    margin: 10px 0;
    padding: 0;
    background: transparent;
    border: none;
}

.allergeni-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.allergeni-header b {
    font-size: 14px;
}

#allergeni-info-btn {
    background: #15197f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.allergeni-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 6px;
    padding: 0;
    background: transparent;
    border: none;
}

.allergene-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: normal;
    cursor: pointer;
    font-size: 20px;
    padding: 2px 4px;
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
}

.allergene-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.allergene-icon {
    font-size: 20px;
    line-height: 1;
    display: inline-block;
}

#allergie_altro {
    width: 100%;
    padding: 8px 4px;
    border: none;
    border-bottom: 2px solid #ccc;
    background: transparent;
    outline: none;
    font-size: 14px;
    margin-top: 8px;
    transition: border-color 0.3s ease;
}

#allergie_altro:focus {
    border-bottom-color: #15197f;
}

#allergie_altro::placeholder {
    color: #999;
    font-style: italic;
}

/* ============================================ */
/* OPZIONI INGREDIENTI                          */
/* ============================================ */
.opzioni-row {
    margin-top: 8px;
    text-align: left;
    clear: both;
}

.opzioni-btn {
    font-size: 13px !important;
    padding: 4px 12px !important;
    margin: 0 !important;
    background: #e9ecef !important;
    color: #15197f !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    text-shadow: none !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

.opzioni-btn:hover {
    background: #dde2e6 !important;
}

.opzioni-btn.opzioni-attive {
    background: #15197f !important;
    color: #ffffff !important;
    border-color: #15197f !important;
}

.opzioni-btn-count {
    font-size: 11px;
    font-weight: bold;
    background: rgba(0,0,0,0.08);
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 3px;
}

.opzioni-btn.opzioni-attive .opzioni-btn-count {
    background: rgba(255,255,255,0.25);
}

/* Popup opzioni */
#popup-opzioni {
    max-width: 420px;
}

#popup-opzioni .ui-header h1 {
    font-size: 16px !important;
}

.opzioni-popup-nome {
    font-weight: bold;
    font-size: 15px;
    color: #15197f;
    margin: 0 0 4px 0;
}

.opzioni-popup-hint {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 12px 0;
}

.opzioni-list {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 12px;
}

.opzione-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 5px 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-weight: normal;
}

.opzione-label:hover {
    background: #eef1f4;
}

.opzione-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.opzione-testo {
    font-size: 15px;
    color: #333;
    user-select: none;
}

/* Opzioni nel resoconto */
.opzioni-resoconto {
    margin-top: 4px;
    padding-left: 4px;
}

.opzione-resoconto-riga {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
    font-style: italic;
}

/* ============================================ */
/* MOBILE FIX - < 500px */
/* ============================================ */
@media screen and (max-width: 500px) {
    .allergeni-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr)) !important;
        gap: 6px 4px !important;
        justify-items: center !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }
    
    .allergene-label {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        font-size: 20px !important;
        padding: 4px 2px !important;
        min-width: 40px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .allergene-label input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        order: 0 !important;
    }
    
    .allergene-icon {
        font-size: 22px !important;
        line-height: 1 !important;
        order: 1 !important;
    }
    
    #allergie_altro {
        font-size: 16px !important;
        padding: 10px 4px !important;
    }
    
    #allergeni-info-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
    }
    
    .allergeni-header b {
        font-size: 13px !important;
    }

    .opzioni-btn {
        font-size: 12px !important;
        padding: 5px 10px !important;
    }
    .opzione-label {
        padding: 12px 10px;
    }
    .opzione-testo {
        font-size: 14px;
    }
    .opzione-resoconto-riga {
        font-size: 11px;
    }
}

@media screen and (max-width: 360px) {
    .allergeni-grid {
        grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)) !important;
        gap: 4px 3px !important;
    }
    
    .allergene-label {
        font-size: 16px !important;
        padding: 2px 1px !important;
        min-width: 32px !important;
    }
    
    .allergene-label input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
    }
    
    .allergene-icon {
        font-size: 18px !important;
    }
}

.prezzo-pietanza-riepilogo{
	width: 33%;
}

.quantita-pietanza-ordine{
	text-align: center;
}

.quantita-pietanza-riepilogo{
	width: 24%;
	text-align: center;
}

.content-totale-ordine-riepilogo{
    border-top: 3px solid #8c6239;
	padding-top: 7px;
}

.title-pietanze-riepilogo{
    border-bottom: 5px solid #8c6239;
	padding-bottom: 7px;
    font-weight: bold;
}

.tipo-pietanza-riepilogo{
    border-bottom: 2px solid #8c6239;
    font-style: italic;
    font-weight: bold;
	padding-top: 11px;
	padding-bottom: 7px;
}

.red-btn{
	color: white !important;
    border-radius: 10px;
	background: #f20000;
    background: -webkit-linear-gradient(#f20000, #ff6868);
    background: -o-linear-gradient(#f20000, #ff6868);
    background: -moz-linear-gradient(#f20000, #ff6868);
    background: linear-gradient(#f20000, #ff6868);
}

.green-btn{
	color: white !important;
    border-radius: 10px;
	background: #178435;
    background: -webkit-linear-gradient(#178435, #43b261);
    background: -o-linear-gradient(#178435, #43b261);
    background: -moz-linear-gradient(#178435, #43b261);
    background: linear-gradient(#178435, #43b261);
}

.blue-btn{
	color: white !important;
    border-radius: 10px;
    background: #00178e;
    background: -webkit-linear-gradient(#0a2cd6, #00178e);
    background: -o-linear-gradient(#0a2cd6, #00178e);
    background: -moz-linear-gradient(#0a2cd6, #00178e);
    background: linear-gradient(#0a2cd6, #00178e);
}

.brown-btn{
    border-radius: 3px;
    border: 1px solid #a17041;
    background: #2392ab;
    background: -webkit-linear-gradient(#fcd8b5, #2392ab);
    background: -o-linear-gradient(#fcd8b5, #2392ab);
    background: -moz-linear-gradient(#fcd8b5, #2392ab);
    background: linear-gradient(#fcd8b5, #2392ab);
}

#content-ordine-popup{
	padding: 7px 13px 7px 13px;
	text-align: center;
}

#content-qrcode{
	text-align: center;
}
.wrapper {
    position: relative;
    width: 100%;
    height:150px;
}
img.classname{
   position:absolute;
   top:50%;
   left:50%;
   -webkit-transform: translate(-50%,-50%); 
   -moz-transform: translate(-50%,-50%);
   -ms-transform: translate(-50%,-50%);
   -o-transform: translate(-50%, -50%);
   transform: translate(-50%,-50%);
}

/* ============================================================ 
   STILI RICEVUTA 80mm
   ============================================================ */
@media print {
    body * {
        visibility: hidden;
    }
    #ricevuta-container-mail, #ricevuta-container-mail * {
        visibility: visible;
    }
    #ricevuta-container-mail {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        padding: 0;
        margin: 0;
        display: block !important;
        background: white;
    }
    .no-print {
        display: none !important;
    }
    @page {
        size: 80mm auto;
        margin: 0;
        padding: 0;
    }
}

.ricevuta-80mm {
    width: 80mm;
    margin: 0 auto;
    padding: 6px 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    box-sizing: border-box;
}
.ricevuta-80mm .header {
    text-align: center;
    border-bottom: 2px dashed #333;
    padding-bottom: 8px;
    margin-bottom: 8px;
}
.ricevuta-80mm .header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}
.ricevuta-80mm .dettagli {
    padding: 5px 0;
    border-bottom: 1px dashed #ccc;
    margin-bottom: 8px;
}
.ricevuta-80mm .dettagli table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}
.ricevuta-80mm .dettagli td {
    padding: 3px 0;
    font-weight: bold;
}
.ricevuta-80mm .dettagli .label {
    font-weight: bold;
    width: 38%;
}
.ricevuta-80mm .dettagli .value {
    font-weight: bold;
    width: 62%;
}
.ricevuta-80mm .qr-section {
    text-align: center;
    padding: 8px 0;
    border-bottom: 1px dashed #ccc;
    margin-bottom: 8px;
}
.ricevuta-80mm .qr-section img {
    width: 140px;
    height: 140px;
    margin: 5px auto;
    display: block;
}
.ricevuta-80mm .qr-section .qr-label {
    font-size: 10px;
    color: #666;
    font-weight: bold;
}
.ricevuta-80mm .footer-text {
    text-align: center;
    padding: 8px 0;
}
.ricevuta-80mm .footer-text .thankyou {
    font-size: 14px;
    font-weight: bold;
    margin: 0;
}