/**
 * WooCommerce Notices - Premium Styling
 * 
 * Beautiful, visible alerts for success, error, and info messages
 * on product pages, checkout, and throughout the site.
 * 
 * @package Alquraychi_House
 * @author Ravares
 */

/* ==========================================================================
   WooCommerce Notices Container
   ========================================================================== */

.woocommerce-notices-wrapper {
    position: relative;
    z-index: 999;
    margin-bottom: 30px;
}

/* Make notices visible and prominent */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.wc-block-components-notice-banner {
    position: relative;
    padding: 18px 24px 18px 60px;
    margin: 15px 0;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
    display: flex !important;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    animation: slideInDown 0.4s ease-out;
    border: 2px solid;
}

/* Icon before notices */
.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ==========================================================================
   Success Messages (Green) - Styled for Luxury Theme
   ========================================================================== */

.woocommerce-message {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    color: #fff !important;
    backdrop-filter: blur(10px);
    border-radius: 8px !important;
    padding: 12px 16px 12px 48px !important;
    font-size: 13px !important;
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.woocommerce-message::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23d4af37' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    width: 18px !important;
    height: 18px !important;
    left: 16px !important;
}

/* "View Cart" Button inside message */
.woocommerce-message .button, 
.woocommerce-message .wc-forward {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    padding: 6px 16px !important;
    border-radius: 100px !important;
    margin-left: auto !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    float: right;
}

.woocommerce-message .button:hover,
.woocommerce-message .wc-forward:hover {
    background: rgba(212, 175, 55, 0.2) !important;
    border-color: #d4af37 !important;
    color: #d4af37 !important;
    transform: translateY(0) !important;
    box-shadow: none !important;
}

.woocommerce-message a {
    color: #d4af37 !important;
    text-decoration: none !important;
    font-weight: 600;
}

.woocommerce-message a:hover {
    text-decoration: underline !important;
}

/* ==========================================================================
   Error Messages (Red) - Styled for Luxury Theme
   ========================================================================== */

.woocommerce-error {
    background: rgba(220, 53, 69, 0.1) !important;
    border: 1px solid rgba(220, 53, 69, 0.4) !important;
    color: #ffcccc !important;
    backdrop-filter: blur(10px);
    border-radius: 8px !important;
    padding: 12px 16px 12px 48px !important;
    font-size: 13px !important;
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.woocommerce-error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ef4444' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
    width: 18px !important;
    height: 18px !important;
    left: 16px !important;
}

.woocommerce-error li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-error li::before {
    display: none !important;
}

.woocommerce-error ul {
    margin: 0;
    padding: 0;
}

/* "View Cart" Button inside error */
.woocommerce-error .button, 
.woocommerce-error .wc-forward {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    padding: 6px 16px !important;
    border-radius: 100px !important;
    margin-left: auto !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    float: right;
}

.woocommerce-error .button:hover,
.woocommerce-error .wc-forward:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    transform: translateY(0) !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Info Messages (Blue) - Styled for Luxury Theme
   ========================================================================== */

.woocommerce-info {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    backdrop-filter: blur(10px);
    border-radius: 8px !important;
    padding: 12px 16px 12px 48px !important;
    font-size: 13px !important;
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.woocommerce-info::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
    width: 18px !important;
    height: 18px !important;
    left: 16px !important;
    opacity: 0.7;
}

.woocommerce-info .button, 
.woocommerce-info .wc-forward {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    padding: 6px 16px !important;
    border-radius: 100px !important;
    margin-left: auto !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    float: right;
}

.woocommerce-info .button:hover,
.woocommerce-info .wc-forward:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #fff !important;
    color: #fff !important;
    transform: translateY(0) !important;
    box-shadow: none !important;
}

.woocommerce-info a {
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
}

.woocommerce-info a:hover {
    text-decoration: underline !important;
}

/* ==========================================================================
   Additional WooCommerce Notices
   ========================================================================== */

/* Coupon messages */
.woocommerce-message[role="alert"] {
    display: flex !important;
}

/* Cart empty message */
.cart-empty,
.woocommerce-info.wc-block-components-notice-banner {
    text-align: center;
    padding: 30px;
    font-size: 16px;
}

/* Return to shop button */
.return-to-shop {
    margin-top: 20px;
}

.return-to-shop a {
    background: #d4af37;
    color: #0a0a0a;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.return-to-shop a:hover {
    background: #b8972f;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   Checkout Page Specific
   ========================================================================== */

.woocommerce-checkout .woocommerce-NoticeGroup {
    margin-bottom: 30px;
}

.woocommerce-checkout .woocommerce-error {
    margin: 20px 0;
}

/* Form validation errors */
.woocommerce-invalid-required-field,
.woocommerce-invalid {
    border-color: #dc3545 !important;
}

.woocommerce-validated {
    border-color: #28a745 !important;
}

/* ==========================================================================
   Product Page Specific
   ========================================================================== */

.single-product .woocommerce-notices-wrapper {
    margin-bottom: 40px;
}

.single-product .woocommerce-message {
    font-size: 16px;
    padding: 20px 24px 20px 65px;
}

/* ==========================================================================
   Cart Page Specific
   ========================================================================== */

.woocommerce-cart .woocommerce-message {
    margin: 25px 0;
}

/* Update cart notice */
.woocommerce-cart-form .woocommerce-message {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   Close/Dismiss Button
   ========================================================================== */

.woocommerce-message .woocommerce-Button,
.woocommerce-info .woocommerce-Button {
    margin-left: auto;
}

/* If theme has dismiss button */
.woocommerce-message .close,
.woocommerce-error .close,
.woocommerce-info .close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.woocommerce-message .close:hover,
.woocommerce-error .close:hover,
.woocommerce-info .close:hover {
    opacity: 1;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Pulse attention animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.woocommerce-error {
    animation: slideInDown 0.4s ease-out, pulse 0.5s 0.4s ease-out;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 768px) {

    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info {
        padding: 15px 20px 15px 50px;
        font-size: 14px;
        margin: 12px 0;
    }

    .woocommerce-message::before,
    .woocommerce-error::before,
    .woocommerce-info::before {
        left: 15px;
        width: 20px;
        height: 20px;
    }

    .woocommerce-message .button {
        margin-left: 10px;
        padding: 6px 15px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Dark Mode Support (if applicable)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .woocommerce-message {
        background: linear-gradient(135deg, #1e4620 0%, #2d5a2e 100%);
        color: #c3e6cb;
        border-color: #3d9b4d;
    }

    .woocommerce-error {
        background: linear-gradient(135deg, #4a1e1e 0%, #5a2d2d 100%);
        color: #f5c6cb;
        border-color: #c33545;
    }

    .woocommerce-info {
        background: linear-gradient(135deg, #1e3a4a 0%, #2d4a5a 100%);
        color: #bee5eb;
        border-color: #3d8b9b;
    }
}

/* ==========================================================================
   High Contrast for Accessibility
   ========================================================================== */

@media (prefers-contrast: high) {

    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info {
        border-width: 3px;
        font-weight: 600;
    }
}

/* ==========================================================================
   Force Visibility (Critical)
   ========================================================================== */

/* Ensure notices are never hidden */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

/* Override theme hiding */
body .woocommerce-message,
body .woocommerce-error,
body .woocommerce-info {
    display: flex !important;
}

/* User Requested Override */
ul.woocommerce-error {
    overflow: hidden !important;
}
