/* Announcements (/menu/374): text notices as speech bubbles.
   Loaded only by site/menu.blade.php when $bubbles is set. The tail and the
   bubble share one drop-shadow (filter on .ann), so the shape reads as one. */

.ann-grid {
    --ann-ink: #22222e;
    --ann-muted: #5a5a67;
    --ann-red: #E32D44;
    --ann-paper: #fff;

    list-style: none;
    margin: 30px 0 10px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px 32px;           /* row gap leaves room for the tail */
}

.ann {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 30px 26px;
    background: var(--ann-paper);
    color: var(--ann-ink);
    border-radius: 26px;
    filter: drop-shadow(0 8px 18px rgba(34, 34, 46, .07)) drop-shadow(0 1px 2px rgba(34, 34, 46, .06));
    transition: transform .2s ease, filter .2s ease;
}

/* the tail: a pointer under the bubble's lower-left, curving down-left */
.ann::before {
    content: '';
    position: absolute;
    left: 34px;
    bottom: -17px;
    width: 34px;
    height: 18px;
    background: inherit;
    clip-path: path('M0 0 H34 C24 4 14 10 4 18 C8 10 8 4 0 0 Z');
}

.ann:hover,
.ann:focus-within {
    transform: translateY(-3px);
    filter: drop-shadow(0 14px 26px rgba(34, 34, 46, .12)) drop-shadow(0 1px 2px rgba(34, 34, 46, .06));
}

.ann__date {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.ann__day {
    font-size: 44px;
    line-height: 1;
    color: var(--ann-red);
    font-feature-settings: "tnum" 1;
}
.ann__month {
    font-size: 13px;
    line-height: 1.3;
    color: var(--ann-muted);
}

.ann__pin {
    position: absolute;
    top: 30px;
    right: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
}
.ann__pin::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ann__title {
    margin: 0 0 12px;
    font-size: 19px;
    line-height: 1.4;
}
.ann__title a {
    color: inherit;
    text-decoration: none;
}
/* the whole bubble is the link; the edit pencil (z-index 3) stays on top */
.ann__title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
.ann__title a:focus-visible { outline: none; }
.ann:has(.ann__title a:focus-visible) {
    outline: 3px solid var(--ann-ink);
    outline-offset: 4px;
}

.ann__text {
    margin: 0 0 20px !important;
    font-size: 15px;
    line-height: 1.65;
    color: var(--ann-muted);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ann__more {
    margin-top: auto;
    font-size: 14px;
    color: var(--ann-red);
}
.ann:hover .ann__title { color: var(--ann-red); }

/* pinned: the one loud bubble on the page */
.ann--pinned { background: var(--ann-red); color: #fff; }
.ann--pinned .ann__day,
.ann--pinned .ann__more,
.ann--pinned:hover .ann__title { color: #fff; }
.ann--pinned .ann__month,
.ann--pinned .ann__text { color: rgba(255, 255, 255, .85); }
.ann--pinned:has(.ann__title a:focus-visible) { outline-color: var(--ann-red); }

@media (max-width: 1100px) {
    .ann-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .ann-grid { grid-template-columns: 1fr; gap: 40px; margin-top: 10px; }
    .ann { padding: 22px 22px 20px; border-radius: 22px; }
    .ann::before { left: 26px; }
    .ann__day { font-size: 36px; }
    .ann__title { font-size: 17px; }
    .ann__pin { top: 24px; right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .ann { transition: none; }
    .ann:hover, .ann:focus-within { transform: none; }
}
