/**
 * 2023-2025 DGTS SRLS
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 *
 * @author    ing. Giuseppe D'Onofrio <info@digitallsolutions.it>
 * @copyright 2023-2025 DGTS SRLS
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 * @package   dgtscartalert
 */

.dgts-cart-alert {
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Effetto pulsazione del bordo */
.dgts-cart-alert:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 10px;
    background: linear-gradient(45deg, #ff8a00, #e52e71, #2196f3, #00d084);
    background-size: 400% 400%;
    z-index: -1;
    animation: gradientBorder 3s ease infinite;
    opacity: 0.7;
}

/* Animazione di entrata */
.dgts-cart-alert.animated {
    animation: bounceInRight 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

.dgts-cart-alert .alert-content {
    display: flex;
    align-items: center;
    padding: 15px;
    position: relative;
    z-index: 1;
}

.dgts-cart-alert .alert-icon {
    margin-right: 15px;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    min-width: 50px; /* Assicura che l'icona mantenga la sua larghezza */
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    animation: pulse 2s infinite;
}

.dgts-cart-alert .alert-message {
    flex: 1;
}

.dgts-cart-alert .alert-message p {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
}

.dgts-cart-alert .alert-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    animation: slideInUp 0.5s ease-in-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.dgts-cart-alert .btn {
    padding: 10px 18px;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: none;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.dgts-cart-alert .btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: -1;
}

.dgts-cart-alert .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.2);
}

.dgts-cart-alert .btn:hover:before {
    width: 100%;
}

.dgts-cart-alert .btn-primary {
    background: linear-gradient(45deg, #2196f3, #00bcd4);
    border: none;
}

.dgts-cart-alert .btn-secondary {
    background: linear-gradient(45deg, #ff9800, #ff5722);
    border: none;
    color: white;
}

.dgts-cart-alert .cart-summary-container {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-top: 10px;
    animation: fadeIn 0.5s ease-in-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.dgts-cart-alert .cart-summary-header h4 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
}

.dgts-cart-alert .cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dgts-cart-alert .cart-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dgts-cart-alert .cart-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transform: translateX(5px);
}

.dgts-cart-alert .cart-item:last-child {
    border-bottom: none;
}

.dgts-cart-alert .item-name {
    flex: 1;
    font-weight: 500;
}

.dgts-cart-alert .item-quantity {
    margin: 0 10px;
    color: rgba(0, 0, 0, 0.6);
}

.dgts-cart-alert .item-price {
    font-weight: 600;
}

/* Animazioni */
@keyframes bounceInRight {
    0% {
        opacity: 0;
        transform: translateX(300px);
    }
    60% {
        opacity: 1;
        transform: translateX(-20px);
    }
    80% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(0);
    }
}

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes gradientBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Mobile responsive styles */
@media (max-width: 767px) {
    .dgts-cart-alert .alert-content {
        flex-direction: column;
        text-align: center;
    }
    
    .dgts-cart-alert .alert-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .dgts-cart-alert .alert-actions {
        justify-content: center;
    }
    
    .dgts-cart-alert .cart-item {
        flex-direction: column;
        text-align: center;
        padding: 10px 0;
    }
    
    .dgts-cart-alert .item-quantity,
    .dgts-cart-alert .item-price {
        margin-top: 5px;
    }
}
