:root {
    --vapshop-notice-ink: var(--vapshop-ink, #021826);
    --vapshop-notice-ink-soft: var(--vapshop-ink-soft, #073346);
    --vapshop-notice-success: var(--vapshop-accent, #16a085);
    --vapshop-notice-error: #d56868;
    --vapshop-notice-info: #2d7f9d;
    --vapshop-notice-radius: 15px;
    --vapshop-notice-shadow: 0 12px 32px rgba(2, 24, 38, 0.16);
}

/* WooCommerce notices stay at their original position in the document flow. */

html.vapshop-notices-enabled .woocommerce-message.message-wrapper:not(.vapshop-notice-host),
html.vapshop-notices-enabled .woocommerce-error.message-wrapper:not(.vapshop-notice-host) {
    visibility: hidden;
}

body .vapshop-notice-host {
    background: transparent !important;
    border: 0 !important;
    color: inherit;
    display: block;
    list-style: none;
    margin: 0;
    padding: 12px 0 !important;
    position: relative;
    width: 100%;
}

body .vapshop-notice-host:focus {
    outline: none;
}

body .vapshop-notice-host > .vapshop-notice-container {
    display: block;
    list-style: none;
    margin: 0 auto;
    text-align: left !important;
    width: 100%;
}

body ul.vapshop-notice-host > li::before {
    content: none;
}

.vapshop-notice {
    --vapshop-notice-accent: var(--vapshop-notice-success);
    --vapshop-notice-accent-rgb: 22, 160, 133;
    background:
        radial-gradient(circle at 0 0, rgba(var(--vapshop-notice-accent-rgb), 0.3), transparent 38%),
        linear-gradient(135deg, var(--vapshop-notice-ink), var(--vapshop-notice-ink-soft));
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--vapshop-notice-radius);
    box-shadow: var(--vapshop-notice-shadow);
    color: #fff;
    display: grid;
    gap: 12px;
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    padding: 14px;
    position: relative;
    text-align: left;
    transform: translate3d(0, -7px, 0);
    transition: opacity 180ms ease, transform 220ms ease;
    visibility: visible !important;
    width: 100%;
}

.vapshop-notice--error {
    --vapshop-notice-accent: var(--vapshop-notice-error);
    --vapshop-notice-accent-rgb: 213, 104, 104;
}

.vapshop-notice--has-action {
    grid-template-columns: 38px minmax(0, 1fr) auto 30px;
}

.vapshop-notice.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.vapshop-notice.is-leaving {
    opacity: 0;
    transform: translate3d(0, -6px, 0);
}

.vapshop-notice__icon {
    align-items: center;
    align-self: start;
    background: rgba(var(--vapshop-notice-accent-rgb), 0.18);
    border: 1px solid rgba(var(--vapshop-notice-accent-rgb), 0.56);
    border-radius: 50%;
    color: var(--vapshop-notice-accent);
    display: flex;
    font-size: 17px;
    font-weight: 700;
    height: 38px;
    justify-content: center;
    line-height: 1;
    width: 38px;
}

.vapshop-notice__content {
    align-items: baseline;
    align-self: center;
    display: flex;
    gap: 5px;
    min-width: 0;
}

.vapshop-notice__title {
    color: var(--vapshop-notice-accent);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.18;
    flex: 0 0 auto;
    margin: 0;
    text-transform: uppercase;
}

.vapshop-notice__message {
    color: rgba(255, 255, 255, 0.9);
    flex: 1 1 auto;
    font-size: 1rem;
    line-height: 1.28;
    min-width: 0;
}

.vapshop-notice__message p,
.vapshop-notice__message ul,
.vapshop-notice__message li {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    margin-bottom: 0;
}

.vapshop-notice__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vapshop-notice__list li {
    list-style: none;
    padding-left: 13px;
    position: relative;
}

.vapshop-notice__list li::before {
    background: var(--vapshop-notice-accent);
    border-radius: 50%;
    content: '';
    height: 5px;
    left: 0;
    position: absolute;
    top: 0.52em;
    width: 5px;
}

.vapshop-notice__list li + li {
    margin-top: 5px;
}

.vapshop-notice__action {
    align-items: center;
    align-self: center;
    display: flex;
    gap: 8px;
    justify-self: end;
}

.vapshop-notice__action .button,
.vapshop-notice__action .wc-forward {
    align-items: center;
    background: var(--vapshop-notice-accent) !important;
    border: 0 !important;
    border-radius: 999px;
    box-shadow: none !important;
    color: #fff !important;
    display: inline-flex !important;
    font-size: 0.8rem;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    letter-spacing: 0.02em;
    line-height: 1;
    margin: 0 !important;
    min-height: 32px;
    padding: 0 13px;
    text-transform: none;
    vertical-align: middle;
    width: max-content;
}

.vapshop-notice__action .button:hover,
.vapshop-notice__action .button:focus-visible,
.vapshop-notice__action .wc-forward:hover,
.vapshop-notice__action .wc-forward:focus-visible {
    background: #12846f !important;
    color: #fff !important;
}

.vapshop-notice__action .vapshop-notice__button--secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: rgba(255, 255, 255, 0.88) !important;
}

.vapshop-notice__action .vapshop-notice__button--secondary:hover,
.vapshop-notice__action .vapshop-notice__button--secondary:focus-visible {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
}

.vapshop-notice--error .vapshop-notice__action .button:hover,
.vapshop-notice--error .vapshop-notice__action .button:focus-visible,
.vapshop-notice--error .vapshop-notice__action .wc-forward:hover,
.vapshop-notice--error .vapshop-notice__action .wc-forward:focus-visible {
    background: #b95050 !important;
}

.vapshop-notice__close {
    align-items: center;
    appearance: none;
    align-self: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.74);
    cursor: pointer;
    display: flex;
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 300;
    height: 30px;
    justify-content: center;
    line-height: 1;
    margin: 0;
    min-height: 30px;
    min-width: 30px;
    padding: 0 0 2px;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
    width: 30px;
}

.vapshop-notice__close:hover,
.vapshop-notice__close:focus-visible {
    background: var(--vapshop-notice-accent);
    border-color: var(--vapshop-notice-accent);
    color: #fff;
    outline: none;
}

.vapshop-notice__close:focus-visible,
.vapshop-notice__message a:focus-visible,
.vapshop-notice__action a:focus-visible {
    box-shadow: 0 0 0 3px rgba(var(--vapshop-notice-accent-rgb), 0.28) !important;
}

.vapshop-notice__progress {
    animation: vapshop-notice-progress var(--vapshop-notice-duration, 24000ms) linear forwards;
    background: var(--vapshop-notice-accent);
    bottom: 0;
    height: 3px;
    left: 0;
    position: absolute;
    transform-origin: left center;
    width: 100%;
}

.vapshop-notice.is-paused .vapshop-notice__progress {
    animation-play-state: paused;
}

@keyframes vapshop-notice-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

/* Informational messages use a calmer light treatment in the same full-width flow. */

body .woocommerce-info.message-wrapper:not(.vapshop-notice-host) {
    background: transparent;
    border: 0;
    color: var(--vapshop-notice-ink);
    margin: 12px 0 18px;
    padding: 0;
}

body .woocommerce-info.message-wrapper:not(.vapshop-notice-host) .message-container {
    background:
        radial-gradient(circle at 100% 0, rgba(45, 127, 157, 0.12), transparent 34%),
        #f3f8fa;
    border: 1px solid rgba(45, 127, 157, 0.18);
    border-radius: 13px;
    color: var(--vapshop-notice-ink);
    font-size: 0.875rem;
    line-height: 1.45;
    max-width: none;
    padding: 14px 16px 14px 52px;
    position: relative;
    text-align: left !important;
    width: 100%;
}

body .woocommerce-info.message-wrapper:not(.vapshop-notice-host) .message-container::before {
    align-items: center;
    background: rgba(45, 127, 157, 0.12);
    border: 1px solid rgba(45, 127, 157, 0.28);
    border-radius: 50%;
    color: var(--vapshop-notice-info);
    content: 'i';
    display: flex;
    font-size: 13px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    left: 14px;
    line-height: 1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
}

body .woocommerce-info.message-wrapper:not(.vapshop-notice-host) a {
    color: var(--vapshop-notice-info);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* WooCommerce block notices and persistent order states. */

body .wc-block-components-notice-banner,
body .woocommerce-notice:not(.woocommerce-store-notice) {
    background: #f3f8fa;
    border: 1px solid rgba(45, 127, 157, 0.18);
    border-radius: 13px;
    box-shadow: none;
    color: var(--vapshop-notice-ink);
    font-size: 0.875rem;
    line-height: 1.45;
    padding: 14px 16px;
}

body .wc-block-components-notice-banner.is-success,
body .woocommerce-notice--success:not(.woocommerce-store-notice) {
    background: #edf8f5;
    border-color: rgba(22, 160, 133, 0.22);
}

body .wc-block-components-notice-banner.is-error,
body .woocommerce-notice--error:not(.woocommerce-store-notice) {
    background: #fff3f3;
    border-color: rgba(213, 104, 104, 0.24);
}

@media only screen and (max-width: 549px) {
    body .vapshop-notice-host {
        padding: 10px 0 !important;
    }

    .vapshop-notice {
        gap: 10px;
        grid-template-columns: 34px minmax(0, 1fr) 28px;
        padding: 12px;
    }

    .vapshop-notice--has-action {
        grid-template-columns: 34px minmax(0, 1fr) 28px;
    }

    .vapshop-notice__icon {
        font-size: 15px;
        height: 34px;
        width: 34px;
    }

    .vapshop-notice__message {
        font-size: 0.9375rem;
    }

    .vapshop-notice__action {
        grid-column: 1 / 3;
        justify-self: end;
    }

    .vapshop-notice__action .button,
    .vapshop-notice__action .wc-forward {
        display: flex !important;
        margin: 4px 0 0 !important;
    }

    .vapshop-notice--has-action .vapshop-notice__close {
        grid-column: 3;
        grid-row: 2;
    }

    .vapshop-notice__close {
        font-size: 18px;
        height: 28px;
        min-height: 28px;
        min-width: 28px;
        width: 28px;
    }

    body .woocommerce-info.message-wrapper:not(.vapshop-notice-host) .message-container {
        padding: 13px 13px 13px 48px;
    }

    body .woocommerce-info.message-wrapper:not(.vapshop-notice-host) .message-container::before {
        left: 12px;
    }
}

@media only screen and (max-width: 360px) {
    .vapshop-notice,
    .vapshop-notice--has-action {
        grid-template-columns: minmax(0, 1fr) 28px;
    }

    .vapshop-notice__icon {
        display: none;
    }

    .vapshop-notice__action {
        align-items: flex-end;
        flex-direction: column;
        grid-column: 1 / 2;
        gap: 6px;
    }

    .vapshop-notice__action .button,
    .vapshop-notice__action .wc-forward {
        margin: 0 !important;
    }

    .vapshop-notice--has-action .vapshop-notice__close {
        align-self: end;
        grid-column: 2;
        grid-row: 2;
        margin-bottom: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vapshop-notice,
    .vapshop-notice__close {
        transition: none;
    }

    .vapshop-notice__progress {
        animation: none;
    }
}
