/* LostFound.css - Lost & Found module styles.
   Tokens only. Gap-only spacing (no external margins on components).
   Mirrors the Complaints / Logbook layout conventions. */

/* The module wrapper this file used to style is retired: the sub-tab bar and the panel
   are siblings on the page now, so the stack owns the gap and the platform one-panel
   rule (Panel.css) gives the panel the tab height. */

.lost-found-sub-tabs {
    display: flex;
}

/* -- Create / form layout ------------------------------------------------- */

.lost-found-create-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.lost-found-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.lost-found-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    padding-bottom: var(--space-3);
}

.lost-found-full-width {
    grid-column: 1 / -1;
}

/* -- Expanded row detail: flat sections (mirrors Logbook, no boxed panels) - */

.lost-found-detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.lost-found-detail-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.lost-found-detail-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.lost-found-detail-section-label {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 2-column summary rows (TLP-581 parity; matches Complaints Guest Info +
   CheckInOut's reservation summary). Grids the inner DetailRow list into two
   columns to halve the vertical space for short label:value summaries; collapses
   to one column on narrow viewports. min-width:0 lets long values wrap in-cell. */
.lost-found-detail-grid .detail-row-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-1_5) var(--space-3);
}

.lost-found-detail-grid .detail-row {
    min-width: 0;
}

@media (max-width: 640px) {
    .lost-found-detail-grid .detail-row-list {
        grid-template-columns: 1fr;
    }
}

/* Compact the editable description textarea in the detail (edit affordance
   preserved, ~2 rows instead of the atom's tall 3-row / --space-20 default).
   An explicit height overrides the atom's hardcoded rows="3"; resize:vertical
   (from base forms) still lets the user expand it for a longer description. */
.lost-found-detail-desc textarea {
    min-height: var(--space-13);
    height: var(--space-13);
}

/* -- Row detail actions (footer: left destructive, right primary) --------- */

.lost-found-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}

.lost-found-actions-left,
.lost-found-actions-right {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.lost-found-actions-right {
    margin-left: auto;
}

/* Disabled Gift-to-Staff wrapped in a titled span so the "why" shows on hover. */
.lost-found-gift-locked {
    display: inline-flex;
    cursor: not-allowed;
}

/* -- Reception comments (found detail thread, TLP-597b) ------------------- */

.lost-found-comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.lost-found-comment {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: var(--space-2);
    padding: var(--space-1) 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-xs);
}

.lost-found-comment-author { font-weight: 600; color: var(--text-body); }
.lost-found-comment-time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lost-found-comment-text { color: var(--text-body); }

.lost-found-comments-empty {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.lost-found-comment-composer {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding-top: var(--space-2);
}

.lost-found-comment-input {
    width: 100%;
    padding: var(--space-2);
    font-family: inherit;
    font-size: var(--text-sm);
    color: var(--text-body);
    background: var(--bg-layer-4);
    border: var(--border-width-1) solid var(--border-default);
    border-radius: var(--border-radius-md);
    resize: vertical;
}

.lost-found-comment-input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.lost-found-comment-actions {
    display: flex;
    justify-content: flex-end;
}

/* -- Photos --------------------------------------------------------------- */

.lost-found-photos {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.lost-found-photo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: var(--bg-layer-3);
}

.lost-found-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lost-found-photo-missing {
    flex-direction: column;
    gap: var(--space-1);
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-align: center;
    padding: var(--space-2);
}

.lost-found-photos-empty {
    color: var(--text-muted);
    font-size: var(--text-sm);
    padding-bottom: var(--space-2);
}

.lost-found-photo-upload {
    padding-top: var(--space-3);
}

/* Inline preview of the just-picked photo in the create modal (TLP-597). */
.lost-found-photo-preview:not(:empty) {
    padding-top: var(--space-2);
}

.lost-found-photo-preview-img {
    max-width: 120px;
    max-height: 120px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    object-fit: cover;
}

/* -- Owner lookup --------------------------------------------------------- */

.lost-found-owner-search {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.lost-found-owner-search-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.lost-found-owner-search-row .input-wrapper {
    flex: 1;
    min-width: 0;
}

.lost-found-owner-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* -- Reporter finder (Log Lost Report helper panel, TLP-593) -------------- */

.lost-found-reporter-search {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.lost-found-reporter-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.lost-found-reporter-results {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* -- Match modal: filter header + rich candidate rows (TLP-598) ----------- */

.lost-found-match {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.lost-found-match-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.lost-found-match-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.lost-found-match-row {
    display: grid;
    grid-template-columns: auto 56px 1fr;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    cursor: pointer;
}

.lost-found-match-row:hover {
    background: var(--bg-layer-2);
}

.lost-found-match-thumb,
.lost-found-match-thumb-empty {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lost-found-match-thumb-empty {
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    background: var(--bg-layer-3);
    color: var(--text-muted);
}

.lost-found-match-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.lost-found-match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.lost-found-match-desc {
    font-size: var(--text-sm);
    color: var(--text-body);
}

.lost-found-match-cat {
    font-weight: 600;
    color: var(--text-body);
}

/* -- Return form ---------------------------------------------------------- */

.lost-found-return-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.lost-found-return-manual {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.lost-found-return-lookup {
    display: flex;
}

/* -- Match ---------------------------------------------------------------- */

.lost-found-match-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.lost-found-match-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-body);
    font-size: var(--text-sm);
}

/* -- Activity log --------------------------------------------------------- */

.lost-found-activity-log {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.lost-found-log-entry {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: var(--space-2);
    padding: var(--space-1) 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-xs);
}

.lost-found-log-time {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.lost-found-log-action { color: var(--text-body); }
.lost-found-log-user { color: var(--text-muted); }

.lost-found-log-empty {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* -- Empty state action --------------------------------------------------- */

.lost-found-empty-action {
    display: flex;
    justify-content: center;
    padding-top: var(--space-3);
}
