/**
 * WooCommerce Notices Modal Popup Styles
 */

/* Modal Container */
.wc-notices-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wc-notices-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Overlay */
.wc-notices-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.wc-notices-modal.is-active .wc-notices-modal__overlay {
    opacity: 1;
}

/* Modal Container */
.wc-notices-modal__container {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 24px auto 0;
    transform: translateY(-120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.wc-notices-modal.is-active .wc-notices-modal__container {
    transform: translateY(0);
}

/* Modal Content */
.wc-notices-modal__content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    direction: rtl;
    text-align: right;
    font-family: Ravi, sans-serif;
    display: flex;
    flex-direction: column;
}

/* Success Style */
.wc-notices-modal__content--success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.wc-notices-modal__content--success .wc-notices-modal__icon {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.wc-notices-modal__content--success .wc-notices-modal__message {
    color: #166534;
}

.wc-notices-modal__content--success .wc-notices-modal__timer-bar {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

/* Error Style */
.wc-notices-modal__content--error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.wc-notices-modal__content--error .wc-notices-modal__icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.wc-notices-modal__content--error .wc-notices-modal__message {
    color: #991b1b;
}

.wc-notices-modal__content--error .wc-notices-modal__timer-bar {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* Info Style */
.wc-notices-modal__content--info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.wc-notices-modal__content--info .wc-notices-modal__icon {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.wc-notices-modal__content--info .wc-notices-modal__message {
    color: #1e40af;
}

.wc-notices-modal__content--info .wc-notices-modal__timer-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

/* Icon Container */
.wc-notices-modal__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 0;
}

.wc-notices-modal__icon svg {
    width: 24px;
    height: 24px;
}

/* Message Wrapper */
.wc-notices-modal__message-wrapper {
    display: flex;
    align-items: center;
    padding: 14px 20px 14px 16px;
    gap: 12px;
}

/* Message Content */
.wc-notices-modal__message {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
    font-family: Ravi, sans-serif;
    text-align: right;
    margin: 0;
}

.wc-notices-modal__message ul {
    margin: 8px 0 0 0;
    padding-right: 20px;
    list-style: none;
}

.wc-notices-modal__message li {
    margin-bottom: 4px;
}

.wc-notices-modal__message li::marker {
    display: none;
    content: '';
}

.wc-notices-modal__message a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.wc-notices-modal__message a:hover {
    opacity: 0.8;
}

/* Timer Bar */
.wc-notices-modal__timer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border-radius: 0 0 16px 16px;
}

.wc-notices-modal__timer-bar {
    height: 100%;
    width: 100%;
    transform-origin: right;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

/* Hide original notices - hide all WooCommerce notices by default */
.woocommerce-notices-wrapper:not(.wc-notice-keep),
.woocommerce-error:not(.wc-notice-keep),
.woocommerce-message:not(.wc-notice-keep),
.woocommerce-info:not(.wc-notice-keep) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.woocommerce-notices-wrapper.wc-notice-processed,
.woocommerce-error.wc-notice-processed,
.woocommerce-message.wc-notice-processed,
.woocommerce-info.wc-notice-processed {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Body class when modal is open - prevent scrolling */
html.wc-notices-modal-open {
    overflow: hidden !important;
}

body.wc-notices-modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-notices-modal {
        top: auto;
        bottom: 0;
        align-items: flex-end;
    }

    .wc-notices-modal__container {
        max-width: calc(100% - 24px);
        margin: 0 auto 20px;
        transform: translateY(120%);
    }

    .wc-notices-modal.is-active .wc-notices-modal__container {
        transform: translateY(0);
    }

    .wc-notices-modal__content {
        border-radius: 14px;
    }

    .wc-notices-modal__message-wrapper {
        padding: 12px 16px 12px 14px;
        gap: 10px;
    }

    .wc-notices-modal__message {
        font-size: 13px;
        line-height: 1.5;
    }

    .wc-notices-modal__icon {
        width: 36px;
        height: 36px;
        margin-left: 0;
    }

    .wc-notices-modal__icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Animation for multiple notices */
@keyframes slideUp {
    from {
        transform: translateY(-120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUpMobile {
    from {
        transform: translateY(120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.wc-notices-modal.is-active .wc-notices-modal__container {
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 768px) {
    .wc-notices-modal.is-active .wc-notices-modal__container {
        animation: slideUpMobile 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
}

.wc-notices-modal.is-active .wc-notices-modal__icon {
    animation: iconPulse 0.6s ease-out;
}

