/* APD 27.0 — public profile, verified identity and reputation. */

:root {
    --apd27-ink: #222222;
    --apd27-muted: #717171;
    --apd27-line: #dddddd;
    --apd27-blue: #0d2b6c;
    --apd27-green: #7cc70a;
    --apd27-coral: #e91e63;
}

body.author.apd-marketplace-ui {
    background: #ffffff !important;
}

.apd27-profile-page {
    min-height: 70vh;
    padding: 52px 0 90px !important;
    color: var(--apd27-ink);
}

.apd27-profile-shell {
    width: min(calc(100% - 48px), 1120px) !important;
}

.apd27-profile-hero {
    display: grid !important;
    grid-template-columns: 360px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 54px !important;
}

.apd27-profile-card {
    width: 360px !important;
    min-height: 225px !important;
    padding: 26px 24px !important;
    grid-template-columns: minmax(0, 1fr) 112px !important;
    gap: 22px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 22px !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12) !important;
}

.apd27-profile-card .apd16-profile-avatar {
    width: 106px !important;
    height: 106px !important;
    margin-bottom: 13px !important;
}

.apd27-profile-card .apd16-profile-avatar span {
    right: -1px !important;
    bottom: 1px !important;
    width: 28px !important;
    height: 28px !important;
    border-width: 3px !important;
    background: var(--apd27-coral) !important;
    font-size: 13px !important;
}

.apd27-profile-card .apd16-profile-identity h1 {
    font-size: 27px !important;
}

.apd27-profile-card .apd16-profile-identity p {
    margin: 4px 0 0 !important;
    font-size: 12px !important;
}

.apd27-profile-card .apd16-profile-stats > div {
    padding: 13px 0 !important;
}

.apd27-profile-card .apd16-profile-stats dd {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 21px !important;
}

.apd27-profile-card .apd16-profile-stats dd small {
    font-size: 12px;
}

.apd27-profile-card .apd16-profile-stats dt {
    margin-top: 4px !important;
    font-size: 10px !important;
}

.apd27-profile-about {
    padding: 0 !important;
}

.apd27-profile-about h2 {
    margin: 0 0 22px !important;
    color: var(--apd27-ink) !important;
    font-size: 34px !important;
    line-height: 1.16 !important;
}

.apd27-verified-link,
.apd27-verification-pending {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    color: var(--apd27-ink);
    background: transparent;
    font-size: 15px;
    line-height: 1.4;
}

.apd27-verified-link {
    text-decoration: underline;
    cursor: pointer;
}

.apd27-verified-link:hover {
    color: var(--apd27-blue);
}

.apd27-verified-link .apd52-icon,
.apd27-verification-pending .apd52-icon {
    width: 22px;
    height: 22px;
}

.apd27-profile-about .apd16-profile-fact,
.apd27-profile-about .apd16-profile-bio {
    max-width: 580px;
}

.apd27-profile-points,
.apd27-profile-trips {
    margin-top: 54px;
    padding-top: 42px;
    border-top: 1px solid var(--apd27-line);
}

.apd27-profile-points > header,
.apd27-profile-reviews > header,
.apd27-profile-listings > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
}

.apd27-profile-points > header span {
    color: var(--apd27-blue);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.apd27-profile-points > header h2,
.apd27-profile-trips h2,
.apd27-profile-listings > header h2,
.apd27-profile-reviews > header h2 {
    margin: 4px 0 0 !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    letter-spacing: -.025em !important;
}

.apd27-profile-points > header > strong {
    color: var(--apd27-blue);
    font-size: 29px;
    line-height: 1;
}

.apd27-profile-points > header > strong small {
    color: var(--apd27-muted);
    font-size: 12px;
    font-weight: 600;
}

.apd27-badge-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.apd27-badge-grid article {
    position: relative;
    min-height: 98px;
    padding: 17px 18px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    border: 1px solid var(--apd27-line);
    border-radius: 16px;
    background: #fff;
}

.apd27-badge-grid article > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--apd27-blue);
    background: #edf4ff;
    font-size: 21px;
    font-weight: 800;
}

.apd27-badge-grid article strong,
.apd27-badge-grid article p {
    display: block;
}

.apd27-badge-grid article p {
    margin: 4px 0 0;
    color: var(--apd27-muted);
    font-size: 12px;
    line-height: 1.4;
}

.apd27-badge-grid article > small {
    padding: 5px 8px;
    border-radius: 999px;
    color: #356800;
    background: #eef8e5;
    font-size: 10px;
    font-weight: 750;
}

.apd27-badge-grid article.is-locked {
    background: #fafafa;
}

.apd27-badge-grid article.is-locked > span {
    color: #999;
    background: #eeeeee;
}

.apd27-badge-grid article.is-locked > small {
    color: #777;
    background: #ededed;
}

.apd27-profile-reviews,
.apd27-profile-listings {
    margin-top: 54px !important;
    padding-top: 42px !important;
}

.apd27-profile-reviews > header,
.apd27-profile-listings > header {
    margin-bottom: 24px;
}

.apd27-profile-reviews > header p {
    margin: 6px 0 0 !important;
    color: var(--apd27-muted);
    font-size: 13px;
}

.apd27-carousel-actions,
.apd27-profile-listings > header > div {
    display: flex;
    gap: 8px;
}

.apd27-carousel-actions button,
.apd27-profile-listings > header button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--apd27-line);
    border-radius: 50%;
    color: var(--apd27-ink);
    background: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.apd27-carousel-actions button:hover,
.apd27-profile-listings > header button:hover {
    background: #f7f7f7;
}

.apd27-review-viewport {
    overflow: hidden;
}

.apd27-profile-reviews .apd16-profile-review-grid {
    display: flex !important;
    gap: 0 !important;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.apd27-profile-reviews .apd16-profile-review-grid::-webkit-scrollbar {
    display: none;
}

.apd27-profile-reviews .apd16-profile-review-grid > article {
    flex: 0 0 33.3333%;
    min-width: 0;
    min-height: 175px;
    padding: 8px 28px 8px 4px;
    border-right: 1px solid #eeeeee;
    scroll-snap-align: start;
}

.apd27-profile-reviews .apd16-profile-review-grid > article:nth-child(3n) {
    border-right-color: transparent;
}

.apd27-profile-reviews .apd16-profile-review-grid p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.apd27-profile-reviews.is-expanded .apd27-review-viewport {
    overflow: visible;
}

.apd27-profile-reviews.is-expanded .apd16-profile-review-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px 38px !important;
    overflow: visible;
}

.apd27-profile-reviews.is-expanded .apd16-profile-review-grid > article {
    min-height: 0;
    padding-right: 18px;
}

.apd27-profile-reviews.is-expanded .apd16-profile-review-grid p {
    display: block;
}

.apd27-show-all,
.apd27-profile-all-listings {
    min-height: 46px;
    margin-top: 22px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--apd27-ink);
    border-radius: 10px;
    color: var(--apd27-ink) !important;
    background: #fff;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none !important;
    cursor: pointer;
}

.apd27-profile-trips > div {
    margin-top: 24px;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}

.apd27-profile-trips > div::-webkit-scrollbar {
    display: none;
}

.apd27-profile-trips a {
    flex: 0 0 140px;
    color: var(--apd27-ink) !important;
    text-decoration: none !important;
}

.apd27-stamp {
    width: 136px;
    height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 2px solid currentColor;
    border-radius: 24px 12px 24px 12px;
    color: #e0574f;
    background: #fff;
}

.apd27-profile-trips .is-color-2 .apd27-stamp { color: #27873b; border-radius: 50%; }
.apd27-profile-trips .is-color-3 .apd27-stamp { color: #f2993d; }
.apd27-profile-trips .is-color-4 .apd27-stamp { color: #98685d; border-radius: 12px; }

.apd27-stamp strong {
    max-width: 112px;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apd27-stamp b {
    font-size: 28px;
}

.apd27-profile-trips a > small {
    margin-top: 9px;
    display: block;
    color: var(--apd27-muted);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

.apd27-profile-listings .apd16-profile-listing-grid {
    display: flex !important;
    gap: 16px !important;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.apd27-profile-listings .apd16-profile-listing-grid::-webkit-scrollbar { display: none; }
.apd27-profile-listings .apd16-profile-listing-grid > * { flex: 0 0 calc((100% - 80px) / 6); min-width: 150px; scroll-snap-align: start; }

.apd27-profile-listings.is-expanded .apd16-profile-listing-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 16px !important;
    overflow: visible;
}

.apd27-profile-listings.is-expanded .apd16-profile-listing-grid > * {
    min-width: 0;
}

/* Listing host card ---------------------------------------------------- */
body.single-listing .apd27-host-card {
    padding: 0 !important;
    overflow: hidden !important;
}

body.single-listing .apd27-host-card-link {
    width: 100%;
    min-height: 100%;
    padding: 28px 26px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    align-items: center;
    gap: 24px;
    color: inherit !important;
    text-decoration: none !important;
}

body.single-listing .apd27-host-card-link:hover h3 {
    text-decoration: underline;
}

body.single-listing .apd27-host-card-link .apd16-host-stats dd small {
    font-size: 10px;
}

body.single-listing .apd27-host-earned-badges {
    margin: 16px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

body.single-listing .apd27-host-earned-badges span {
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--apd27-blue);
    background: #edf4ff;
    font-size: 11px;
    font-weight: 650;
}

body.single-listing .apd13-guest-favorite.is-awaiting-reviews {
    background: #ffffff !important;
}

body.single-listing .apd13-guest-favorite.is-awaiting-reviews .apd13-laurel,
body.single-listing .apd13-guest-favorite.is-awaiting-reviews .apd13-favorite-rating > span {
    color: #b0b0b0 !important;
}

body.single-listing .apd13-guest-favorite.is-awaiting-reviews .apd13-favorite-copy > span,
body.single-listing .apd13-guest-favorite.is-awaiting-reviews .apd13-favorite-count > span {
    color: #717171 !important;
}

/* Verified identity modal --------------------------------------------- */
.apd27-verification-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    padding: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .34);
}

.apd27-verification-modal[aria-hidden="false"] {
    display: flex;
}

.apd27-verification-modal > section {
    position: relative;
    width: min(100%, 420px);
    max-height: min(82vh, 610px);
    padding: 44px 30px 30px;
    overflow-y: auto;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 75px rgba(0, 0, 0, .28);
}

.apd27-verification-modal > section > button {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    color: var(--apd27-ink);
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.apd27-verification-card {
    position: relative;
    min-height: 185px;
    margin: 5px auto 28px;
    padding: 22px;
    overflow: hidden;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #d40075, #ff315d 65%, #ff6a67);
    box-shadow: 0 18px 32px rgba(203, 0, 91, .22);
}

.apd27-verification-card::after {
    content: "APD  APD  APD  APD  APD";
    position: absolute;
    inset: auto -18px 18px 18px;
    color: rgba(255, 255, 255, .12);
    font-size: 24px;
    font-weight: 800;
    transform: rotate(-13deg);
}

.apd27-verification-card > div,
.apd27-verification-card > p,
.apd27-verification-card > img {
    position: relative;
    z-index: 2;
}

.apd27-verification-card > div strong,
.apd27-verification-card > div span {
    display: block;
}

.apd27-verification-card > div span {
    margin-top: 2px;
    font-size: 12px;
}

.apd27-verification-card > p {
    width: 62%;
    margin: 37px 0 0;
    font-size: 11px;
    line-height: 1.4;
}

.apd27-verification-card > img {
    position: absolute;
    right: 18px;
    bottom: 17px;
    width: 84px;
    height: 84px;
    border: 3px solid rgba(255, 255, 255, .8);
    border-radius: 12px;
    object-fit: cover;
}

.apd27-verification-modal h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.apd27-verification-modal > section > p {
    margin: 0;
    color: #565656;
    font-size: 14px;
    line-height: 1.55;
}

body.apd27-modal-open { overflow: hidden !important; }

@media (max-width: 980px) {
    .apd27-profile-hero { grid-template-columns: 340px minmax(0, 1fr) !important; gap: 36px !important; }
    .apd27-profile-card { width: 340px !important; }
    .apd27-profile-listings .apd16-profile-listing-grid > * { flex-basis: calc((100% - 48px) / 4); }
}

@media (max-width: 760px) {
    .apd27-profile-page { padding: 28px 0 70px !important; }
    .apd27-profile-shell { width: calc(100% - 32px) !important; }
    .apd27-profile-hero { grid-template-columns: 1fr !important; gap: 34px !important; }
    .apd27-profile-card { width: 100% !important; max-width: 430px; min-height: 215px !important; margin: 0 auto; }
    .apd27-profile-about h2 { font-size: 28px !important; }
    .apd27-badge-grid { grid-template-columns: 1fr; }
    .apd27-profile-reviews .apd16-profile-review-grid > article { flex-basis: 86%; }
    .apd27-profile-reviews.is-expanded .apd16-profile-review-grid { grid-template-columns: 1fr; }
    .apd27-profile-listings .apd16-profile-listing-grid > * { flex-basis: 68%; }
    .apd27-profile-listings.is-expanded .apd16-profile-listing-grid { grid-template-columns: 1fr; }
    body.single-listing .apd27-host-card-link { grid-template-columns: minmax(0, 1fr) 104px; padding: 24px 18px; gap: 16px; }
    .apd27-verification-modal { padding: 0; align-items: end; }
    .apd27-verification-modal > section { width: 100%; max-height: 88vh; padding: 46px 22px calc(26px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; }
}

@media (max-width: 430px) {
    .apd27-profile-card { grid-template-columns: minmax(0, 1fr) 98px !important; padding: 23px 18px !important; gap: 14px !important; }
    .apd27-profile-card .apd16-profile-avatar { width: 92px !important; height: 92px !important; }
    .apd27-profile-card .apd16-profile-identity h1 { font-size: 23px !important; }
    .apd27-badge-grid article { grid-template-columns: 42px minmax(0, 1fr); }
    .apd27-badge-grid article > small { grid-column: 2; justify-self: start; }
}
