/* === STILI SISTEMA PREVENTIVO B2B === */

/* Prezzo nascosto per utenti non loggati */
.panfix-hidden-price {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: pulse-gentle 2s infinite;
}

@keyframes pulse-gentle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Contenitore campo note preventivo */
.panfix-quote-notes-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Label campo note preventivo */
.panfix-quote-notes-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 16px;
}

.panfix-quote-notes-label .required {
    color: #e74c3c;
    font-weight: bold;
}

/* Textarea note preventivo */
#panfix_quote_notes {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
}

#panfix_quote_notes:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#panfix_quote_notes:invalid {
    border-color: #e74c3c;
}

#panfix_quote_notes::placeholder {
    color: #999;
    font-style: italic;
}

/* Messaggio di errore */
.panfix-error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    display: block;
}

/* Badge richiesta preventivo */
.panfix-quote-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-left: 10px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Pulsante richiedi preventivo */
.single_add_to_cart_button,
button.single_add_to_cart_button {
    background: linear-gradient(135deg, #007cba, #005a87) !important;
    border: none !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.single_add_to_cart_button:hover,
button.single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #005a87, #004065) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.3) !important;
}

.single_add_to_cart_button:before,
button.single_add_to_cart_button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.single_add_to_cart_button:hover:before,
button.single_add_to_cart_button:hover:before {
    left: 100%;
}

/* Stili per il carrello con preventivi */
.cart .panfix-quote-badge {
    margin-left: 0;
    margin-top: 5px;
}

/* Stili responsive */
@media (max-width: 768px) {
    .panfix-quote-notes-wrapper {
        margin: 15px 0;
        padding: 15px;
    }
    
    #panfix_quote_notes {
        min-height: 80px;
    }
    
    .panfix-hidden-price {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .panfix-quote-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Animazione per campo note quando obbligatorio */
.panfix-quote-notes-wrapper.required-highlight {
    animation: shake 0.5s ease-in-out;
    border-color: #e74c3c;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Stili per la pagina di checkout con preventivi */
.woocommerce-checkout .panfix-quote-badge {
    margin: 5px 0;
}

/* Icona per il campo note */
.panfix-quote-notes-label:before {
    content: "📝";
    margin-right: 8px;
    font-size: 18px;
}

/* Effetto focus migliorato */
#panfix_quote_notes:focus + .panfix-error-message {
    display: none !important;
}

/* Indicatore caratteri rimanenti */
.panfix-char-counter {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.panfix-char-counter.warning {
    color: #f39c12;
}

.panfix-char-counter.error {
    color: #e74c3c;
}


/* Prezzo nascosto per utenti non loggati - Pagine prodotto */
.panfix-hidden-price {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: pulse-gentle 2s infinite;
}

/* Prezzo nascosto per utenti non loggati - Carrello */
.panfix-hidden-price-cart {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes pulse-gentle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Contenitore campo note preventivo */
.panfix-quote-notes-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Label campo note preventivo */
.panfix-quote-notes-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 16px;
}

.panfix-quote-notes-label .required {
    color: #e74c3c;
    font-weight: bold;
}

/* Textarea note preventivo */
#panfix_quote_notes {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
}

#panfix_quote_notes:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#panfix_quote_notes:invalid {
    border-color: #e74c3c;
}

#panfix_quote_notes::placeholder {
    color: #999;
    font-style: italic;
}

/* Messaggio di errore */
.panfix-error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    display: block;
}

/* Badge richiesta preventivo */
.panfix-quote-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-left: 10px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Pulsante richiedi preventivo */
.single_add_to_cart_button,
button.single_add_to_cart_button {
    background: linear-gradient(135deg, #007cba, #005a87) !important;
    border: none !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.single_add_to_cart_button:hover,
button.single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #005a87, #004065) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.3) !important;
}

.single_add_to_cart_button:before,
button.single_add_to_cart_button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.single_add_to_cart_button:hover:before,
button.single_add_to_cart_button:hover:before {
    left: 100%;
}

/* Stili specifici per il carrello */
.woocommerce-cart-form .cart_item .panfix-hidden-price-cart {
    display: block;
    margin: 5px 0;
    animation: pulse-gentle 3s infinite;
}

.cart-collaterals .cart_totals .panfix-hidden-price-cart {
    font-size: 16px;
    padding: 8px 16px;
}

/* Nascondere elementi del carrello per utenti non loggati */
.woocommerce-cart-form .cart_item .product-remove {
    opacity: 0.5;
}

.woocommerce-cart-form .cart_item .product-quantity input {
    pointer-events: none;
    opacity: 0.7;
}

/* Stili per il checkout */
.woocommerce-checkout .panfix-hidden-price-cart {
    font-size: 14px;
    margin: 2px 0;
}

/* Messaggi informativi per carrello */
.panfix-cart-info-message {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.panfix-cart-info-message::before {
    content: "ℹ️";
    margin-right: 10px;
    font-size: 18px;
}

/* Stili responsive per carrello */
@media (max-width: 768px) {
    .panfix-hidden-price-cart {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .cart-collaterals .cart_totals .panfix-hidden-price-cart {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .panfix-cart-info-message {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Animazione per evidenziare i prezzi nascosti nel carrello */
.panfix-hidden-price-cart:hover {
    transform: scale(1.05);
    animation: none;
}

/* Stili per tabella carrello */
.woocommerce-cart-form table.cart .panfix-hidden-price-cart {
    white-space: nowrap;
}

/* Icona per il campo note */
.panfix-quote-notes-label:before {
    content: "📝";
    margin-right: 8px;
    font-size: 18px;
}

/* Effetto focus migliorato */
#panfix_quote_notes:focus + .panfix-error-message {
    display: none !important;
}

/* Indicatore caratteri rimanenti */
.panfix-char-counter {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.panfix-char-counter.warning {
    color: #f39c12;
}

.panfix-char-counter.error {
    color: #e74c3c;
}

/* Animazione per campo note quando obbligatorio */
.panfix-quote-notes-wrapper.required-highlight {
    animation: shake 0.5s ease-in-out;
    border-color: #e74c3c;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

