/* ============================================================
   Profile button, profile page, Google sign-in button
   ============================================================ */

/* Photos inside the round avatar */

.avatar {
    overflow: hidden;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.owner-line {
    display: flex;
    align-items: center;
    gap: 6px;
}


/* Small round profile button, top right */

.profile-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
}

.profile-btn:hover {
    border-color: var(--accent);
    color: var(--fg);
}

.profile-btn.signed-in {
    border: 2px solid var(--accent-soft);
}

.profile-btn.signed-in:hover {
    border-color: var(--accent);
}


/* Google button + divider in the sign-in window */

.btn-google {
    width: 100%;
    background: var(--surface);
    border-color: var(--line);
    color: var(--fg);
}

.btn-google:hover {
    background: var(--soft);
    filter: none;
}

.google-slot {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 12.5px;
    color: var(--muted);
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}


/* Profile page */

.profile-page {
    padding-block: 32px 64px;
}

.profile {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

@media (max-width: 860px) {
    .profile {
        grid-template-columns: 1fr;
    }
}

.profile-card {
    padding: 28px 24px 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    text-align: center;
}

.profile-card h2 {
    margin: 14px 0 2px;
    font-size: 21px;
    letter-spacing: -0.02em;
}

.profile-photo {
    position: relative;
    width: 112px;
    margin: 0 auto;
}

.photo-edit {
    position: absolute;
    inset-inline-end: 0;
    bottom: 2px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 3px solid var(--surface);
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    cursor: pointer;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 18px 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.profile-stats div {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.profile-stats div + div {
    border-inline-start: 1px solid var(--line);
}

.profile-stats b {
    font-size: 20px;
}

.profile-stats span {
    font-size: 12px;
    color: var(--muted);
}

.profile-form {
    text-align: start;
}

.profile-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 16px;
    font-size: 13.5px;
}


/* My posts */

.profile-posts {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.profile-section {
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.profile-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.profile-section h3 {
    margin: 0;
    font-size: 16px;
}

.my-posts {
    display: flex;
    flex-direction: column;
}

.my-post {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.my-post img {
    flex: none;
    width: 96px;
    height: 72px;
    border-radius: 9px;
    object-fit: cover;
    background: var(--soft);
}

.my-post-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.my-post-text b {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.my-post-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.my-post-side .price {
    font-size: 14.5px;
}

@media (max-width: 520px) {
    .my-post img {
        width: 72px;
        height: 54px;
    }

    .my-post-side .price {
        font-size: 13px;
    }
}
