/**
 * css/custom/checkout.css
 * Stili personalizzati per la pagina di checkout / conferma ordine
 * Adattato agli standard di stile Odoo
 * 
 * @package ItticiSurgelati
 */

/* ============================================
   VARIABILI
   ============================================ */
.checkout-shopping-cart {
    --checkout-bg           : #ffffff;
    --checkout-border       : #e9e9e9;
    --checkout-text         : #182931;
    --checkout-title        : #182931;
    --checkout-unit-price   : #ff5f1f;
    --checkout-um-base      : #182931;
    --checkout-value        : #ff5f1f;
    --checkout-cart-hover   : #f1f1f1;
    --checkout-button-hover : #ff5f1f;
    --checkout-border-hover : #ff5f1f;

}




.gp-checkout-page {
    padding-top    : 32px;
    padding-bottom : 32px;
}

.gp-checkout-layout {
    max-width : 1440px;
    margin    : 0 auto;

    display   : grid;
    grid-template-columns : minmax(0, 1fr) minmax(0, 1fr);
    gap       : 48px;

    align-items : flex-start;
}

.gp-checkout-customer-col,
.gp-checkout-order-col {
    min-width: 0;
}

.gp-checkout-card {
    margin-bottom : 32px;
}

.gp-delivery-box {
    display         : grid;
    gap             : 6px;
    padding         : 18px 22px;
    border          : 1px solid var(--gp-input-border);
    border-radius   : var(--gp-radius-lg);
    background      : var(--gp-white-soft);
}

.gp-delivery-label {
    color       : var(--gp-text-secondary);
    font-size   : 15px;
    font-weight : 500;
}

.gp-delivery-date {
    color       : var(--gp-accent);
    font-size   : 28px;
    font-weight : 600;
    line-height : 1.2;
}



/* ============================================
   COLONNA DESTRA - RIEPILOGO ORDINE
   ============================================ */
.gp-checkout-page .gp-checkout-order-box .header {

    margin-top      : 20px !important;               
    padding-top     : 6px !important;

    font-size       : 34px !important;
    font-weight     : 300 !important;
    line-height     : 1.2 !important;

    color           : #111 !important;;

    white-space     : nowrap !important;
    overflow        : hidden !important;
    text-overflow   : ellipsis !important;
}



/* ... CONTAINER PRINCIPALE ITEMS */
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items {
    margin-top      : 0px;
    max-height      : 405px !important;
    overflow-y      : auto !important;
    padding         : 8px 0 !important;
}

/* ... SINGOLO ITEM - ALTEZZA FISSA */
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .tf-mini-cart-item {

    display         : flex !important;
    min-height      : 95px !important;
    max-height      : 95px !important;
    margin-bottom   : 2px !important;

    background-color  : #fff;

    border-bottom   : 1px solid var(--odoo-border-color) !important;

    padding         : 0 !important;
    align-items     : center !important;
    overflow        : hidden !important;
}

.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .tf-mini-cart-item:hover {
    background-color     : #e3e3e3;

}


/* ... IMMAGINE */
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .tf-mini-cart-image {

    flex-shrink     : 0 !important;

    width           : 75px !important;
    height          : 75px !important;
 
    margin-left     : 10px;


    border-radius   : 12px;
    overflow        : hidden;
    background      : #f8f8f8;
    display         : flex;
    align-items     : center;
    justify-content : center;
}

.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .tf-mini-cart-image img {
    width           : 100% !important;
    height          : 100% !important;
    object-fit      : contain !important;
}


/* ... INFO PRODOTTO */
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .tf-mini-cart-info {
    flex            : 1 !important;

    margin-left     : -10px;

    padding         : 0px 0px 0 0px !important;   

    overflow        : hidden !important;
    display         : flex !important;
    flex-direction  : column !important;
    justify-content : flex-start !important;    

    height          : 100% !important;
}

/* ... TITOLO */
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .title {

    padding-top     : 6px !important;

    font-size       : 14px !important;
    font-weight     : 500 !important;
    margin          : 0 !important;               
    line-height     : 1.2 !important;
    white-space     : nowrap !important;
    overflow        : hidden !important;
    text-overflow   : ellipsis !important;
}

/* ... PREZZO UNITARIO */
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .cart-item-unit-price .unit-price-value {

    margin          : -10px 0 0 0!important;

    padding         : 0 !important;
    font-size       : 15px !important;
    line-height     : 1.0 !important;
    white-space     : nowrap !important;
    color           : var(--odoo-brand-accent) !important;
}
/* PREZZO UNITARIO - UM */
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .cart-item-unit-price .unit-price-umbase {
    margin          : -5px 0 0 0 !important;
    padding         : 0 !important;
    font-size       : 11px !important;
    line-height     : 1.2 !important;
    white-space     : nowrap !important;
    /** color           : var(--odoo-brand-accent) !important; */ 
}

/* ... DETTAGLI VARIABILI */
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .cart-item-details {
    margin          : -10px 0 !important;  /* Margine negativo verticale */
    padding         : 0 !important;
    line-height     : 1 !important;           
    white-space     : nowrap !important;    
}

.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .detail-row {
    display         : inline-flex !important;
    margin-top      : -5px !important;  
    margin-bottom   : -2px !important;  
    padding         : 0 !important;
    line-height     : 1 !important;           
    font-size       : 10px !important;
    white-space     : nowrap !important;
}

.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .detail-label {
    min-width       : auto !important;
    font-size       : 12px !important;
    line-height     : 1 !important;           
    margin          : 0 !important;
    padding         : 0 !important;
}

.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .detail-value {
    font-size       : 12px !important;
    line-height     : 1 !important;           
    margin          : 0 !important;
    padding         : 0 !important;
}



/* ============================================
    TOTALI SINGOLO ITEM DEL CARRELLO  
   ============================================ */

.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .cart-item-total {

    display         : flex !important;
    align-items     : center !important;

    gap             : 0px !important;
    margin          : 0 !important;

    padding         : 6px 0 0 0 !important;

}

/** ... TOTALE ITEM QUANTITA' */ 
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .total-quantity {
    padding         : 2px 0px !important;
    white-space     : nowrap !important;

}
/** ... TOTALE ITEM QUANTITA' - LABEL */ 
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .quantity-label {
    font-size       : 14px !important;
    color           : var(--odoo-text-primary);

}
/** ... TOTALE ITEM QUANTITA' - NUMBER */ 
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .quantity-number {
    font-size       : 15px !important;
    color           : var(--odoo-brand-accent) !important;
}
/** ... TOTALE ITEM QUANTITA' - UNITA' DI MISIRA */ 
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .quantity-umbase {
    font-size       : 12px !important;
    color           : var(--odoo-text-primary);
}

/** ... TOTALE ITEM IMPORTO - LABEL */ 
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .total-label {
    font-size       : 15px !important;
    margin-left     : auto !important;
    color           : var(--odoo-text-primary);
}

/** ... TOTALE ITEM IMPORTO - VALORE */ 
.gp-checkout-page .gp-checkout-order-box .checkout-cart-items .total-value {

    margin-left     : -50px;

    font-size       : 24px !important;
    font-weight     : 600 !important;

    white-space     : nowrap !important;

    color           : var(--odoo-brand-accent) !important;
}


/* ============================================
    TOTALI GENERALI ORDINE  
   ============================================ */
.gp-checkout-page .gp-checkout-order-box .checkout-cart-bottom {
    margin-top      : 16px !important;
    padding-top     : 12px !important;
    border-top      : 1px solid var(--odoo-border-color) !important;
}

.gp-checkout-page .gp-checkout-order-box .tf-mini-cart-threshold {
    margin-bottom   : 12px !important;
}


.gp-checkout-page .gp-checkout-order-box .tf-mini-cart-threshold .text {
    display         : flex;
    align-items     : baseline;
    gap             : 8px;
}


/** ... TOTALE NUMERO PRODOTTI - LABEL */ 
.gp-checkout-page .gp-checkout-order-box .total-ord-items-label {
    font-size       : 14px !important;
    font-weight     : 500 !important;
    color           : var(--odoo-text-secondary) !important;
    margin          : 0 !important;
}

/** ... TOTALE NUMERO PRODOTTI - VALORE */ 
.gp-checkout-page .gp-checkout-order-box .total-ord-items-value {
    font-size       : 15px !important;
    font-weight     : 500 !important;
    color           : var(--odoo-brand-accent) !important;
    margin          : 0 !important;

    
}

/** ... TOTALE IMPORTO ORDINE - LABEL */ 
.gp-checkout-page .gp-checkout-order-box .total-ord-label {
    margin-left : auto !important;
    font-size   : 24px;
    font-weight : 500;
    color       : var(--odoo-text-secondary);
}

/** ... TOTALE IMPORTO ORDINE - VALORE */ 
.gp-checkout-page .gp-checkout-order-box .total-ord-price {
    font-size   : 30px;
    font-weight : 600;
    color       : var(--odoo-brand-accent);

}



/* ============================================
   BOTTONE CONFERMA ORDINE 
   ============================================ */
.gp-checkout-page .gp-checkout-order-box .btn-checkout-order {
    display         : block !important;
    width           : 100% !important;
    padding         : 12px 20px !important;
    background      : var(--odoo-brand-accent) !important;
    color           : #fff !important;
    text-align      : center !important;
    text-decoration : none !important;
    font-size       : 18px !important;
    font-weight     : 600 !important;
    border-radius   : 28px !important;
    transition      : all 0.2s ease !important;
}

.gp-checkout-page .gp-checkout-order-box .btn-checkout-order:hover {

    background      : var(--odoo-brand-accent) !important;

}

.gp-checkout-page .gp-checkout-order-box .btn-checkout-order.disabled {
    background      : #ccc !important;
    cursor          : not-allowed !important;
    opacity         : 0.6 !important;
}



@media (max-width: 991px) {
    .gp-checkout-layout {
        grid-template-columns : 1fr;
        gap                   : 32px;
    }
}

@media (max-width: 768px) {
    .gp-checkout-page {
        padding-top    : 24px;
        padding-bottom : 24px;
    }

    .gp-delivery-date {
        font-size: 22px;
    }
}