/* page-people-detail: scoped styles. */

.people-detail-page {
    max-width: 1440px;
    margin: auto;
    padding: 2rem 1.5rem 4rem;
    color: #292929;
}

.people-detail-author {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1rem;
    padding: .85rem 1rem;
    border: 1px solid #e8eeec;
    border-radius: 16px;
    background: linear-gradient(135deg,#f0faf7,#fff 72%);
    color: #254c48;
    font-size: 1rem;
    font-weight: 600;
}

.people-detail-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.people-detail-back {
    font-size: 2rem;
    color: #222;
    text-decoration: none;
    line-height: 1;
}

@media(min-width:1025px) {
    .people-detail-back {
        display: none;
    }

    .people-detail-author img {
        width: 44px;
        height: 44px;
        box-shadow: 0 0 0 3px #fff,0 0 0 4px #dcece6;
    }

    .people-detail-info {
        position: sticky;
        top: calc(var(--header-desktop-height) + 1.25rem);
        max-height: calc(100dvh - var(--header-desktop-height) - 2.5rem);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

.people-detail-grid {
    display: grid;
    grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
    gap: 1.5rem;
    align-items: start;
}

.people-detail-visual {
    position: relative;
    isolation: isolate;
    aspect-ratio: 3/4;
    background: #302b48;
    border-radius: 20px;
    overflow: hidden;
}

.people-detail-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.people-detail-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(180deg,#0004,transparent 30%,#0005);
    color: #fff;
}

.people-detail-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
}

.people-detail-badges>span {
    padding: .35rem .6rem;
    border-radius: 30px;
    background: #000c;
}

.people-detail-badges .people-detail-purpose {
    background: linear-gradient(90deg,#ab28b5,#ed2773);
}

.people-detail-badges .people-detail-reward {
    color: #ffc34b;
    margin-left: auto;
}

.people-detail-badges .people-detail-sex {
    background: #229cec;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    padding: .25rem .4rem;
}

.people-detail-badges .people-detail-sex.female {
    background: #ee388f;
}

.people-detail-overlay h1 {
    align-self: center;
    text-align: center;
    font-size: clamp(2rem,3.5vw,3.5rem);
    font-weight: 400;
    line-height: 1.55;
    margin: 0;
    padding: 0 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
}

.people-detail-actions {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: .5rem;
}

.people-detail-actions form {
    margin: 0;
}

.people-detail-actions button,.people-detail-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 30px;
    background: #10a5ee;
    color: #fff;
    font: inherit;
    font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
}

.people-detail-actions .people-detail-verify {
    background: linear-gradient(90deg,#f11766,#ee5c96);
}

.people-detail-found {
    background: #ec3685;
    text-align: center;
    padding: .7rem;
    border-radius: 30px;
}

.people-detail-description,.people-detail-comments {
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.people-detail-place,.people-detail-meta,.people-detail-muted {
    color: #999;
    font-size: .85rem;
}

.people-detail-content {
    font-size: 1.05rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.people-detail-comments h2 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.people-detail-comment {
    display: flex;
    gap: .7rem;
    margin: 1rem 0;
}

.people-detail-comment img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.people-detail-comment div {
    min-width: 0;
}

.people-detail-comment h3 {
    font-size: .9rem;
    margin: 0;
    color: #777;
}

.people-detail-comment p {
    font-size: .95rem;
    line-height: 1.7;
    margin: .3rem 0;
    overflow-wrap: anywhere;
}

.people-detail-comment small {
    font-size: .75rem;
    color: #999;
}

.people-detail-comment-form {
    display: flex;
    gap: .5rem;
    padding: .7rem;
    background: white;
    border-radius: 16px;
}

.people-detail-comment-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: #f5f5f5;
    border-radius: 30px;
    padding: .8rem 1rem;
    font: inherit;
}

.people-detail-comment-form button {
    border: 0;
    border-radius: 30px;
    padding: .5rem 1rem;
    background: #00bdbd;
    color: white;
    cursor: pointer;
}

.people-detail-login {
    display: block;
    padding: 1rem;
    background: #fff;
    border-radius: 16px;
    color: #008f91;
    text-decoration: none;
}

.people-detail-notice,.people-detail-empty {
    padding: 1rem;
    border-radius: 14px;
    background: #e6f8f4;
    color: #28636a;
}

.people-detail-share-status {
    color: #008f91;
    font-size: .85rem;
}

.people-comment-pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.people-detail-page a:focus-visible,.people-detail-page button:focus-visible,.people-detail-page input:focus-visible {
    outline: 3px solid #00aaa8;
    outline-offset: 3px;
}

.people-detail-page button:disabled {
    opacity: .6;
    cursor: wait;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

@media(max-width:1024px) {
    body.people_detail {
        background: #f5f5f5;
    }

    body.people_detail .page-main {
        margin-top: 0!important;
        padding: 0 0 5rem!important;
    }

    .people-detail-page {
        padding: .6rem .65rem 1rem;
    }

    .people-detail-author {
        min-height: 3rem;
        margin-bottom: .65rem;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: inherit;
        font-weight: 400;
    }

    .people-detail-grid {
        display: block;
    }

    .people-detail-visual {
        border-radius: 14px;
    }

    .people-detail-overlay {
        padding: .7rem;
        gap: .7rem;
    }

    .people-detail-overlay h1 {
        font-size: clamp(1.7rem,8vw,3.5rem);
        padding: 0 1.5rem;
    }

    .people-detail-badges {
        gap: .25rem;
        font-size: .7rem;
    }

    .people-detail-badges>span {
        padding: .3rem .45rem;
    }

    .people-detail-actions button,.people-detail-actions a {
        font-size: .85rem;
        min-height: 40px;
    }

    .people-detail-description,.people-detail-comments {
        padding: 1rem;
        border-radius: 0;
        margin-bottom: .6rem;
    }

    .people-detail-content {
        font-size: 1rem;
        line-height: 1.8;
    }

    .people-detail-comment-form,.people-detail-login {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1010;
        border-radius: 0;
        padding: .65rem .8rem calc(.65rem + env(safe-area-inset-bottom));
        box-shadow: 0 -2px 8px #00000006;
    }
}
