/**
 * Ocean ToastMessages — storefront toast notifications.
 * Loaded via layout so styles apply even before the main LESS bundle is rebuilt.
 * Logical properties handle LTR (bottom-left) and RTL (bottom-right) automatically.
 */

html body .page.messages,
html body .customer-auth-messages,
html body [data-role='checkout-messages'],
html body .ocean-toast-source {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
}

html body .page.messages .messages .message,
html body .page.messages .message,
html body .customer-auth-messages .messages .message,
html body [data-role='checkout-messages'] .message {
    display: none !important;
    animation: none !important;
}

.ocean-toast-container {
    --ocean-toast-from-x: -24px;
    position: fixed;
    z-index: 100050;
    bottom: 24px;
    inset-inline-start: 24px;
    inset-inline-end: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 360px;
    max-width: calc(100vw - 48px);
    pointer-events: none;
    box-sizing: border-box;
}

.ocean-toast-container.is-hidden-by-ajaxsuite {
    display: none !important;
}

.ocean-toast-container--rtl {
    --ocean-toast-from-x: 24px;
}

.ocean-toast-container--rtl .ocean-toast {
    transform-origin: bottom right;
}

.ocean-toast {
    pointer-events: auto;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    padding: 14px;
    padding-inline-start: 16px;
    border-radius: 12px;
    border: 0;
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.1), 0 1px 3px rgba(16, 24, 40, 0.06);
    font-family: inherit;
    color: #101828;
    transform-origin: bottom left;
    will-change: transform, opacity;
}

.ocean-toast.is-entering {
    animation: ocean-toast-in 0.35s ease both;
}

.ocean-toast.is-leaving {
    animation: ocean-toast-out 0.3s ease both;
    pointer-events: none;
}

.ocean-toast__icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-top: 1px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.ocean-toast__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.ocean-toast__content {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 2px;
}

.ocean-toast__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #101828;
    margin: 0 0 2px;
}

.ocean-toast__body {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #475467;
    word-break: break-word;
}

.ocean-toast__body a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.ocean-toast__body p,
.ocean-toast__body div {
    margin: 0;
}

.ocean-toast__close {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin: -4px 0 0;
    margin-inline-end: -6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #344054;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    line-height: 1;
    box-shadow: none;
    appearance: none;
}

.ocean-toast__close:hover,
.ocean-toast__close:focus {
    background: rgba(16, 24, 40, 0.06);
    color: #101828;
}

.ocean-toast__close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.ocean-toast__close-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.ocean-toast--success {
    background: #ecfdf3;
}

.ocean-toast--success .ocean-toast__icon {
    background: #12b76a;
}

.ocean-toast--error {
    background: #fef3f2;
}

.ocean-toast--error .ocean-toast__icon {
    background: #f04438;
}

.ocean-toast--warning {
    background: #fffaeb;
}

.ocean-toast--warning .ocean-toast__icon {
    background: #f79009;
}

.ocean-toast--notice {
    background: #eff8ff;
}

.ocean-toast--notice .ocean-toast__icon {
    background: #2e90fa;
}

@keyframes ocean-toast-in {
    from {
        opacity: 0;
        transform: translate3d(var(--ocean-toast-from-x), 8px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes ocean-toast-out {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(var(--ocean-toast-from-x), 8px, 0);
    }
}

@keyframes ocean-toast-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ocean-toast.is-entering,
    .ocean-toast.is-leaving {
        animation-duration: 0.15s;
        animation-name: ocean-toast-fade;
    }

    .ocean-toast.is-leaving {
        animation-direction: reverse;
    }
}

@media (max-width: 767px) {
    .ocean-toast-container {
        width: calc(100vw - 48px);
        max-width: 360px;
    }

    .ocean-toast {
        padding: 12px;
        padding-inline-start: 14px;
    }

    .ocean-toast__title {
        font-size: 13px;
    }

    .ocean-toast__body {
        font-size: 12px;
    }
}
