/* Volume Discount Manager - Frontend Styles */

/* Tabella Sconti */
.vdm-volume-discount-table {
    margin: 25px 0;
   
}

.vdm-volume-discount-table .vdm-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3338;
}

.vdm-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 0px;
    overflow: hidden;
}

.vdm-table thead {
    background-color: #fff;
    color: #000;
}

.vdm-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.vdm-table td {
    padding: 12px 15px;
   
}

.vdm-table tbody tr:last-child td {
    border-bottom: none;
}

.vdm-table tbody tr:hover {
    background-color: #f5f5f5;
}


/* Riga con sconto */
.vdm-discount-row {
    
}
.vdm-discount-row td{}

.vdm-discount-row:hover {
    background-color: #e6f4e8 !important;
}

/* Prezzi */
.vdm-original {
    color: #999;
    font-size: 14px;
    margin-right: 8px;
}

.vdm-discounted {
    color: #46b450;
    font-size: 16px;
}

/* Badge Sconto */
.vdm-save .vdm-badge {
    display: inline-block;
    background-color: #46b450;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
}

/* Badge sopra il prezzo */
.vdm-discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    color: black;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    
}

.vdm-discount-badge .vdm-badge-icon {
    font-size: 16px;
    margin-right: 6px;
}

.vdm-discount-badge strong {
    font-weight: 700;
    font-size: 16px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .vdm-volume-discount-table {
        padding: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .vdm-table {
        min-width: 100%;
    }
    
    .vdm-table th,
    .vdm-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .vdm-volume-discount-table .vdm-title {
        font-size: 16px;
    }
    
    .vdm-discount-badge {
        font-size: 13px;
        padding: 8px 12px;
    }
}

@media screen and (max-width: 480px) {
    .vdm-volume-discount-table {
        padding: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .vdm-table {
        min-width: 100%;
    }
    
    .vdm-table th,
    .vdm-table td {
        padding: 8px 6px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .vdm-volume-discount-table .vdm-title {
        font-size: 15px;
    }
    
    .vdm-discount-badge {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .vdm-discount-badge .vdm-badge-icon {
        font-size: 14px;
    }
    
    .vdm-discount-badge strong {
        font-size: 14px;
    }
    
    .vdm-original {
        font-size: 12px;
    }
    
    .vdm-discounted {
        font-size: 14px;
    }
    
    .vdm-save .vdm-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Animazioni */
.vdm-volume-discount-table {
    animation: fadeInUp 0.5s ease-in-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info nel carrello */
.woocommerce-cart-form__cart-item .vdm-discount-info {
    color: #46b450;
    font-weight: 600;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* Prezzo dinamico */
.vdm-dynamic-price-info {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #46b450 0%, #3ba846 100%);
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(70, 180, 80, 0.3);
    animation: slideInDown 0.4s ease-in-out;
}

.vdm-dynamic-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vdm-dynamic-info .vdm-icon {
    font-size: 20px;
}

.vdm-dynamic-info strong {
    font-size: 18px;
}

.vdm-dynamic-info .vdm-saved {
    color: #fff;
    opacity: 0.9;
    font-size: 14px;
}

/* Prezzo dinamico */
.vdm-dynamic-price-info {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #46b450 0%, #3ba846 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(70, 180, 80, 0.3);
    opacity: 0;
    display: none;
}

.vdm-dynamic-price-info.vdm-visible {
    display: block;
    opacity: 1;
    animation: slideInDown 0.3s ease-in-out forwards;
}

.vdm-dynamic-price-info.vdm-hidden {
    animation: fadeOutSmooth 0.3s ease-in-out forwards;
}

@keyframes fadeOutSmooth {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Riga attiva nella tabella */
.vdm-table tbody tr.vdm-active {
    background-color: #fff !important;
    border-left: 4px solid #46b450;
    transition: all 0.3s ease;
}

.vdm-table tbody tr.vdm-active .vdm-badge {
    animation: pulse 1s ease-in-out;
}

/* Messaggio Login Required */
.vdm-login-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px dashed #6c757d;
    border-radius: 8px;
    color: #495057;
    font-size: 14px;
}

.vdm-login-notice .vdm-lock-icon {
    font-size: 20px;
}

.vdm-login-notice .vdm-login-link {
    margin-left: auto;
    background-color: #46b450;
    color: #fff;
    padding: 8px 16px;min-width: 150px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.vdm-login-notice .vdm-login-link:hover {
    background-color: #3a9a42;
    color: #fff;
}

@media screen and (max-width: 480px) {
    .vdm-login-notice {
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
    }
    
    .vdm-login-notice .vdm-login-link {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
}


/* Box Prezzo Totale - Sempre Visibile */
.vdm-dynamic-price-info.vdm-no-discount {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #666;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vdm-dynamic-price-info.vdm-no-discount .vdm-icon {
    opacity: 0.7;
}

.vdm-dynamic-price-info.vdm-no-discount .vdm-hint {
    font-size: 14px;
    font-weight: 500;
}

.vdm-dynamic-price-info.vdm-no-discount .vdm-hint-arrow {
    margin-left: 6px;
    display: inline-block;
    animation: bounceRight 1s ease-in-out infinite;
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

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

