/* ── IC UI — shared Internal Comms styles for ic_ui.js (2026-10-08):
   team chip + Guide button in the top bar, team picker, app-styled confirm
   dialog, toasts and the guided tour. Loaded by every IC screen. ── */

.icui-bar { display: flex; align-items: center; gap: 8px; margin-right: 10px; }

.icui-team-chip,
.icui-guide-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text-soft, var(--text));
    font-size: 11.5px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.icui-chip-ico { width: 14px; height: 14px; flex-shrink: 0; color: var(--text-muted); }
.icui-team-chip b { color: var(--text); font-weight: 700; }
.icui-chip-change { color: var(--accent); font-weight: 600; }
.icui-team-chip:hover,
.icui-guide-btn:hover { border-color: var(--accent); }
.icui-guide-btn { color: var(--accent); font-weight: 600; }

/* ── Dialogs (team picker + confirm) ── */
.icui-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 16px;
}
.icui-dialog {
    width: min(440px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 14px);
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.icui-team-dialog { width: min(560px, 100%); }
.icui-dialog-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.icui-dialog-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin: 0 0 16px; }
.icui-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.icui-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.icui-btn:hover { border-color: var(--text-muted); }
.icui-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.icui-btn-primary:hover { background: var(--accent-hover, #e8530f); border-color: var(--accent-hover, #e8530f); }
.icui-btn-danger { background: #ef4444; border-color: #ef4444; color: #fff; }
.icui-btn-danger:hover { background: #dc2626; border-color: #dc2626; }

.icui-team-options { display: flex; flex-wrap: wrap; gap: 8px; }
.icui-team-option {
    padding: 8px 14px;
    border-radius: 99px;
    border: 1.5px solid var(--pill-color);
    background: transparent;
    color: var(--pill-color);
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}
.icui-team-option.active { background: var(--pill-color); color: #1a1a1a; }

/* ── Toasts ── */
#icui-toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 950;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(420px, calc(100vw - 32px));
}
.icui-toast {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid #348f70;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.45;
    animation: icui-toast-in 0.18s ease-out;
}
.icui-toast-error { border-left-color: #ef4444; }
.icui-toast-info { border-left-color: var(--accent); }
.icui-toast-icon { display: inline-flex; }
.icui-toast-icon .icui-i { width: 17px; height: 17px; }
.icui-toast-success .icui-toast-icon { color: #348f70; }
.icui-toast-error .icui-toast-icon { color: #ef4444; }
.icui-toast-info .icui-toast-icon { color: var(--accent); }
.icui-toast-close { margin-left: auto; background: none; border: none; color: var(--text-muted); font-size: 16px; line-height: 1; cursor: pointer; }
@keyframes icui-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Guided tour ── */
.icui-tour-shade { position: fixed; inset: 0; z-index: 980; background: rgba(0, 0, 0, 0.55); }
.icui-tour-spot {
    position: fixed;
    z-index: 981;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 0 3px var(--accent);
    pointer-events: none;
    transition: all 0.2s ease;
}
.icui-tour-pop {
    position: fixed;
    z-index: 982;
    background: var(--surface);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}
.icui-tour-count { font-size: 10.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.icui-tour-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.icui-tour-text { font-size: 12.5px; color: var(--text-soft, var(--text)); line-height: 1.5; }
.icui-tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.icui-tour-spacer { flex: 1; }
.icui-tour-skip { background: none; border: none; color: var(--text-muted); font-size: 12px; cursor: pointer; padding: 0; font-family: inherit; }
.icui-tour-skip:hover { color: var(--text); }

.icui-tour-q {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.icui-dialog-tip { font-size: 11.5px; color: var(--text-muted); margin: 14px 0 0; }
.icui-dialog-tip kbd {
    font-family: inherit;
    font-size: 10.5px;
    padding: 1px 5px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: var(--bg);
    color: var(--text);
}


/* ── Line icons (ICUI.icon / <i data-icui>) ─────────────────────────────────
   Sized from the surrounding font, coloured by currentColor. */
.icui-i { width: 1.1em; height: 1.1em; vertical-align: -0.2em; flex-shrink: 0; }
.icui-ico { display: inline-flex; align-items: center; vertical-align: middle; }
.icui-ico .icui-i { vertical-align: 0; }
/* icon + label inside buttons/pills: a little air between them */
.icui-i + span, .icui-ico + span { margin-left: 5px; }
button .icui-i, .ic-btn .icui-i, label .icui-i { margin-right: 5px; }
/* icon-only buttons / headers: no gap */
.ic-pending-btn .icui-i, .icui-toast-close .icui-i, th .icui-i, .ic-unlinked-pill .icui-i, .warn-icon .icui-i, .ea-warn .icui-i { margin-right: 0; }
/* tiny "BR" tag after the car/utensils icon of the Brazil teams (flag emoji
   don't render on Windows 10) */
.icui-br { font-size: 0.62em; font-weight: 700; letter-spacing: .02em; margin-left: 1px; opacity: .8; vertical-align: 0.15em; }
/* 1st / 2nd / 3rd place - a numbered disc instead of a medal emoji */
.icui-medal { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; }
.icui-medal.m1 { background: #d9a400; }
.icui-medal.m2 { background: #8d96a3; }
.icui-medal.m3 { background: #b8743a; }

/* ── Floating chat bubble: the round button of the IC Assistant (ic_ui.js). The panel is in ic_chat.css.
   z-index 880: above the page, below the dialogs (900), toasts (950) and the guided tour (980+), so the
   tour popup is never covered. ── */
.icui-chat { position: fixed; right: 22px; bottom: 22px; z-index: 880; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.icui-chat-fab { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -6px rgba(255, 95, 20, .65); transition: transform .15s ease, box-shadow .15s ease; }
.icui-chat-fab:hover { transform: translateY(-2px) scale(1.05); }
.icui-chat-fab:focus-visible { outline: 3px solid var(--accent-border, rgba(255, 95, 20, .45)); outline-offset: 3px; }
.icui-chat-fab[aria-busy="true"] { cursor: progress; }
.icui-chat-fab .icui-i { width: 26px; height: 26px; margin: 0; }
.icui-chat-fab .icui-i-close { display: none; }
.icui-chat-fab.open { background: #3A2932; box-shadow: 0 10px 24px -6px rgba(58, 41, 50, .5); }
.icui-chat-fab.open .icui-i-open { display: none; }
.icui-chat-fab.open .icui-i-close { display: block; width: 22px; height: 22px; }
/* the toasts sit above the round button instead of on top of it */
body[data-icui-chat] #icui-toasts { bottom: 90px; }
@media (max-width: 768px) { .icui-chat { right: 14px; bottom: 14px; } .icui-chat-fab { width: 50px; height: 50px; } body[data-icui-chat] #icui-toasts { bottom: 76px; right: 14px; } }
@media print { .icui-chat { display: none; } }

/* Big, friendly tour button (home): "I'm new here - give me a tour" */
.icui-guide-btn.icui-guide-big { height: 38px; padding: 0 16px 0 12px; gap: 8px; font-size: 13px; background: var(--accent-dim); border-color: rgba(255, 95, 20, .45); }
.icui-guide-btn.icui-guide-big:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.icui-guide-btn.icui-guide-big .icui-tour-q { width: 20px; height: 20px; font-size: 12px; }

.icui-flag { width: 12px; height: 9px; margin-left: 3px; border-radius: 1.5px; vertical-align: -0.05em; background-size: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); display: inline-block; }

/* ── Review-screen hero (Events / D-Chat / D-Hub, 2026-10-16) - same family as the Internal Comms home ── */
.icx-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    margin-bottom: 14px; padding: 26px 30px; border-radius: 22px; color: #fff;
    background: linear-gradient(112deg, #FF5F14 0%, #FF6D1F 55%, #FF8A3D 100%); box-shadow: 0 18px 40px -20px rgba(255, 95, 20, .55); }
.icx-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.icx-orb-a { width: 300px; height: 300px; right: -90px; top: -150px; background: rgba(255, 255, 255, .12); }
.icx-orb-b { width: 160px; height: 160px; left: 38%; bottom: -100px; background: rgba(255, 188, 0, .22); }
.icx-hero-text { position: relative; z-index: 1; max-width: 640px; }
.icx-hero-text small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.icx-hero-text h1 { margin: 4px 0 6px; font-size: 38px; line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.icx-hero-text p { margin: 0; font-size: 14px; line-height: 1.45; color: #FFEDB8; }
.icx-hero-stat { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 10px; padding: 12px 20px; border-radius: 16px; background: rgba(255, 255, 255, .96); color: #3A2932; }
.icx-hero-stat b { font-size: 34px; line-height: 1; font-weight: 800; color: #E5383B; }
.icx-hero-stat span { font-size: 13px; font-weight: 600; }
.icx-hero-stat.icx-ok { align-items: center; }
.icx-hero-ok { display: inline-flex; width: 24px; height: 24px; color: #2f9e5a; }
.icx-hero-ok svg, .icx-allgood svg { width: 100%; height: 100%; }
.icx-allgood { display: inline-flex; width: 16px; height: 16px; vertical-align: -3px; color: #2f9e5a; }
.icx-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.icx-view .ict-n { margin-left: 5px; padding: 1px 7px; border-radius: 99px; background: #E5383B; color: #fff; font-size: 11px; }
.icx-view .ict-m { margin-left: 4px; opacity: .6; font-weight: 500; }
@media (max-width: 720px) { .icx-hero { padding: 20px 18px; } .icx-hero-text h1 { font-size: 30px; } }
.ic-cf-hint a { color: var(--accent); font-weight: 600; text-decoration: none; }
.ic-cf-hint a:hover { text-decoration: underline; }

/* Date fields (see "Date fields" at the end of ic_ui.js): read-only ISO text, calendar on click. */
.icd-input { cursor: pointer; padding-right: 32px; caret-color: transparent;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'><rect x='3' y='4' width='18' height='18' rx='2'/><path d='M16 2v4M8 2v4M3 10h18'/></svg>");
    background-repeat: no-repeat; background-position: right 10px center; }
.icd-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
