/*
 * The person card, the sheet it opens into, and the match it can end in.
 *
 * The card's base - .ds-person, the scrim, the buttons - is the design
 * system's. What is here is what the wall added: a reason line, the marks
 * money buys, and the two surfaces a tap on the card leads to.
 */

/* On the card ------------------------------------------------------------ */

.ds-person-reason {
    margin-top: 3px;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, .88);
    display: flex;
    align-items: center;
    gap: 4px;
}
.ds-person-reason::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ds-accent);
    flex: 0 0 auto;
}

.ds-person.is-matched .ds-person-btn-like { background: var(--ds-like); color: #fff; }

/* The sheet -------------------------------------------------------------- */

.ps { margin: 0 -20px; }

.ps-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    max-height: 62vh;
    overflow: hidden;
    background: var(--ds-surface-2);
}
.ps-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-photo .ds-person-live { top: 14px; right: 14px; }
.ps-photo-scrim {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 20px 16px;
    background: linear-gradient(transparent, rgba(16, 24, 40, .78));
    color: #fff;
}
.ps-name {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ps-name span:first-child { font-weight: 500; }
.ps-meta { font-size: 13px; opacity: .92; margin-top: 2px; }
.ps-dot { opacity: .6; margin: 0 2px; }

.ps-section { padding: 14px 20px 0; }
.ps-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ds-ink-muted);
    margin-bottom: 8px;
}
.ps-text { font-size: 15px; line-height: 1.5; color: var(--ds-ink); }
.ps-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-chip {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-surface-2);
    color: var(--ds-ink-soft);
    font-size: 13px;
    font-weight: 600;
}
.ps-chip.is-shared { background: var(--ds-accent-soft); color: var(--ds-accent); }

.ps-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 18px 20px 4px;
}
.ps-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 64px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    background: var(--ds-surface);
    color: var(--ds-ink);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .12s var(--ds-ease), background .12s var(--ds-ease);
}
.ps-btn .ion-icon-wrapper { font-size: 22px; }
.ps-btn:hover { text-decoration: none; color: var(--ds-ink); transform: translateY(-1px); }
.ps-btn-like .ion-icon-wrapper { color: var(--ds-like); }
.ps-btn-like.is-liked { background: var(--ds-like); border-color: var(--ds-like); color: #fff; }
.ps-btn-like.is-liked .ion-icon-wrapper { color: #fff; }
.ps-btn-chat .ion-icon-wrapper { color: var(--ds-accent); }

/* It is a match ------------------------------------------------------------ */

.ms { text-align: center; padding: 8px 0 4px; }
.ms-faces {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}
.ms-faces img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ds-surface);
    box-shadow: 0 6px 20px rgba(16, 24, 40, .18);
    animation: ms-pop .5s var(--ds-ease) both;
}
.ms-faces img:last-child { animation-delay: .12s; }
.ms-heart {
    font-size: 28px;
    color: var(--ds-like);
    animation: ms-beat 1.2s ease-in-out infinite;
}
.ms-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.01em;
    margin-bottom: 18px;
}
.ms-actions { display: flex; flex-direction: column; gap: 8px; }
.ms-actions .btn { min-height: 46px; font-weight: 700; }

@keyframes ms-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ms-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/*
 * Discover: the tab strip, the tools beside it, the filter sheet and the
 * boards. The wall itself is .ds-people-grid and the cards are the design
 * system's.
 */
.dv { padding: 4px 0 8px; }

.dv-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.dv-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dv-title { font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }

.dv-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
}
.dv-tabs::-webkit-scrollbar { display: none; }
.dv-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-sm);
    color: var(--ds-ink-soft);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: background .14s var(--ds-ease), color .14s var(--ds-ease);
}
.dv-tab:hover { color: var(--ds-ink); text-decoration: none; background: var(--ds-surface-2); }
.dv-tab.is-on { background: var(--ds-accent); color: var(--ds-on-ink); }
.dv-tab-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.dv-tab.is-on .dv-tab-dot { background: #fff; }

.dv-tools { display: flex; gap: 6px; flex: 0 0 auto; }
.dv-filter,
.dv-boost {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    min-width: 44px;
    padding: 0 12px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-pill);
    background: var(--ds-surface);
    color: var(--ds-ink-soft);
    font-size: 14px;
    font-weight: 600;
}
.dv-filter .ion-icon-wrapper, .dv-boost .ion-icon-wrapper { font-size: 18px; }
.dv-filter-count {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
/* A boost is a purchase, not a tool: second to the filter, and quiet. */
.dv-boost { border-color: transparent; background: transparent; }
.dv-boost .ion-icon-wrapper { color: var(--ds-accent); }
.dv-boost.is-on { background: var(--ds-accent-soft); color: var(--ds-accent); }

/* What the wall is filtered by: a chip each, and the cross takes it off. */
.dv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.dv-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 6px 0 12px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-accent-soft);
    color: var(--ds-accent);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.dv-chip:hover { text-decoration: none; color: var(--ds-accent); background: var(--ds-surface-2); }
.dv-chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .6);
    font-size: 16px;
    line-height: 1;
}

/* A position refused: the city, typed, in the same notice. */
.dv-city { display: flex; gap: 8px; flex: 1 1 100%; }
.dv-city .form-control { flex: 1 1 auto; min-width: 0; min-height: 44px; font-size: 16px; }
.dv-city .btn { min-height: 44px; flex: 0 0 auto; }

.dv-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 14px;
    border-radius: var(--ds-radius);
    background: var(--ds-accent-soft);
    color: var(--ds-ink);
    font-size: 14px;
}

/* The boards */
.dv-boards { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 992px) { .dv-boards { grid-template-columns: 1fr 1fr; } }
.lb-row { display: flex; align-items: center; padding: 6px 0; }
.lb-row + .lb-row { border-top: 1px solid var(--ds-border); }
.lb-avatar { width: 34px; height: 34px; object-fit: cover; margin-left: 8px; }
.lb-rank {
    width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%;
    font-weight: 700; font-size: 12px; background: var(--ds-surface-2); color: var(--ds-ink-muted); flex-shrink: 0;
}
.lb-rank-1 { background: #ffd700; color: #7a5c00; }
.lb-rank-2 { background: #e3e6e8; color: #6b7075; }
.lb-rank-3 { background: #e8b98a; color: #7a4a12; }

/* The filters, inside the sheet */
#dv-filters { display: block; }
.dv-f-row { margin-bottom: 14px; }
.dv-f-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.dv-f-label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.dv-f-label.small { font-weight: 600; color: var(--ds-ink-soft); }
#dv-filters .form-control { min-height: 44px; font-size: 16px; border-radius: var(--ds-radius-sm); }
.dv-f-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.dv-f-check input { width: 20px; height: 20px; }

.dv-f-advanced {
    margin-top: 6px;
    padding: 14px;
    border-radius: var(--ds-radius);
    background: var(--ds-surface-2);
}
.dv-f-advanced.is-locked { border: 1px dashed var(--ds-border-strong); }
.dv-f-vip {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    padding: 2px 7px;
    border-radius: 6px;
    background: linear-gradient(135deg, #d9b45c, #c8a24a);
    color: #3d3100;
}
/* Locked: the fields by name, greyed, with the lock on each. */
.dv-f-locked { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dv-f-locked li { display: flex; align-items: center; gap: 8px; color: var(--ds-ink-muted); font-size: 14px; font-weight: 600; }
.dv-f-locked .ion-icon-wrapper { font-size: 16px; }

.dv-f-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow-y: auto; }
.dv-f-chip { position: relative; margin: 0; }
.dv-f-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.dv-f-chip span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    color: var(--ds-ink-soft);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.dv-f-chip input:checked + span { background: var(--ds-accent-soft); border-color: var(--ds-accent); color: var(--ds-accent); }
.dv-f-range { width: 100%; accent-color: var(--ds-accent); }

.dv-f-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--ds-border);
}
.dv-f-foot .btn { min-height: 44px; font-weight: 700; }

/* In the sheet the head is the sheet's and the foot stays on the bottom
   edge while the fields scroll between them: reset and apply are always
   under the thumb, however long the form. */
.ds-sheet #dv-filters .dv-f-foot {
    position: sticky;
    bottom: -1px;
    margin-top: 8px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0));
    background: var(--ds-surface);
}

@media (max-width: 575.98px) {
    .dv-title { font-size: 1.25rem; }
}

/* Nothing to show spans the whole grid, not one cell of it. */
.dv-empty { grid-column: 1 / -1; }
.dv-more { display: flex; justify-content: center; margin-top: 16px; }
.dv-more .btn { min-height: 44px; }

/* The wall and its filters: one column on a phone, where the filters are
   the sheet the button opens; two on a desk, where they are a column
   beside the wall and the button is not needed. */
.dv-aside { display: none; }
@media (min-width: 991.98px) {
    .dv-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--ds-gap); align-items: start; }
    .dv-aside {
        display: block;
        position: sticky;
        top: calc(var(--ds-topbar-h, 59px) + 12px);
        padding: 16px;
        border-radius: var(--ds-radius);
        background: var(--ds-surface);
        box-shadow: var(--ds-shadow-sm);
    }
    .dv-aside .dv-f-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
    .dv-filter { display: none; }
}

