/* A message from the Kuukan team (modules/TeamAnnouncement.js): in the middle
   of the screen, over everything, until its own button closes it. */
.team-announce {
    position: fixed; inset: 0; z-index: calc(var(--z-top) + 60);
    display: grid; place-items: center;
    padding: max(18px, env(safe-area-inset-top, 0px)) 18px max(18px, env(safe-area-inset-bottom, 0px));
    background: rgba(2, 8, 10, 0.62);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
    font-family: var(--ui-font);
}
.team-announce.is-open { opacity: 1; pointer-events: auto; }
.team-announce[hidden] { display: none !important; }

.team-announce-card {
    width: min(460px, 100%); max-height: 100%;
    display: flex; flex-direction: column; overflow: hidden;
    background: rgba(var(--ui-surface-rgb), 0.98);
    border: 1.5px solid var(--ui-border-accent); border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
    transform: translateY(14px) scale(0.96);
    transition: transform 0.36s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.team-announce.is-open .team-announce-card { transform: none; }
.team-announce.is-open .team-announce-card.is-swap { animation: team-announce-swap 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes team-announce-swap { from { transform: translateX(18px); opacity: 0.2; } to { transform: none; opacity: 1; } }

/* The pictures as they are: whole, never cropped, never taller than a share
   of the screen. The frame takes the first picture's shape (--ratio); with
   several they slide in turn. */
.team-announce-gallery {
    position: relative; flex: none; width: 100%; overflow: hidden;
    aspect-ratio: var(--ratio, 16 / 9); max-height: 38vh;
    background: rgba(0, 0, 0, 0.35); border-bottom: 1px solid var(--ui-border);
    touch-action: pan-y; user-select: none;
}
.team-announce-track { display: flex; height: 100%; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1); }
.team-announce-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; display: block; }
.team-announce-prev, .team-announce-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
    display: none; place-items: center;
    color: #fff; background: rgba(4, 12, 16, 0.55);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.team-announce-prev { left: 8px; }
.team-announce-next { right: 8px; }
.team-announce-prev:hover, .team-announce-next:hover { background: rgba(4, 12, 16, 0.75); }
.team-announce-prev:focus-visible, .team-announce-next:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.team-announce-gallery.is-many .team-announce-prev,
.team-announce-gallery.is-many .team-announce-next { display: grid; }
.team-announce-dots { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; gap: 2px; }
.team-announce-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.team-announce-dots button::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); transition: background 0.2s, transform 0.2s; }
.team-announce-dots button[aria-current="true"]::before { background: #fff; transform: scale(1.25); }

.team-announce-body { padding: 18px 22px 6px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.team-announce-kick { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.team-announce-mark {
    display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
    color: var(--ui-accent);
    background: radial-gradient(circle at 35% 30%, rgba(var(--ui-accent-rgb), 0.28), rgba(var(--ui-accent-rgb), 0.08));
    border: 1px solid var(--ui-border-accent);
}
.team-announce-who { font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ui-accent); }
.team-announce-when { font-size: 12px; color: var(--ui-text-muted); font-variant-numeric: tabular-nums; }
.team-announce-of {
    margin-left: auto; font-size: 11px; font-weight: 600; color: var(--ui-text-muted); font-variant-numeric: tabular-nums;
    border: 1px solid var(--ui-border); border-radius: 999px; padding: 2px 9px;
}
.team-announce-title {
    margin: 0 0 10px; font-family: 'Outfit', var(--ui-font); font-size: 23px; font-weight: 700; line-height: 1.2;
    color: var(--ui-text-bright); text-wrap: balance; overflow-wrap: anywhere;
}
.team-announce-text { color: rgba(var(--ui-text-rgb), 0.82); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.team-announce-text p { margin: 0 0 10px; }
.team-announce-text ul { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 6px; }
.team-announce-text li { position: relative; padding-left: 18px; }
.team-announce-text li::before {
    content: ''; position: absolute; left: 3px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%;
    background: var(--ui-teal);
}
.team-announce-text a { color: var(--ui-accent); text-decoration: underline; text-underline-offset: 2px; }

.team-announce-foot {
    flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px;
    padding: 12px 22px 18px;
}
/* Its own line above the buttons, so a long button label never pushes them apart. */
.team-announce-keep { width: 100%; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ui-text-muted); }
.team-announce-keep.is-preview { color: var(--ui-warn-text, #ffd88a); }
.team-announce-go {
    display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border-radius: 10px;
    font-size: 13.5px; font-weight: 600; color: var(--ui-accent); text-decoration: none;
    border: 1px solid var(--ui-border-accent); background: none; cursor: pointer;
}
.team-announce-go:hover { background: rgba(var(--ui-accent-rgb), 0.08); }
.team-announce-go[hidden] { display: none; }
.team-announce-ok {
    min-height: 42px; min-width: 108px; padding: 0 20px; border: 0; border-radius: 10px; cursor: pointer;
    font: 700 14px var(--ui-font); color: #04202c;
    background: var(--ui-accent); box-shadow: 0 6px 18px rgba(var(--ui-accent-rgb), 0.28);
}
.team-announce-ok:hover { filter: brightness(1.08); }
.team-announce-ok:focus-visible, .team-announce-go:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }

@media (max-width: 520px) {
    .team-announce-body { padding: 16px 18px 4px; }
    .team-announce-foot { padding: 10px 18px 16px; }
    .team-announce-go, .team-announce-ok { flex: 1; justify-content: center; min-height: 46px; }
    .team-announce-title { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    .team-announce, .team-announce-card, .team-announce-track { transition: none; }
    .team-announce.is-open .team-announce-card.is-swap { animation: none; }
}

/* The Announce composer (AnnounceComposer.js), in the Admin panel and in a
   team's settings. .ui-btn sets its own display, which would outrank the
   hidden attribute. */
.ann-composer [hidden] { display: none !important; }
.ann-composer { display: grid; gap: 16px; }
.ann-card { background: rgba(0, 0, 0, 0.3); border-radius: 12px; padding: 18px; display: grid; gap: 14px; }
.ann-field { display: grid; gap: 4px; min-width: 0; }
.ann-field > label, .ann-label { color: var(--ui-text-muted); font-size: 11px; display: flex; justify-content: space-between; gap: 8px; }
.ann-field .ui-input, .ann-field .ui-select { padding: 10px; }
.ann-field textarea.ui-input { resize: vertical; line-height: 1.5; }
.ann-dim { opacity: 0.75; }
.ann-help { color: var(--ui-text-muted); font-size: 11px; }
.ann-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; }
@media (max-width: 520px) { .ann-row2 { grid-template-columns: minmax(0, 1fr); } }
.ann-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border: 1px dashed var(--ui-border-accent); border-radius: 10px; }
.ann-img { display: grid; gap: 4px; width: 104px; }
.ann-img img { width: 104px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--ui-border); display: block; }
.ann-img-acts { display: flex; gap: 3px; }
.ann-img-acts .ui-btn { flex: 1; min-width: 0; padding: 2px 0; font-size: 14px; line-height: 1; }
.ann-error { color: #ff6b6b; font-size: 12px; }
.ann-actions { display: flex; gap: 8px; }
.ann-actions .ui-btn { padding: 10px 16px; }
.ann-send { flex: 1; background: rgba(var(--ui-accent-rgb), 0.16); border: 1px solid var(--ui-border-accent); color: var(--ui-accent); font-weight: 600; }
.ann-confirm { padding: 12px; border: 1px solid rgba(255, 169, 77, 0.45); border-radius: 10px; background: rgba(255, 169, 77, 0.07); display: grid; gap: 10px; }
.ann-confirm-text { font-size: 13px; color: var(--ui-text); }
.ann-confirm-btns { display: flex; gap: 8px; justify-content: flex-end; }
.ann-yes { background: #ffa94d; color: #2a1600; border: 0; font-weight: 700; }
.ann-sent-title { color: #b9a3d9; font-size: 14px; margin: 0; }
.ann-sent { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.ann-sent-row { padding: 10px 12px; border: 1px solid var(--ui-border); border-radius: 10px; display: grid; gap: 6px; }
.ann-sent-head { display: flex; align-items: baseline; gap: 10px; }
.ann-sent-head b { flex: 1; min-width: 0; color: var(--ui-text-bright); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-sent-head span { color: var(--ui-text-muted); font-size: 11px; white-space: nowrap; }
.ann-meter { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.ann-meter i { display: block; height: 100%; background: var(--ui-teal); }
.ann-sent-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--ui-text-muted); }
.ann-num { font-variant-numeric: tabular-nums; }
.ann-when { margin-right: auto; }
.ann-delete { color: #ff9a9a; }
.ann-empty { color: #6a6a7a; text-align: center; margin: 0; }

/* Team news (TeamAnnouncement.js openTeamNews): every announcement, newest
   first. Moves by its header like every panel (DragPanel.js). Under the card,
   which opens over it. */
.team-news {
    position: fixed; z-index: calc(var(--z-top) + 40);
    top: calc(var(--toolbar-height, 54px) + 16px); right: 16px;
    width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 120px));
    display: flex; flex-direction: column; overflow: hidden;
    background: rgba(var(--ui-surface-rgb), 0.98); border: 1.5px solid var(--ui-border-accent); border-radius: 14px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55); font-family: var(--ui-font);
}
.team-news[hidden] { display: none; }
.team-news-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--ui-border-faint); }
.team-news-title { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; color: var(--ui-text-bright); }
.team-news-close { width: 32px; height: 32px; border: 0; background: none; border-radius: 8px; color: var(--ui-text-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.team-news-close:hover { background: rgba(var(--ui-accent-rgb), 0.08); color: var(--ui-text); }
.team-news-list { overflow-y: auto; padding: 6px; display: grid; gap: 2px; }
.team-news-row { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: 10px; }
.team-news-row:hover { background: rgba(var(--ui-accent-rgb), 0.06); }
.team-news-open { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 56px;
    padding: 8px; border: 0; background: none; cursor: pointer; text-align: left; color: inherit; font: inherit; border-radius: 10px; }
.team-news-open img, .team-news-mark { width: 48px; height: 34px; border-radius: 6px; object-fit: cover; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--ui-border-faint); display: grid; place-items: center; color: var(--ui-accent); }
.team-news-text { display: grid; gap: 2px; min-width: 0; }
.team-news-text b { font-size: 13px; color: var(--ui-text-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-news-text span { font-size: 11.5px; color: var(--ui-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-news-open time { font-size: 11px; color: var(--ui-text-muted); font-variant-numeric: tabular-nums; align-self: start; padding-top: 2px; }
.team-news-row.is-new .team-news-text b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; vertical-align: middle;
    background: rgba(var(--ui-accent-rgb), 0.95); box-shadow: 0 0 6px rgba(var(--ui-accent-rgb), 0.6); }
.team-news-delete { justify-self: end; margin: -4px 8px 6px 0; padding: 3px 10px; border: 1px solid rgba(255, 120, 120, 0.3); border-radius: 7px; background: none; color: #ff9a9a; font: 600 11px var(--ui-font); cursor: pointer; }
.team-news-delete:hover { background: rgba(255, 120, 120, 0.1); }
.team-news-empty { margin: 0; padding: 22px 12px; text-align: center; color: var(--ui-text-muted); font-size: 12.5px; }

/* A team's announcement wears the team's logo in the mark. */
.team-announce-mark.has-logo { background: rgba(255, 255, 255, 0.92); overflow: hidden; padding: 4px; }
.team-announce-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.team-news-text em { font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: 0.4px; color: var(--ui-accent); }
