/**
 * WooCommerce Notices Styles
 *
 * @package MG_Red_Line
 * @version 2.3.2
 */

/* === WOOCOMMERCE NOTICES === */

.woocommerce-notices-wrapper {
    margin: 20px 0;
    position: relative;
    z-index: 100;
}

/* Base notice - flexbox layout */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    position: relative;
    border-radius: 12px;
    padding: 16px 20px 16px 60px;
    margin-bottom: 15px;
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Success */
.woocommerce-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Info */
.woocommerce-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Error */
.woocommerce-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.woocommerce-error li {
    list-style: none;
}

/* Icons - absolute, vertically centered */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce-message::before {
    content: '\f00c';
    color: #28a745;
    background: rgba(40, 167, 69, 0.15);
}

.woocommerce-info::before {
    content: '\f05a';
    color: #17a2b8;
    background: rgba(23, 162, 184, 0.15);
}

.woocommerce-error::before {
    content: '\f071';
    color: #dc3545;
    background: rgba(220, 53, 69, 0.15);
}

/* Buttons - flex item */
.woocommerce-message a.button,
.woocommerce-message a.wc-forward,
.woocommerce-message a.restore-item,
.woocommerce-info a.button,
.woocommerce-info a.wc-forward,
.woocommerce-error a.button,
.woocommerce-error a.wc-forward {
    display: inline-block;
    background: var(--white);
    color: var(--dark-color);
    padding: 8px 16px;
    margin: 0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

.woocommerce-message a.button:hover,
.woocommerce-message a.wc-forward:hover,
.woocommerce-message a.restore-item:hover {
    background: #28a745;
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.woocommerce-info a.button:hover,
.woocommerce-info a.wc-forward:hover {
    background: #17a2b8;
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.woocommerce-error a.button:hover,
.woocommerce-error a.wc-forward:hover {
    background: #dc3545;
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Cart/Checkout notices */
.woocommerce-cart .woocommerce-notices-wrapper,
.woocommerce-checkout .woocommerce-notices-wrapper {
    margin: 30px 0;
}

/* Block notices */

/* === MOBILE === */

@media (max-width: 768px) {
    .woocommerce-notices-wrapper {
        margin: 15px 0;
    }

    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error {
        padding: 14px 16px 14px 52px;
        font-size: 0.95rem;
    }

    .woocommerce-message::before,
    .woocommerce-info::before,
    .woocommerce-error::before {
        left: 12px;
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .woocommerce-message a.button,
    .woocommerce-message a.wc-forward,
    .woocommerce-message a.restore-item,
    .woocommerce-info a.button,
    .woocommerce-info a.wc-forward,
    .woocommerce-error a.button,
    .woocommerce-error a.wc-forward {
        padding: 6px 12px;
        font-size: 0.85rem;
        margin-left: 10px;
    }
}

@media (max-width: 600px) {
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error {
        border-radius: 8px;
        padding: 12px 14px 12px 46px;
        font-size: 0.9rem;
        line-height: 1.5;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .woocommerce-message::before,
    .woocommerce-info::before,
    .woocommerce-error::before {
        left: 10px;
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
        top: 16px;
        transform: none;
    }

    .woocommerce-message a.button,
    .woocommerce-message a.wc-forward,
    .woocommerce-message a.restore-item,
    .woocommerce-info a.button,
    .woocommerce-info a.wc-forward,
    .woocommerce-error a.button,
    .woocommerce-error a.wc-forward {
        margin: 0;
        text-align: center;
    }
}

/* Animation */
@keyframes noticeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    animation: noticeSlideIn 0.3s ease-out;
}
