/**
 * Enhanced WooCommerce Notice Styles
 * Designed to match the orange/red color scheme of 365 Nutrition
 */

/* Hide default notices initially for animation */
.woocommerce-notices-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.woocommerce-message {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    border: none;
    border-radius: 12px;
    /* box-shadow: 0 8px 24px rgba(255, 107, 53, 0.25), 
                0 4px 8px rgba(0, 0, 0, 0.1); */
    color: white;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
}

/* Animated background gradient */
.woocommerce-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Success icon */
.woocommerce-message::after {
    content: '✓';
    position: absolute;
    left: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 900;
    color: #ff6b35;
    /* box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3),
                0 4px 12px rgba(0, 0, 0, 0.2); */
    backdrop-filter: blur(10px);
    animation: checkPulse 2s ease-in-out infinite;
}

@keyframes checkPulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.5);
    }
}

/* Adjust text to account for icon */
.woocommerce-message {
    padding-left: 5rem;
    padding-right: 3.5rem;
}

/* View basket button styling */
.woocommerce-message .button.wc-forward {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    background: white;
    color: #ff6b35;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.woocommerce-message .button.wc-forward:hover {
    background: #ff8c42;
    color: white;
    border-color: white;
    transform: translateY(-2px);
}

/* Add arrow icon to button */
.woocommerce-message .button.wc-forward::after {
    content: '→';
    margin-left: 0.5rem;
    font-size: 1.125rem;
    transition: transform 0.3s ease;
}

.woocommerce-message .button.wc-forward:hover::after {
    transform: translateX(4px);
}

/* Close button (optional enhancement) */
.woocommerce-message-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    background: white;
    border: none;
    border-radius: 50%;
    color: #ff6b35;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.3s ease;
    display: none; /* Hidden by default, can be enabled in JS */
}

.woocommerce-message-close:hover {
    opacity: 1;
    background: #fff;
    transform: rotate(90deg) scale(1.15);
    color: #dc2626;
}

/* Error and info notices - keep them styled too */
.woocommerce-error,
.woocommerce-info {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.75rem 1.25rem 4.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.5;
}

.woocommerce-error {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
}

.woocommerce-info {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .woocommerce-message {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem 1.5rem 1.25rem 4rem;
        gap: 1rem;
    }
    
    .woocommerce-message::after {
        left: 1.25rem;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .woocommerce-message-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
    
    .woocommerce-message .button.wc-forward {
        align-self: stretch;
        justify-content: center;
        width: 100%;
    }
}

/* Ensure message is visible when JS doesn't load */
.no-js .woocommerce-message {
    opacity: 1;
    transform: translateY(0);
}
