/* =================================================================================================
   LoopIn additions to the glc- design system inherited from Netlink and RDP Connect (site.css).
   Same rules: colours from the three brand tokens or the status tokens, never hard-coded; no
   inline styles (CSP style-src 'self').
   ============================================================================================== */

/* -- Public booking pages ------------------------------------------------------------------------ */

.li-public__container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1rem;
}

.li-lead {
    color: var(--glc-ink-soft);
    font-size: 1.05rem;
    max-width: var(--glc-measure);
}

.li-card {
    background: var(--glc-surface);
    border: 1px solid var(--glc-line);
    border-radius: var(--glc-radius);
    box-shadow: var(--glc-shadow);
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
}

.li-picker__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: flex-end;
    margin: 1rem 0;
}

.li-picker__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--glc-ink-soft);
    min-width: 12rem;
}

.li-picker__weeks {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0 1rem;
}

.li-picker__day {
    margin-bottom: 1.25rem;
}

.li-picker__day h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.li-picker__slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: 0.5rem;
}

.li-slot {
    display: inline-block;
    text-align: center;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--glc-primary-edge);
    border-radius: var(--glc-radius-sm);
    background: var(--glc-surface);
    color: var(--glc-primary-ink);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.li-slot:hover,
.li-slot:focus-visible,
.li-slot.is-selected {
    background: var(--glc-primary);
    border-color: var(--glc-primary);
    color: #fff;
}

/* A slot that needs a bump: shown, never hidden (spec 8.4), but not the obvious choice. */
.li-slot--bump {
    border-style: dashed;
    border-color: var(--glc-warn-edge);
    color: var(--glc-warn);
}

.li-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0 1rem;
}

.li-form-grid__wide {
    grid-column: 1 / -1;
}

/* The honeypot: present for bots, absent for people and screen readers. */
.li-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.li-errors {
    margin: 0;
    padding-left: 1.1rem;
}

.li-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 1rem 0;
}

.li-inline {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
}

.li-struck {
    text-decoration: line-through;
    color: var(--glc-ink-faint);
}

/* -- Internal app -------------------------------------------------------------------------------- */

.li-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.li-filters .form-select,
.li-filters .form-control {
    min-width: 9rem;
}

.li-table {
    width: 100%;
    font-size: 0.9rem;
}

.li-table th {
    font-weight: 600;
    color: var(--glc-ink-soft);
    white-space: nowrap;
}

.li-table td,
.li-table th {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--glc-line-soft);
    vertical-align: top;
}

.li-state {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--glc-surface-sunken);
    color: var(--glc-ink-soft);
}

.li-state--booked,
.li-state--completed {
    background: var(--glc-good-wash);
    color: var(--glc-good);
}

.li-state--sent,
.li-state--viewed,
.li-state--created,
.li-state--rescheduled {
    background: var(--glc-primary-wash);
    color: var(--glc-primary-ink);
}

.li-state--canceled,
.li-state--expired,
.li-state--revoked,
.li-state--declined {
    background: var(--glc-danger-wash);
    color: var(--glc-danger);
}

.li-flag {
    display: inline-block;
    margin: 0 0.25rem 0.25rem 0;
    padding: 0 0.4rem;
    border: 1px solid var(--glc-warn-edge);
    border-radius: var(--glc-radius-sm);
    background: var(--glc-warn-wash);
    color: var(--glc-warn);
    font-size: 0.75rem;
}

.li-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.88rem;
}

.li-timeline li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--glc-line-soft);
}

.li-timeline time {
    color: var(--glc-ink-faint);
    font-variant-numeric: tabular-nums;
    margin-right: 0.5rem;
}

.li-mode {
    font-size: 0.72rem;
    padding: 0 0.35rem;
    border-radius: var(--glc-radius-sm);
    background: var(--glc-warn-wash);
    color: var(--glc-warn);
}

.li-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 1rem;
}

.li-result {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--glc-line-soft);
    background: var(--glc-surface);
    padding: 0.4rem 0.6rem;
}

.li-result:hover {
    background: var(--glc-primary-wash);
}

.li-results {
    max-height: 16rem;
    overflow: auto;
    border: 1px solid var(--glc-line);
    border-radius: var(--glc-radius-sm);
}

.li-results:empty {
    display: none;
}

.li-chip {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin: 0 0.35rem 0.35rem 0;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--glc-primary-wash);
    font-size: 0.85rem;
}

.li-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.25rem 1rem;
}

.li-slots-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-height: 20rem;
    overflow: auto;
}

.li-code {
    font-family: var(--glc-font-mono);
    font-size: 0.8rem;
    word-break: break-all;
    white-space: pre-wrap;
}

/* -- Pod: narrow, inside the ConnectWise ticket screen ------------------------------------------- */

.li-pod {
    padding: 0.5rem;
    font-size: 0.85rem;
}

.li-pod .li-table {
    font-size: 0.8rem;
}

/* -- Admin --------------------------------------------------------------------------------------- */

.li-admin-index {
    list-style: none;
    padding: 0;
    margin: 0;
}

.li-admin-index li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--glc-line-soft);
}

.li-admin-index li a {
    font-weight: 600;
    margin-right: 0.5rem;
}

/* The working-hours editor: seven compact rows, not a full-width table. */
.li-week {
    width: auto;
    margin-bottom: 0.35rem;
}

.li-week input[type="time"] {
    min-width: 7.5rem;
}

/* One availability pool in the appointment type editor. */
.li-pool {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--glc-line);
    border-radius: var(--glc-radius-sm);
    background: var(--glc-surface-sunken);
}

.li-pool legend {
    float: none;
    width: auto;
    padding: 0 0.35rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 650;
}

.li-mono {
    font-family: var(--glc-font-mono);
    font-size: 0.85rem;
}

/* Long text (errors, criteria, audit metadata) wraps inside tables that otherwise do not. */
.li-wrap {
    white-space: normal;
    min-width: 16rem;
    max-width: 40rem;
}
