/* Cart view specific styles (extracted from Blade to improve maintainability) */

:root {
    --cart-theme-bg: #5a8af4;
    --cart-theme-font: #ffffff;
}

.cart-hidden {
    display: none;
}

.cart-recommended-col {
    padding: 0;
}

.summary-label--icon {
    display: flex;
    align-items: center;
}

.summary-icon--primary {
    color: #5a8af4;
}

.summary-icon--warning {
    color: #f39c12;
}

.summary-icon--success {
    color: #27ae60;
}

.summary-value--warning {
    color: #f39c12;
}

.no-stock-product {
    border: 2px solid #ffc107 !important;
    background: linear-gradient(135deg, #fff9e6, #fff3cd) !important;
    position: relative;
    opacity: 0.9;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2) !important;
    transition: all 0.3s ease;
}

.no-stock-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #333;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    animation: cartGentlePulse 3s infinite;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0a800;
}

.no-stock-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
    background: linear-gradient(135deg, #e0a800, #d39e00);
}

.no-stock-product .delete-product-btn {
    color: #fff !important;
    border: 2px solid #dc3545 !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
    animation: cartDeleteButtonPulse 2s infinite;
    z-index: 15 !important;
}

.no-stock-product .delete-product-btn:hover {
    background: #c82333 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5) !important;
}

.no-stock-icon i {
    font-size: 14px;
    animation: cartShake 1.5s infinite;
}

.no-stock-icon span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-stock-product .product-details {
    filter: grayscale(30%);
}

.no-stock-product .product-image img {
    filter: grayscale(50%) opacity(0.7);
}

.no-stock-product .quantity-controls {
    pointer-events: none;
    opacity: 0.5;
}

.no-stock-product::after {
    content: "Stock limitado - Haz clic en el icono amarillo para mas informacion o elimina el producto";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #fff, #ffda6c);
    color: #333;
    text-align: center;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.stock-info-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: cartFadeIn 0.3s ease;
}

.stock-info-modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: cartSlideIn 0.3s ease;
    overflow: hidden;
}

.stock-info-header {
    background: linear-gradient(135deg, #5a8af4, #4a7bd8);
    color: #fff;
    padding: 15px 20px;
    text-align: center;
    position: relative;
}

.stock-info-header--theme {
    background: var(--cart-theme-bg);
    color: var(--cart-theme-font);
}

.stock-info-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: inherit;
}

.stock-info-header .close {
    position: absolute;
    right: 15px;
    top: 6px;
    color: inherit;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.stock-info-header .close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.stock-info-body {
    padding: 20px;
    text-align: center;
}

.stock-info-icon {
    font-size: 40px;
    color: #5a8af4;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.stock-info-body h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.stock-info-body p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 14px;
}

.stock-info-detailed-card {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
}

.stock-info-detailed-text {
    margin: 0;
    font-size: 14px;
    color: #856404;
}

.stock-info-actions {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.stock-info-actions-title {
    margin: 0 0 10px;
    font-weight: 600;
    color: #495057;
}

.stock-info-actions-item {
    margin: 5px 0;
    font-size: 14px;
}

.stock-info-footer {
    padding: 0 20px 20px;
    text-align: center;
}

.btn-understand {
    background: linear-gradient(135deg, #5a8af4, #4a7bd8);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-understand:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 138, 244, 0.4);
}

.btn-understand--confirm {
    background: #007bff;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 500;
}

.whatsapp-contact {
    background: #25d366;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    margin-right: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.whatsapp-contact:hover {
    background: #20b858;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    color: #fff;
    text-decoration: none;
}

.whatsapp-contact--modal {
    margin-left: 10px;
    margin-right: 0;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .no-stock-icon {
        top: -8px;
        left: -8px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .no-stock-icon i {
        font-size: 12px;
    }

    .no-stock-icon span {
        font-size: 10px;
    }

    .no-stock-product::after {
        font-size: 10px;
        padding: 4px 8px;
    }

    .whatsapp-contact--modal {
        margin-left: 0;
        margin-top: 10px;
    }
}

@keyframes cartGentlePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 3px 10px rgba(255, 193, 7, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    }
}

@keyframes cartDeleteButtonPulse {
    0% {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    }

    50% {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
    }

    100% {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    }
}

@keyframes cartShake {
    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(2px);
    }
}

@keyframes cartFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes cartSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}
