/* notify.css — the notification bell (top right) and its panel (js/account/notify.js), plus the
   notification bits on a trip (Return travel missing, Notify me about this trip).
   Colours come from the theme tokens, so light and dark both work. */

/* ---------- The bell ---------- */
.bell-btn[hidden] { display: none; }
.bell-btn svg { width: 21px; height: 21px; }
.bell-btn[aria-expanded="true"] { background: rgba(124, 199, 255, 0.16); color: var(--text); }
.bell-n {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 9px; background: var(--accent); color: var(--night); font: 700 10.5px/18px var(--font); text-align: center;
  box-shadow: 0 0 0 2px var(--night); pointer-events: none;
}
.bell-btn.has-urgent .bell-n { background: #E5484D; color: #fff; }
.bell-n[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .bell-btn.has-urgent svg { animation: bell-ring 1.2s ease 1; transform-origin: 50% 15%; }
}
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } }

/* ---------- The panel ---------- */
.bell-pop {
  position: fixed; right: 12px; top: calc(var(--topbar-h, 56px) + 8px + env(safe-area-inset-top, 0px)); z-index: 1060;
  width: 400px; max-height: min(76vh, 680px); display: flex; flex-direction: column; box-sizing: border-box;
  border-radius: 14px; border: 1px solid var(--edge); background: var(--pop-bg, #13233B); color: var(--text);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); animation: menu-in 0.16s ease;
}
html[data-theme="light"] .bell-pop { box-shadow: 0 18px 50px rgba(20, 40, 80, 0.18); }
.bell-pop[hidden] { display: none; }
.bell-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 10px 16px; border-bottom: 1px solid var(--edge); }
.bell-head b { font-size: 15px; margin-right: auto; }
.bell-x { width: 32px; height: 32px; font-size: 14px; }
.bell-flash { margin: 8px 12px 0; padding: 8px 10px; border-radius: 8px; background: rgba(46, 180, 120, 0.14); font-size: 12.5px; }
.bell-flash.bad { background: rgba(220, 70, 70, 0.14); }
.bell-empty { margin: 0; padding: 34px 20px 38px; text-align: center; font-weight: 600; }
.bell-empty span { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.bell-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; }

.bell-item { position: relative; display: grid; grid-template-columns: 34px 1fr 30px; gap: 10px; padding: 10px 6px 10px 10px; border-radius: 10px; }
.bell-item + .bell-item { margin-top: 2px; }
.bell-item:not(.read) { background: rgba(124, 199, 255, 0.07); }
.bell-item:not(.read)::before { content: ''; position: absolute; left: 3px; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--accent); }
.bell-item.imp-urgent:not(.read) { background: rgba(229, 72, 77, 0.09); }
.bell-item.imp-urgent:not(.read)::before { background: #E5484D; }
.bell-item.read { opacity: 0.78; }
.bi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: rgba(124, 199, 255, 0.12); }
.imp-urgent .bi-ic { background: rgba(229, 72, 77, 0.14); }
.bi-body { min-width: 0; }
.bi-main { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bi-main.static { cursor: default; }
.bi-main b { display: block; font-size: 13.5px; line-height: 1.3; }
.bi-msg { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--text); opacity: 0.88; }
.bi-meta { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.bi-meta em { font-style: normal; color: #E5484D; font-weight: 700; }
button.bi-main:hover b { text-decoration: underline; }
.bi-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bi-acts .small-btn { font-size: 12px; padding: 5px 10px; }
.bi-more { width: 30px; height: 30px; align-self: start; }
.bi-more svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.bell-menu {
  position: absolute; right: 8px; top: 40px; z-index: 2; min-width: 230px; padding: 5px; border-radius: 10px;
  border: 1px solid var(--edge); background: var(--pop-bg, #13233B); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.bell-menu button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.bell-menu button:hover, .bell-menu button:focus-visible { background: rgba(124, 199, 255, 0.12); }

/* small forms inside an item (getting home another way, remind me later) and on the trip */
.bi-form { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--edge); background: rgba(124, 199, 255, 0.05); }
.bi-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); flex: 1 1 130px; }
.bi-form label.wide { flex-basis: 100%; }
.bi-form input, .bi-form select { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--edge); background: transparent; color: var(--text); }
.bi-form .bi-acts { flex-basis: 100%; margin-top: 2px; }

@media (max-width: 760px) {
  .bell-pop { left: 8px; right: 8px; width: auto; max-height: calc(100vh - var(--topbar-h, 56px) - 24px); }
  .bi-acts .small-btn { padding: 8px 12px; }
}

/* ---------- On a trip ---------- */
.nf-bar { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.nf-ret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(255, 176, 92, 0.45); background: rgba(255, 176, 92, 0.1); }
.nf-chip { background: rgba(255, 176, 92, 0.22); color: var(--warn); border-color: rgba(255, 176, 92, 0.5); font-weight: 700; }
.nf-acts { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.nf-form { flex-basis: 100%; margin-top: 2px; }
.nf-toggle { align-self: flex-start; }
.nf-toggle[aria-pressed="true"] b { color: inherit; }
.nf-muted .linkish { margin-left: 2px; }

/* ---------- Account menu: home airport ---------- */
.am-home input { margin-left: auto; width: 64px; padding: 5px 8px; border-radius: 7px; border: 1px solid var(--edge); background: transparent; color: var(--text);
  font: 700 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: 0.06em; text-align: center; }
.am-home[hidden], .am-note[hidden] { display: none; }
.bi-more-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.bi-more-acts .linkish { font-size: 12px; }

/* ---------- Morning summary card ---------- */
.dg-wrap { list-style: none; padding: 4px 8px; }
.dg { border-radius: 12px; border: 1px solid var(--dg-edge, #F1D9A8); background: var(--dg-bg, linear-gradient(180deg, #FFF8EA, #FFFDF8)); overflow: hidden; }
.dg.read { opacity: .78; }
.dg-head { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 11px 12px 8px; }
.dg-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--dg-ic, #FFE9BF); }
.dg-head b { display: block; font-size: 13.5px; }
.dg-head small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.dg-n { font: 700 11px/20px inherit; padding: 0 8px; border-radius: 10px; background: #F5C66A; color: #5A3A00; }
.dg ul { list-style: none; margin: 0; padding: 0 8px 4px; }
.dg-li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: start; padding: 7px 6px; border-radius: 8px; }
.dg-li + .dg-li { border-top: 1px dashed var(--dg-line, #EEDDBB); }
.dg-li:hover, .dg-li.open { background: rgba(245, 198, 106, .16); }
.dg-li.read .dg-line b { font-weight: 600; opacity: .8; }
.dg-li .i { font-size: 15px; line-height: 20px; text-align: center; }
.dg-line { all: unset; display: block; cursor: pointer; width: 100%; }
.dg-line:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.dg-line b { font-size: 12.8px; font-weight: 700; display: block; line-height: 1.3; }
.dg-line span { font-size: 12px; color: var(--muted); display: block; margin-top: 1px; line-height: 1.35; }
.dg-li em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; padding-top: 2px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.dg-li .bi-acts { margin-top: 7px; }
.dg-foot { display: flex; align-items: center; gap: 14px; padding: 6px 14px 10px 52px; font-size: 12px; }
.dg-foot .sp { flex: 1; }
.dg-foot .linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.dg-foot .linkish:hover { text-decoration: underline; }
:root:not([data-theme="light"]) .dg { --dg-bg: linear-gradient(180deg, rgba(245,198,106,.13), rgba(245,198,106,.05)); --dg-edge: rgba(245,198,106,.35); --dg-ic: rgba(245,198,106,.22); --dg-line: rgba(245,198,106,.25); }

/* ---------- The trip inbox envelope (js/account/inbox-btn.js) ---------- */
.inbox-btn .ib-badge { background: #E8A33A; color: #1a1205; }
.ib-pop { width: 360px; padding: 14px 16px; gap: 0; }
.ib-ok { border-radius: 10px; padding: 8px 10px; font-weight: 700; font-size: 13px; background: rgba(127, 224, 181, 0.16); color: var(--good); }
.ib-ok.wait { background: rgba(124, 199, 255, 0.12); color: var(--accent); }
.ib-addr { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0 8px; padding: 9px 10px; border: 1px solid var(--edge); border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.ib-addr code { font-size: 13.5px; font-weight: 700; color: var(--text); word-break: break-all; }
.ib-help { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ib-help b { color: var(--text); font-weight: 600; }
.ib-help.warn { color: #E8A33A; }
.ib-links { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; margin-top: 4px; }
.ib-links a { color: var(--accent); text-decoration: none; }
.ib-n { display: inline-block; background: #E8A33A; color: #1a1205; border-radius: 9px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
@media (max-width: 760px) { .ib-pop { left: 8px; right: 8px; width: auto; } }
.ib-addr code, .trip-fwd-addr code { font-family: var(--font); white-space: nowrap; word-break: normal; overflow: hidden; text-overflow: ellipsis; }
.ib-addr .linkish { white-space: nowrap; flex: none; }

/* Share requests (Approve → what they see) and new-photo notices */
.bi-ask { display: block; margin-top: 6px; font-size: 12.5px; color: var(--text); }
.bi-perms { gap: 4px 10px; }
.bi-perms p { margin: 0 0 2px; font-size: 12.5px; color: var(--text); }
.bi-perms p .dim { color: var(--muted); font-weight: 400; }
.bi-form label.bi-perm { flex-direction: row; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text); flex-basis: 100%; }
.bi-form label.bi-perm input { padding: 0; width: 15px; height: 15px; margin: 0; }
.bi-form label.bi-perm.sensitive { color: var(--warn); }
