/* OnMyWay overrides on top of the Sticky Mobile theme (bootstrap.css + style.css).
   Keep this small — prefer Sticky's own classes. */

/* Live map surfaces (our feature; the theme has no map component). */
.map-canvas {
    width: 100%; height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 14px 0 rgba(0,0,0,0.08);
}
.theme-dark .map-canvas { box-shadow: 0 2px 14px 0 rgba(0,0,0,0.5); }

/* Minimal toast (onmyway.js) — themed to the highlight color. */
#omw-toast {
    position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
    background: #1f1f1f; color: #fff; padding: 12px 18px; border-radius: 12px;
    font-size: 14px; z-index: 9999; opacity: 0; transition: all .25s ease; pointer-events: none;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25); max-width: 88%; text-align: center;
}
#omw-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#omw-toast.error { background: #DA4453; }
#omw-toast.success { background: #2ABA66; }

/* Header profile avatar (initial in a coral circle). */
.profile-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: #ED5565; color: #fff; font-weight: 700; font-size: 13px;
    font-family: "Source Sans Pro", sans-serif;
}

/* Location broadcast pill in the header. */
.loc-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 700; line-height: 1;
    font-family: "Source Sans Pro", sans-serif;
}
.loc-pill.on  { background: #2ABA66; color: #fff; }
.loc-pill.off { background: rgba(0,0,0,0.08); color: #8a8f98; }
.theme-dark .loc-pill.off { background: rgba(255,255,255,0.12); color: #adb5bd; }

/* Group cards (Home) */
.group-icon {
    width: 46px; height: 46px; line-height: 46px; text-align: center;
    font-size: 18px; flex: 0 0 auto;
}
.avatar-stack { display: inline-flex; align-items: center; }
.mini-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: #ED5565; color: #fff; font-size: 11px; font-weight: 700;
    font-family: "Source Sans Pro", sans-serif;
    border: 2px solid #fff; margin-left: -8px;
}
.mini-avatar:first-child { margin-left: 0; }
.mini-avatar.more { background: #C7CBD1; color: #4a4f57; }
.theme-dark .mini-avatar { border-color: #1c1e24; }

/* Location OFF icon — arrow crossed by a red slash (ghostbusters "no" style). */
.loc-off-icon { position: relative; display: inline-block; width: 1em; height: 1em; vertical-align: -0.05em; }
.loc-off-icon > i { position: absolute; left: 0; top: 0; width: 1em; text-align: center; }
.loc-off-icon .fa-slash { color: #DA4453; }
.loc-off-icon-lg { font-size: 40px; line-height: 1; }

/* Dropdown menu items must follow the theme (Bootstrap defaults to near-black text,
   which is unreadable on the dark bg-theme dropdown). */
.dropdown-menu .dropdown-item { color: #1F1F1F; }
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus { color: #1F1F1F; background: rgba(0,0,0,0.05); }
.theme-dark .dropdown-menu .dropdown-item { color: #E6E9EE; }
.theme-dark .dropdown-menu .dropdown-item:hover,
.theme-dark .dropdown-menu .dropdown-item:focus { color: #FFFFFF; background: rgba(255,255,255,0.08); }

/* ── Group chat ─────────────────────────────────────────────── */
.chat-messages {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: calc(100dvh - 210px);
    padding-bottom: 8px;
}
.chat-input-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: #FFFFFF;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.theme-dark .chat-input-bar { background: #1B1B1B; border-top-color: rgba(255,255,255,0.08); }
.chat-input { height: 42px; }

/* Received bubble follows the theme (Sticky's default speech bubble doesn't). */
.speech-bubble.speech-right { background: #ECECEC; color: #1F1F1F; }
.theme-dark .speech-bubble.speech-right { background: #2A2A2C; color: #EDEDED; }

/* Small sender avatar in chat (reuses the mini-avatar sizing). */
.chat-messages .mini-avatar {
    width: 30px; height: 30px; line-height: 30px;
    font-size: 12px; font-weight: 700;
    display: inline-block; text-align: center;
    border-radius: 50%; color: #fff; background: var(--omw-highlight, #ED5565);
}

/* Unread message badge — a notification dot on the group icon, and an inline variant on the chat tile. */
.chat-unread-badge {
    position: absolute; top: -5px; right: -6px;
    min-width: 20px; height: 20px; padding: 0 5px;
    background: #DA4453; color: #fff;
    font-size: 11px; font-weight: 700; line-height: 20px;
    text-align: center; border-radius: 10px;
    box-shadow: 0 0 0 2px #FFFFFF;
}
.theme-dark .chat-unread-badge { box-shadow: 0 0 0 2px #1C1C1E; }
.chat-unread-inline {
    position: static; box-shadow: none;
    display: inline-flex; align-items: center; justify-content: center;
}

/* Blazor's default error UI — hidden until an actual unhandled error occurs. Without this rule the
   MAUI host (which loads only this stylesheet) shows the banner from launch. Blazor's JS sets
   display:block when a real error happens. */
#blazor-error-ui {
    display: none;
    position: fixed; left: 0; bottom: 0; width: 100%;
    z-index: 10000;
    background: #DA4453; color: #fff;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    font-size: 13px; font-weight: 600;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.25);
}
#blazor-error-ui .reload { color: #fff; text-decoration: underline; margin-left: 6px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 12px; top: 8px; }
