/* ================================================================
   FriendsByChance — checkin.css
   The top bar's check-in pin, and the panel it opens (js/checkin.js).
   ================================================================ */

/* The pin is a .top-bar-icon-btn (main.css); only what it adds is here. */
.checkin-btn            { position: relative; }

/* Checked in a short while ago: a dot, like a status light — it informs,
   it does not ask for anything. */
.checkin-btn--recent::after {
    content:       '';
    position:      absolute;
    top:           6px;
    right:         6px;
    width:         8px;
    height:        8px;
    border-radius: 50%;
    background:    #8FE3A1;
    box-shadow:    0 0 0 2px var(--color-primary);
}

/* ── The panel ────────────────────────────────────────────────────── */
.checkin-pop { max-width: min(320px, calc(100vw - 16px)); }

.checkin-panel {
    display:        flex;
    flex-direction: column;
    gap:            8px;
    min-width:      240px;
    padding:        4px 2px;
}
.checkin-panel-head {
    font-weight: 700;
    font-size:   0.95rem;
    color:       var(--color-text);
}
.checkin-panel-body {
    display:        flex;
    flex-direction: column;
    gap:            2px;
}
.checkin-panel-body:empty { display: none; }
.checkin-panel-place {
    font-size:  0.92rem;
    color:      var(--color-text);
    word-break: break-word;
}
.checkin-panel-when,
.checkin-panel-note {
    font-size: 0.82rem;
    color:     var(--color-text-secondary);
}
.checkin-panel-actions {
    display:   flex;
    flex-wrap: wrap;
    gap:       6px;
}
.checkin-panel-foot {
    border-top:  1px solid var(--color-divider);
    padding-top: 6px;
    font-size:   0.76rem;
    color:       var(--color-text-muted);
}

/* What "here and now" is: the server's time, where the device says it is
   — and the button that shows it on a map. */
.checkin-now {
    display:        flex;
    flex-direction: column;
    gap:            2px;
    margin-top:     6px;
    padding:        6px 8px;
    border:         1px solid var(--color-border);
    border-radius:  8px;
    background:     var(--color-bg);
}
.checkin-now-title   { font-size: 0.76rem; font-weight: 600; color: var(--color-text-secondary); }
.checkin-now-when    { font-size: 0.88rem; color: var(--color-text); }
.checkin-now-skewed  { font-size: 0.76rem; color: var(--color-danger, #c62828); }
.checkin-now-where   { display: flex; align-items: center; gap: 6px; }
.checkin-now-place   { flex: 1 1 auto; min-width: 0; font-size: 0.82rem; color: var(--color-text); word-break: break-word; }
/* "Select…" inside the panel: the form a ghost's are added with, tighter. */
.checkin-panel .checkin-history-form { margin-top: 4px; padding: 8px; gap: 8px; }
.checkin-panel .checkin-history-at   { max-width: 100%; }

/* Here, on a map of its own (a sheet, at country zoom). */
.checkin-map-words { margin: 0 0 8px; font-size: 0.88rem; }
.checkin-map       { height: min(60vh, 420px); border-radius: 8px; overflow: hidden; }

/* The overlay's last block: the recent check-ins, as rows of a history
   (.checkin-history-row, below), on the panel's own rhythm. */
.checkin-recent {
    border-top:  1px solid var(--color-divider);
    padding-top: 6px;
}
.checkin-recent-title {
    font-weight: 600;
    font-size:   0.82rem;
    color:       var(--color-text-secondary);
}
.checkin-recent-list                     { margin-top: 2px; }
.checkin-recent-list .checkin-history-row { padding: 4px 0; }
.checkin-recent-list .checkin-history-row:last-child { border-bottom: 0; }

/* The journeys a check-in is on — a row's, a card's: their own chips. */
.checkin-journeys {
    display:   flex;
    flex-wrap: wrap;
    gap:       4px;
    flex-basis: 100%;
    min-width: 0;
}
.checkin-card .checkin-journeys { margin-top: 6px; }

/* ── My Profile: the Check-ins section ────────────────────────────── */
.profile-checkins {
    margin-top:    24px;
    padding:       14px 16px;
    border:        1px solid var(--color-border);
    border-radius: 10px;
}
.profile-checkins .fbc-section-title--ruled { margin-top: 0; }
.profile-switch {
    display:     flex;
    align-items: center;
    gap:         10px;
    cursor:      pointer;
    font-size:   0.95rem;
}
.profile-switch input { width: 18px; height: 18px; flex-shrink: 0; }
.profile-checkins-saved { color: var(--color-primary); }


/* ── A history: one person's check-ins, a page at a time (historySection) ── */
.checkin-history {
    padding:       14px 16px;
    border:        1px solid var(--color-border);
    border-radius: 10px;
}
.checkin-history-title { display: flex; align-items: center; gap: 6px; }   /* its look: .fbc-section-title (components/shared.css) */
.checkin-history-hint { margin: 4px 0 8px; }
.checkin-history-list {
    display:        flex;
    flex-direction: column;
    margin:         8px 0 0;
    padding:        0;
    list-style:     none;
}
.checkin-history-row {
    display:       flex;
    align-items:   center;
    gap:           8px;
    padding:       7px 0;
    border-bottom: 1px solid var(--color-divider);
}
.checkin-history-body {
    flex:      1;
    min-width: 0;
    display:   flex;
    flex-wrap: wrap;
    gap:       2px 12px;
    font-size: 0.88rem;
}
.checkin-history-when  { font-weight: 600; white-space: nowrap; }
.checkin-history-where { min-width: 0; overflow-wrap: anywhere; }
.checkin-history-how   { color: var(--color-text-muted); font-size: 0.8rem; }
.checkin-history-none  { padding: 6px 0; font-size: 0.85rem; color: var(--color-text-muted); }
.checkin-history-pager {
    display:     flex;
    align-items: center;
    gap:         10px;
    margin-top:  10px;
}
.checkin-history-pager:empty { display: none; }
/* COMPACT (a contact's view): a smaller block, its pager at the row's end,
   the extend switch after it (checkin.js). */
.checkin-history--compact { padding: 10px 12px; }
.checkin-history--compact .checkin-history-list  { margin-top: 4px; }
.checkin-history--compact .checkin-history-row   { padding: 5px 0; }
.checkin-history--compact .checkin-history-pager { justify-content: flex-end; gap: 8px; margin-top: 8px; }
.checkin-history-page { font-size: 0.82rem; color: var(--color-text-secondary); }
.checkin-history-add  { margin-top: 10px; }
.checkin-history-form {
    display:        flex;
    flex-direction: column;
    gap:            10px;
    margin-top:     10px;
    padding:        10px 12px;
    border:         1px solid var(--color-border);
    border-radius:  8px;
    background:     var(--color-bg);
}
.checkin-history-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.checkin-history-label {
    flex:        0 0 4.5em;
    font-size:   0.82rem;
    font-weight: 600;
    color:       var(--color-text-secondary);
}
.checkin-history-value { flex: 1 1 8em; min-width: 0; font-size: 0.88rem; }
.checkin-history-form-actions { display: flex; gap: 8px; }
.checkin-history-banner:empty { display: none; }
.checkin-history--bare { padding: 0; border: none; }
