/**
 * RMB Messages — Frontend Toast Styles
 * RockyMtnBabe
 */

/* Main notification container */
.rmb-toast {
    position: fixed;
    top: 110px;
    left: 24px;
    z-index: 99990;

    width: 380px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;

    padding: 20px 22px;
    border-radius: 14px;

    background: var(--rmb-toast-bg, rgba(234, 216, 200, 0.88));
    color: var(--rmb-toast-text, #203D73);

    border: 1px solid rgba(255, 255, 255, 0.38);

    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.06);

    opacity: 0;
    transform: translateX(calc(-100% - 40px));

    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s ease;

    pointer-events: none;
}

/* Never override the HTML hidden attribute. */
.rmb-toast[hidden] {
    display: none !important;
}

/* Visible state */
.rmb-toast.rmb-toast-visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Toast content layout */
.rmb-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* Thumbnail */
.rmb-toast-thumbnail {
    flex: 0 0 76px;
    width: 76px;
    height: 92px;
    overflow: hidden;
    border-radius: 9px;

    background: rgba(255, 255, 255, 0.15);
}

.rmb-toast-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Emoji */
.rmb-toast-emoji {
    flex: 0 0 auto;
    font-size: 32px;
    line-height: 1.2;
}

/* Message content */
.rmb-toast-body {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
}

.rmb-toast-title {
    margin: 0 0 6px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.15;
    color: inherit;
}

.rmb-toast-message {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.rmb-toast-message p {
    margin: 0 0 8px;
    color: inherit;
}

.rmb-toast-message p:last-child {
    margin-bottom: 0;
}

/* Optional destination link */
.rmb-toast-link {
    display: inline-block;
    margin-top: 12px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;

    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rmb-toast-link:hover,
.rmb-toast-link:focus {
    color: inherit;
    opacity: 0.75;
}

/* Dismiss button */
.rmb-toast-close {
    position: absolute;
    top: 9px;
    right: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: inherit;

    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
    opacity: 0.65;

    transition:
        opacity 0.2s ease,
        background-color 0.2s ease;
}

.rmb-toast-close:hover,
.rmb-toast-close:focus {
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
    opacity: 1;
}

.rmb-toast-close:focus-visible,
.rmb-toast-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Tablet */
@media (max-width: 1024px) {
    .rmb-toast {
        top: 96px;
        left: 16px;
        width: 350px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .rmb-toast {
        top: 85px;
        left: 12px;
        width: calc(100vw - 24px);
        max-width: 380px;
        padding: 17px 18px;
        border-radius: 12px;
    }

    .rmb-toast-thumbnail {
        flex-basis: 64px;
        width: 64px;
        height: 80px;
    }

    .rmb-toast-title {
        font-size: 22px;
    }

    .rmb-toast-message {
        font-size: 13px;
    }

    .rmb-toast-emoji {
        font-size: 28px;
    }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rmb-toast,
    .rmb-toast-close {
        transition: none;
    }
}
