/*
 * components/notify-popup.css
 *
 * What:  The in-page notification card (ui/notify-bell.js → announce()).
 *        Slides in under the header on the RIGHT, shows the notification's
 *        own title and body, and the whole card is a button that opens the
 *        screen the notification is about.
 * Why:   Deliberately NOT the toast. A toast is one line of text that leads
 *        nowhere and clears in four seconds; this has to carry the detail
 *        ("Your order at EatNDeal is with them now") and be tappable through
 *        to the order, so it needs its own size, its own affordance and a
 *        longer life. Coding-Conventions rule #8 — custom popup, no native
 *        notification chrome.
 * Used:  Linked from views/_layout.ejs. Phone overrides live in
 *        components/notify-popup-mobile.css, not in media queries here.
 */

.notify-pop {
    position: fixed;
    /* Clears the site header, same as the toast stack, so a notification
     * arriving while the customer scrolls never covers the logo/bell. */
    top: 88px;
    right: var(--space-4);
    z-index: var(--z-toast);

    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    width: min(360px, calc(100vw - 32px));
    padding: var(--space-3);

    background: #fff;
    border: 1px solid var(--color-border, #e6e6e6);
    border-left: 4px solid var(--color-primary, #e23744);
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);

    /* Entry/exit are driven by classes from the script (is-in / is-leaving)
     * rather than an animation, so the same rules run the card out again. */
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.notify-pop.is-in {
    opacity: 1;
    transform: translateY(0);
}

.notify-pop.is-leaving {
    opacity: 0;
    transform: translateY(-8px);
}

.notify-pop__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary-soft, #fdecee);
    color: var(--color-primary, #e23744);
}

/* The clickable body of the card. A <button> (not a link) because the
 * destination is decided in JS after the read-marking call is fired. */
.notify-pop__main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.notify-pop__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text, #1c1c1c);
}

.notify-pop__body {
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--color-text-muted, #5c5c5c);
    /* Two lines maximum — the full text is always on /notifications, and a
     * long body must not grow the card over the page. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notify-pop__cta {
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary, #e23744);
}

.notify-pop__close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-muted, #8a8a8a);
}

.notify-pop__close:hover { color: var(--color-text, #1c1c1c); }
