/**
 * @file        sg-app.css
 * @description Signed-in app pages after the Stitch mockup update: undo bar C-02, switches C-15, quick add C-14, trips T-03, trip form T-04, owner trip T-05, step editor T-06, trash T-11, settings T-19; mobile first
 *
 * @author      Thomas Dobler - SYNTHETIXMIND LTD
 * @company     SYNTHETIXMIND LTD, Paphos, Cyprus
 * @url         https://synthetixmind.com
 *
 * @uid         fbc99364-9fdf-43b7-988e-85a2f17016d2
 * @version     0.1.0.2
 * @created     2026-12-02
 * @updated     2026-12-04
 *
 * @copyright   (c) 2026 by SYNTHETIXMIND LTD
 * @license     Proprietary — All rights reserved
 */

/* Shared: icons inside buttons and the small back link above a page head. */
.sg-button .sg-icon { width: 18px; height: 18px; flex: none; }
.sg-crumb { margin: 0 0 8px; }
.sg-tabs__count { color: var(--ink-muted); font-weight: 400; }

/* C-02 undo bar: check mark, text, seconds left, Undo and close. */
.sg-toast > .sg-icon { width: 20px; height: 20px; flex: none; color: #A8E6B5; }
.sg-toast__count { font-family: var(--font-mono); font-size: 0.85rem; opacity: 0.8; }
.sg-toast__close { background: none; border: 0; color: inherit; font-size: 1.25rem; line-height: 1; padding: 4px 6px; cursor: pointer; }
.sg-toast__close:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* C-15 language and theme switch in the avatar menu, T-19 mode switch: segmented controls. */
.sg-avatar__switch { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; }
.sg-segment { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.sg-avatar__menu .sg-segment a, .sg-segment__item { display: inline-block; width: auto; padding: 6px 12px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.sg-avatar__menu .sg-segment a[aria-current="true"], .sg-segment__item[aria-pressed="true"] { background: var(--navy); color: #F2F4F6; cursor: default; }
[data-theme="dark"] .sg-avatar__menu .sg-segment a[aria-current="true"], [data-theme="dark"] .sg-segment__item[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.sg-segment__item:disabled { opacity: 1; }

/* C-14 quick add: two option tiles, side by side from tablet width. */
.sg-quick__options { display: grid; gap: 12px; margin: 0 0 16px; }
.sg-quick__option { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 16px; background: var(--bg); }
.sg-quick__head { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 8px; }
.sg-quick__head .sg-icon { width: 28px; height: 28px; flex: none; color: var(--accent); }
.sg-quick__head > span { display: flex; flex-direction: column; }
@media (min-width: 700px) { .sg-quick__options { grid-template-columns: 1fr 1fr; } }

/* T-03 trip cards: chips on top, "Open" cue at the bottom of the card link. */
.sg-trip-card__chips { margin: 0 0 8px; }
.sg-trip-card__open { margin: 12px 0 0; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) { .sg-trip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* T-04 trip form: actions on the right, colour and icon side by side from 600 px (sg-grid-2). */
.sg-form-actions { justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }
.sg-trip-form .sg-page-head { margin-bottom: 8px; }

/* T-05 owner trip page: top bar with chips and actions, then the hero. */
.sg-trip-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 16px; }
.sg-trip-bar .sg-chips { margin: 0; }
.sg-trip-hero { margin: 0 0 16px; }
.sg-trip-hero h1 { font-family: var(--font-head); font-size: 1.6rem; margin: 4px 0 8px; overflow-wrap: anywhere; }
.sg-step-row__body { min-width: 0; }
.sg-step-row__body .sg-eyebrow { margin: 0 0 4px; overflow-wrap: anywhere; }
.sg-bulk__count { font-weight: 600; }
@media (min-width: 900px) { .sg-trip-hero h1 { font-size: 2rem; } }

/* T-06 step editor: one column on phones; fields left (2/3), audience and publishing right (1/3) on desktop. */
.sg-stepedit__main, .sg-stepedit__side { min-width: 0; }
@media (min-width: 1000px) {
  .sg-stepedit { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .sg-stepedit__side { position: sticky; top: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 16px; background: var(--bg); }
}

/* T-11 trash: type icon, text, actions; confirmation banner above the list. */
.sg-trash-row { align-items: center; }
.sg-trash-row__icon .sg-icon { width: 28px; height: 28px; color: var(--ink-muted); }
.sg-trash-row__text { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.sg-trash-row .sg-eyebrow { margin: 0; }
.sg-trash-confirm p { margin: 0 0 8px; color: var(--ink); }

/* T-19 account settings: label left, action right; the delete section as the danger zone. */
.sg-setting-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.sg-setting-row p { margin: 0; overflow-wrap: anywhere; }
.sg-setting-row__label { font-weight: 600; }
.sg-panel--danger { border-color: var(--accent); }

/* T-06 place search by name (2026-12-04): results as one tappable list under the search box. */
.sg-place-search { margin: 0 0 16px; }
.sg-place-search label { display: block; font-weight: 600; margin-bottom: 6px; }
.sg-place-search input[type="search"] { width: 100%; }
.sg-place-results { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.sg-place-results li + li { border-top: 1px solid var(--border); }
.sg-place-result { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sg-place-result:hover, .sg-place-result:focus-visible { background: var(--beige); }
.sg-place-result:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sg-place-result__name { font-weight: 600; overflow-wrap: anywhere; }
.sg-place-result__detail { color: var(--ink-muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.sg-place-coords { margin: 12px 0 0; }
.sg-place-coords summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
