:root {
    --ag-gold: #f5b400;
    --ag-gold-soft: #fff7df;
    --ag-ink: #172431;
    --ag-muted: #65717c;
    --ag-line: #e8e9eb;
    --ag-surface: #ffffff;
    --ag-soft-surface: #f7f7f5;
    --ag-radius: 14px;
}

body.ag-listivo-artist-profile {
    background: #fff;
}

/* Prevent the original Listivo biography box from flashing before relocation. */
body.ag-listivo-artist-profile:not(.ag-artist-profile-ready) .elementor-widget:has(.listivo-user-description),
body.ag-listivo-artist-profile:not(.ag-artist-profile-ready) .elementor-widget:has(+ .elementor-widget .listivo-user-description) {
    visibility: hidden !important;
    opacity: 0 !important;
}

/* The legacy artist_galerisi shortcode remains available during migration, but its old output is not shown. */
body.ag-listivo-artist-profile .artist-custom-gallery-section,
body.ag-listivo-artist-profile .ag-legacy-artist-gallery-hidden {
    display: none !important;
}


body.ag-listivo-artist-profile .listivo-user-hero__top {
    height: 255px;
    min-height: 255px;
    overflow: hidden;
}

body.ag-listivo-artist-profile .listivo-user-hero__background,
body.ag-listivo-artist-profile .listivo-user-hero__background > img,
body.ag-listivo-artist-profile .ag-cover-collage,
body.ag-listivo-artist-profile .ag-cover-collage__item {
    width: 100%;
    height: 100%;
}

body.ag-listivo-artist-profile .listivo-user-hero__background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 20, 29, 0.11) 0%, rgba(10, 20, 29, 0.38) 74%, rgba(255, 255, 255, 0.09) 100%);
    pointer-events: none;
}

body.ag-listivo-artist-profile .listivo-user-hero__background {
    position: relative;
}

body.ag-listivo-artist-profile .listivo-user-hero__background > img,
body.ag-listivo-artist-profile .ag-cover-collage__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.ag-listivo-artist-profile .listivo-user-hero__background > img {
    object-position: center;
}

body.ag-listivo-artist-profile .ag-cover-collage__item img {
    object-position: 50% 45%;
}

.ag-cover-collage {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    background: #15202a;
}

.ag-artist-cover--count-2 .ag-cover-collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ag-artist-cover--count-3 .ag-cover-collage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ag-artist-cover--count-4 .ag-cover-collage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ag-artist-cover--count-5 .ag-cover-collage {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ag-cover-collage__item {
    min-width: 0;
    overflow: hidden;
    border-right: 2px solid rgba(255, 255, 255, 0.18);
}

.ag-cover-collage__item:last-child {
    border-right: 0;
}

body.ag-listivo-artist-profile .listivo-user-hero__content-wrapper {
    margin-top: 0 !important;
    padding-bottom: 0;
}

body.ag-listivo-artist-profile .listivo-user-hero__content {
    margin-top: -94px !important;
    padding-top: 0;
    padding-bottom: 10px;
}

body.ag-listivo-artist-profile .listivo-user-hero__avatar {
    width: 188px;
    height: 188px;
    margin-top: 0;
    border: 5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 14px 36px rgba(18, 31, 42, 0.14);
    overflow: hidden;
}

body.ag-listivo-artist-profile .listivo-user-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.ag-listivo-artist-profile .listivo-user-hero__name {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
    color: var(--ag-ink);
    font-size: clamp(31px, 2.55vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.ag-verified-badge {
    display: none !important;
}

.ag-artist-discipline {
    display: none !important;
}

body.ag-listivo-artist-profile .listivo-user-hero__meta,
body.ag-listivo-artist-profile .ag-member-since-hidden,
body.ag-listivo-artist-profile .ag-source-meta-hidden {
    display: none !important;
}

.ag-country-flag {
    display: block;
    width: 22px;
    height: 17px;
    flex: 0 0 auto;
    object-fit: contain;
    line-height: 1;
}

.ag-hero-identity {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 16px auto 0;
    padding: 10px 12px;
    border: 1px solid rgba(23, 36, 49, 0.08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(18, 31, 42, 0.07);
}

.ag-hero-identity__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #f8f9fb;
    color: var(--ag-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.ag-hero-identity__pill--location {
    background: #f8f9fb;
}

.ag-verified-name-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    margin-left: 1px;
    border-radius: 50%;
    cursor: help;
    outline: none;
    transform: translateY(1px);
}

.ag-verified-name-badge svg {
    display: block;
    width: 28px;
    height: 28px;
    fill: var(--ag-gold);
    filter: drop-shadow(0 3px 7px rgba(245, 180, 0, 0.18));
}

.ag-verified-name-badge__check {
    fill: none;
    stroke: #fff;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ag-verified-tooltip {
    position: absolute;
    z-index: 120;
    left: calc(100% + 11px);
    top: 50%;
    bottom: auto;
    width: 272px;
    max-width: min(272px, calc(100vw - 32px));
    padding: 10px 13px;
    border: 1px solid rgba(245, 180, 0, 0.48);
    border-radius: 12px;
    background: #fffaf0;
    color: #283642;
    box-shadow: 0 10px 28px rgba(18, 31, 42, 0.13);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0.01em;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translate(6px, -50%);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    pointer-events: none;
}

.ag-verified-tooltip::after {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    width: 11px;
    height: 11px;
    border-left: 1px solid rgba(245, 180, 0, 0.48);
    border-bottom: 1px solid rgba(245, 180, 0, 0.48);
    background: #fffaf0;
    transform: translateY(-50%) rotate(45deg);
}

.ag-verified-name-badge:hover .ag-verified-tooltip,
.ag-verified-name-badge:focus .ag-verified-tooltip,
.ag-verified-name-badge:focus-within .ag-verified-tooltip,
.ag-verified-name-badge.is-open .ag-verified-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
}

.ag-verified-name-badge:focus-visible {
    box-shadow: 0 0 0 3px rgba(245, 180, 0, 0.24);
}

.ag-hero-identity__icon {
    width: 20px;
    height: 20px;
    color: var(--ag-gold);
    flex: 0 0 auto;
}

.ag-hero-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.ag-hero-button {
    min-width: 154px;
    min-height: 48px;
    padding: 13px 20px;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.ag-hero-button:hover {
    transform: translateY(-2px);
}

.ag-hero-button--primary {
    border: 1px solid var(--ag-gold);
    background: var(--ag-gold);
    color: #151a1f;
    box-shadow: 0 8px 20px rgba(245, 180, 0, 0.2);
}

.ag-hero-button--secondary {
    border: 1px solid #1f2d38;
    background: #fff;
    color: #1f2d38;
}

.ag-hero-button__label--mobile {
    display: none;
}

.ag-hero-button--artworks {
    min-width: 275px;
    max-width: min(520px, calc(100vw - 40px));
    line-height: 1.25;
    white-space: normal;
}

body.ag-listivo-artist-profile .listivo-user-hero__socials {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

body.ag-listivo-artist-profile .listivo-user-hero__socials .listivo-social-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-color: #ccd2d7;
    background: #fff;
}

body.ag-listivo-artist-profile .listivo-user-hero__socials .listivo-social-icon svg,
body.ag-listivo-artist-profile .listivo-user-hero__socials .listivo-social-icon i {
    transform: scale(0.94);
}

body.ag-listivo-artist-profile .listivo-user-hero__socials .listivo-social-icon:hover {
    border-color: var(--ag-gold);
    background: var(--ag-gold-soft);
}

body.ag-listivo-artist-profile .listivo-user-hero__socials .ag-social-icon--website {
    position: relative;
}

body.ag-listivo-artist-profile .listivo-user-hero__socials .ag-social-tooltip {
    position: absolute;
    z-index: 125;
    left: 50%;
    bottom: calc(100% + 9px);
    width: max-content;
    max-width: 180px;
    padding: 6px 10px;
    border: 1px solid rgba(245, 180, 0, 0.48);
    border-radius: 999px;
    background: #fff8e5;
    color: #283642;
    box-shadow: 0 8px 20px rgba(18, 31, 42, 0.12);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 5px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
    pointer-events: none;
}

body.ag-listivo-artist-profile .listivo-user-hero__socials .ag-social-icon--website:hover .ag-social-tooltip,
body.ag-listivo-artist-profile .listivo-user-hero__socials .ag-social-icon--website:focus .ag-social-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.ag-artist-profile {
    position: relative;
    width: 100%;
    padding: 14px 20px 32px;
    background: #fff;
}

.ag-artist-profile__inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.ag-artist-tabs {
    position: sticky;
    top: 84px;
    z-index: 35;
    display: flex;
    align-items: center;
    gap: 30px;
    min-height: 62px;
    padding: 0 26px;
    border: 1px solid var(--ag-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 28px rgba(20, 32, 43, 0.06);
    backdrop-filter: blur(12px);
}

.admin-bar .ag-artist-tabs {
    top: 116px;
}

.ag-artist-tabs__button {
    position: relative;
    min-height: 61px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #727b83;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.065em;
    cursor: pointer;
}

.ag-artist-tabs__button::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--ag-gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
}

.ag-artist-tabs__button:hover,
.ag-artist-tabs__button.is-active {
    color: var(--ag-ink);
}

.ag-artist-tabs__button.is-active::after {
    transform: scaleX(1);
}

.ag-artist-panel {
    padding-top: 42px;
    animation: agPanelIn 220ms ease both;
}

.ag-artist-panel[hidden] {
    display: none !important;
}

@keyframes agPanelIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ag-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--ag-line);
}

.ag-section-heading__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #9b7708;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.ag-section-heading h2 {
    margin: 0;
    color: var(--ag-ink);
    font-size: clamp(26px, 2.05vw, 34px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.ag-section-heading__title-row {
    display: flex;
    align-items: center;
    gap: 11px;
}

.ag-section-heading__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--ag-gold-soft);
    color: #6f5500;
    font-size: 14px;
    font-weight: 800;
}

.ag-original-listings-label-hidden {
    display: none !important;
}

.ag-relocated-listings .listivo-user-listings__list {
    margin-top: 0 !important;
}

.ag-relocated-listings .listivo-listing-grid {
    row-gap: 28px;
}

.ag-relocated-listings .listivo-user-listings__pagination,
.ag-relocated-listings .listivo-user-listings__mobile-pagination,
.ag-relocated-listings .ag-fallback-pagination {
    width: 100%;
    margin-top: 34px !important;
}

.ag-relocated-listings .listivo-pagination {
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--ag-line);
}

.ag-relocated-listings .listivo-pagination__list {
    flex-wrap: wrap;
    gap: 8px;
}

.ag-relocated-listings .listivo-pagination__item {
    width: 44px;
    height: 44px;
    margin-right: 0;
    border: 1px solid #e1e4e7;
    border-radius: 8px;
    background: #fff;
    color: var(--ag-ink);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 5px 16px rgba(18, 31, 42, 0.04);
}

.ag-relocated-listings .listivo-pagination__item:not(.listivo-pagination__item--active):not(.listivo-pagination__item--disabled):hover {
    border-color: var(--ag-ink) !important;
    background: var(--ag-ink) !important;
    color: var(--ag-gold) !important;
    box-shadow: 0 8px 20px rgba(23, 36, 49, 0.18);
}

/* Listivo arrow SVGs can use either fill or stroke and some theme rules set
   those values directly. Force every arrow drawing primitive to ArtGallery gold. */
.ag-relocated-listings .listivo-pagination__item:not(.listivo-pagination__item--active):not(.listivo-pagination__item--disabled):hover svg,
.ag-relocated-listings .listivo-pagination__item:not(.listivo-pagination__item--active):not(.listivo-pagination__item--disabled):hover svg *,
.ag-relocated-listings .listivo-pagination__item:not(.listivo-pagination__item--active):not(.listivo-pagination__item--disabled):hover i,
.ag-relocated-listings .listivo-pagination__item:not(.listivo-pagination__item--active):not(.listivo-pagination__item--disabled):hover::before,
.ag-relocated-listings .listivo-pagination__item:not(.listivo-pagination__item--active):not(.listivo-pagination__item--disabled):hover::after {
    color: #f5b400 !important;
    fill: #f5b400 !important;
    stroke: #f5b400 !important;
}

.ag-relocated-listings .listivo-pagination__item--active,
.ag-relocated-listings .listivo-pagination__item--active:hover {
    border-color: var(--ag-gold);
    background: var(--ag-gold);
    color: #151a1f;
    box-shadow: 0 8px 18px rgba(245, 180, 0, 0.2);
}

.ag-relocated-listings .listivo-pagination__item--disabled {
    opacity: 0.42;
    background: #f4f5f6;
}

.ag-relocated-listings .ag-pagination-arrow svg {
    width: 12px;
    height: 11px;
}

.ag-relocated-listings .ag-pagination-arrow svg path {
    fill: currentColor;
}

.ag-fallback-pagination {
    display: block !important;
}

@media (min-width: 768px) {
    .ag-relocated-listings .listivo-user-listings__pagination:not(.ag-fallback-pagination) {
        display: block !important;
    }

    .ag-relocated-listings .listivo-user-listings__mobile-pagination {
        display: none !important;
    }
}

.ag-empty-state {
    margin: 0;
    padding: 34px;
    border: 1px solid var(--ag-line);
    border-radius: var(--ag-radius);
    background: var(--ag-soft-surface);
    color: var(--ag-muted);
    text-align: center;
}

.ag-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 34px;
    align-items: start;
}

.ag-about-grid__biography {
    min-width: 0;
}

.ag-relocated-biography,
.ag-editorial-content {
    color: #25323c !important;
    font-size: 17px !important;
    line-height: 1.9 !important;
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: auto;
}

.ag-relocated-biography p,
.ag-editorial-content p {
    text-align: justify !important;
    text-justify: inter-word;
}

/* Biography card: matches the .ag-artist-facts aside so the About tab reads as one paired unit. */
.ag-relocated-biography {
    position: relative;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 32px 34px !important;
    border: 1px solid var(--ag-line) !important;
    border-radius: 18px !important;
    background: #fbfbfa !important;
    box-shadow: 0 12px 32px rgba(18, 31, 42, 0.06);
}

.ag-relocated-biography::before {
    content: "";
    position: absolute;
    top: 0;
    right: 34px;
    left: 34px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--ag-gold);
}

.ag-relocated-biography p:last-child {
    margin-bottom: 0;
}

/* First paragraph reads as a short editorial lead-in. */
.ag-relocated-biography .ag-biography-lead {
    color: var(--ag-ink) !important;
    font-size: 19px !important;
    font-weight: 600;
    line-height: 1.65 !important;
}

.ag-relocated-biography blockquote {
    margin: 22px 0;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--ag-gold);
    color: var(--ag-ink);
    font-size: 17px;
    font-style: italic;
    line-height: 1.7;
}

.ag-biography-collapsed {
    max-height: 400px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 96%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 96%);
}

.ag-biography-expanded {
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
}

.ag-biography-toggle {
    margin-top: 20px;
    padding: 0 0 6px;
    border: 0;
    border-bottom: 2px solid var(--ag-gold);
    background: transparent;
    color: var(--ag-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    cursor: pointer;
}

.ag-artist-facts {
    overflow: hidden;
    border: 1px solid var(--ag-line);
    border-radius: 18px;
    background: #fbfbfa;
    box-shadow: 0 12px 32px rgba(18, 31, 42, 0.06);
}

.ag-artist-facts__item {
    position: relative;
    min-height: 74px;
    padding: 15px 66px 14px 20px;
    border-bottom: 1px solid var(--ag-line);
}

.ag-artist-facts__item:last-child {
    border-bottom: 0;
}

.ag-artist-facts__label {
    display: block;
    margin-bottom: 5px;
    color: #6f7982;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.11em;
}


.ag-artist-facts__icon {
    position: absolute;
    top: 50%;
    right: 18px;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 10px;
    background: #f5b400;
    color: #172431;
    box-shadow: 0 6px 14px rgba(245, 180, 0, 0.22);
    transform: translateY(-50%);
    pointer-events: none;
}

.ag-artist-facts__icon svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.ag-artist-facts__item strong,
.ag-artist-facts__item a {
    color: var(--ag-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.ag-artist-facts__item a {
    text-decoration-color: var(--ag-gold);
    text-underline-offset: 3px;
}

.ag-editorial-content {
    max-width: 880px;
}

.ag-editorial-content p {
    margin: 0 0 14px;
    padding: 17px 20px;
    border-left: 3px solid var(--ag-gold);
    background: var(--ag-soft-surface);
}

.ag-artist-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.ag-artist-photos-grid--count-1 {
    grid-template-columns: minmax(0, 560px);
}

.ag-artist-photos-grid--count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 900px;
}

.ag-artist-photos-grid--count-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ag-artist-photo-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ag-line);
    border-radius: 12px;
    background: #10151a;
    box-shadow: 0 8px 24px rgba(18, 31, 42, 0.06);
    aspect-ratio: 1 / 1;
}

.ag-artist-photo-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: zoom-in;
}

.ag-artist-photo-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(7, 13, 18, 0.08);
    transition: background-color 220ms ease;
    pointer-events: none;
}

.ag-artist-photo-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.001);
    transition: transform 360ms ease, opacity 260ms ease;
}

.ag-artist-photo-link__zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    background: rgba(13, 20, 27, 0.62);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
    transition: opacity 220ms ease, transform 260ms cubic-bezier(0.2, 0.75, 0.25, 1.2);
    pointer-events: none;
}

.ag-artist-photo-link__zoom svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.ag-artist-photo-link:hover::after,
.ag-artist-photo-link:focus-visible::after {
    background: rgba(7, 13, 18, 0.34);
}

.ag-artist-photo-link:hover img,
.ag-artist-photo-link:focus-visible img {
    transform: scale(1.055);
}

.ag-artist-photo-link:hover .ag-artist-photo-link__zoom,
.ag-artist-photo-link:focus-visible .ag-artist-photo-link__zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ag-artist-photo-link:focus-visible {
    outline: 3px solid var(--ag-gold);
    outline-offset: 3px;
}

body.ag-photo-lightbox-open {
    overflow: hidden !important;
}

.ag-photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 84px;
    align-items: center;
    background: rgba(4, 8, 12, 0.94);
    opacity: 0;
    transition: opacity 180ms ease;
    touch-action: pan-y;
}

.ag-photo-lightbox[hidden] {
    display: none !important;
}

.ag-photo-lightbox.is-open {
    opacity: 1;
}

.ag-photo-lightbox__stage {
    position: relative;
    display: flex;
    width: 100%;
    height: 100vh;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 54px 14px 62px;
}

.ag-photo-lightbox__image {
    display: block;
    max-width: min(100%, 1500px);
    max-height: calc(100vh - 116px);
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
    opacity: 0.45;
    transform: scale(0.985);
    transition: opacity 180ms ease, transform 180ms ease;
    user-select: none;
    -webkit-user-drag: none;
}

.ag-photo-lightbox__image.is-loaded {
    opacity: 1;
    transform: scale(1);
}

.ag-photo-lightbox__close,
.ag-photo-lightbox__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ag-photo-lightbox__close:hover,
.ag-photo-lightbox__nav:hover,
.ag-photo-lightbox__close:focus-visible,
.ag-photo-lightbox__nav:focus-visible {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
    outline: none;
}

.ag-photo-lightbox__close {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    right: max(22px, env(safe-area-inset-right));
    z-index: 3;
    width: 48px;
    height: 48px;
}

.ag-photo-lightbox__close svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.ag-photo-lightbox__nav {
    position: relative;
    z-index: 2;
    width: 50px;
    height: 50px;
    justify-self: center;
}

.ag-photo-lightbox__nav svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.ag-photo-lightbox__nav[hidden] {
    display: none !important;
}

.ag-photo-lightbox__counter {
    position: absolute;
    bottom: max(22px, env(safe-area-inset-bottom));
    left: 50%;
    min-width: 68px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(7, 12, 17, 0.68);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: center;
    transform: translateX(-50%);
}

.ag-video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.ag-video-card {
    overflow: hidden;
    border-radius: var(--ag-radius);
    background: #111;
    box-shadow: 0 12px 32px rgba(18, 31, 42, 0.1);
    aspect-ratio: 16 / 9;
}

.ag-video-card iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.ag-video-link {
    display: flex;
    min-height: 130px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ag-line);
    border-radius: var(--ag-radius);
    color: var(--ag-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.ag-source-widget-hidden {
    display: none !important;
}

body.ag-listivo-artist-profile .listivo-create-message-form,
body.ag-listivo-artist-profile lst-create-direct-message {
    scroll-margin-top: 170px;
}

@media (max-width: 1024px) {
    .ag-artist-tabs {
        top: 72px;
    }

    .admin-bar .ag-artist-tabs {
        top: 104px;
    }

    .ag-about-grid {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 24px;
    }

    .ag-artist-photos-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ag-artist-photos-grid--count-1 {
        grid-template-columns: minmax(0, 560px);
    }

    .ag-artist-photos-grid--count-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .ag-artist-cover--count-5 .ag-cover-collage,
    .ag-artist-cover--count-6 .ag-cover-collage {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ag-cover-collage__item:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 767px) {
    body.ag-listivo-artist-profile .listivo-user-hero__top {
        height: 180px;
        min-height: 180px;
    }

    .ag-artist-cover--collage .ag-cover-collage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ag-cover-collage__item:nth-child(n+3) {
        display: none;
    }

    body.ag-listivo-artist-profile .listivo-user-hero__content-wrapper {
        margin-top: 0 !important;
    }

    body.ag-listivo-artist-profile .listivo-user-hero__content {
        margin-top: -68px !important;
    }

    body.ag-listivo-artist-profile .listivo-user-hero__avatar {
        width: 136px;
        height: 136px;
        border-width: 4px;
    }

    body.ag-listivo-artist-profile .listivo-user-hero__name {
        gap: 7px;
        margin-top: 14px;
        padding: 0 15px;
        font-size: 29px;
    }

    .ag-hero-identity {
        gap: 8px;
        margin-top: 13px;
        padding: 10px;
        border-radius: 16px;
    }

    .ag-hero-identity__pill {
        min-height: 40px;
        padding: 9px 14px;
        font-size: 14px;
    }

    .ag-hero-actions {
        width: 100%;
        padding: 0 16px;
    }

    .ag-hero-button {
        flex: 1 1 0;
        min-width: 0;
        padding-inline: 10px;
        font-size: 11px;
    }

    .ag-hero-button--artworks {
        max-width: none;
    }

    .ag-hero-button__label--desktop {
        display: none;
    }

    .ag-hero-button__label--mobile {
        display: inline;
    }

    .ag-verified-name-badge {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
    }

    .ag-verified-name-badge svg {
        width: 26px;
        height: 26px;
    }

    .ag-verified-tooltip {
        left: 50%;
        top: calc(100% + 11px);
        width: min(260px, calc(100vw - 32px));
        text-align: center;
        transform: translate(-50%, 6px);
    }

    .ag-verified-tooltip::after {
        left: 50%;
        top: -6px;
        border-left: 1px solid rgba(245, 180, 0, 0.48);
        border-top: 1px solid rgba(245, 180, 0, 0.48);
        border-bottom: 0;
        transform: translateX(-50%) rotate(45deg);
    }

    .ag-verified-name-badge:hover .ag-verified-tooltip,
    .ag-verified-name-badge:focus .ag-verified-tooltip,
    .ag-verified-name-badge:focus-within .ag-verified-tooltip,
    .ag-verified-name-badge.is-open .ag-verified-tooltip {
        transform: translate(-50%, 0);
    }

    body.ag-listivo-artist-profile .listivo-user-hero__socials .listivo-social-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .ag-relocated-listings .listivo-user-listings__pagination:not(.ag-fallback-pagination) {
        display: none !important;
    }

    .ag-relocated-listings .listivo-user-listings__mobile-pagination,
    .ag-relocated-listings .ag-fallback-pagination {
        display: block !important;
        margin-top: 28px !important;
    }

    .ag-relocated-listings .listivo-pagination {
        justify-content: center;
        padding-top: 20px;
    }

    .ag-relocated-listings .listivo-pagination__list {
        width: 100%;
    }

    .ag-relocated-listings .listivo-pagination__item {
        width: 40px;
        height: 40px;
        font-size: 13px;
    }

    .ag-artist-profile {
        padding: 18px 14px 28px;
    }

    .ag-artist-tabs {
        top: 62px;
        gap: 24px;
        min-height: 54px;
        padding: 0 18px;
        overflow-x: auto;
        border-radius: 8px;
        scrollbar-width: none;
    }

    .ag-artist-tabs::-webkit-scrollbar {
        display: none;
    }

    .admin-bar .ag-artist-tabs {
        top: 108px;
    }

    .ag-artist-tabs__button {
        flex: 0 0 auto;
        min-height: 53px;
        font-size: 11px;
    }

    .ag-artist-panel {
        padding-top: 30px;
    }

    .ag-section-heading {
        margin-bottom: 18px;
    }

    .ag-section-heading__eyebrow {
        font-size: 11px;
    }

    .ag-section-heading h2 {
        font-size: 26px;
    }

    .ag-about-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ag-relocated-biography,
    .ag-editorial-content {
        font-size: 15px !important;
        line-height: 1.8 !important;
    }

    .ag-relocated-biography {
        padding: 22px 20px !important;
    }

    .ag-relocated-biography::before {
        right: 20px;
        left: 20px;
    }

    .ag-relocated-biography .ag-biography-lead {
        font-size: 16px !important;
    }

    .ag-biography-collapsed {
        max-height: 320px;
    }

    .ag-biography-toggle {
        font-size: 11px;
    }

    .ag-artist-facts__label {
        font-size: 11px;
    }

    .ag-artist-facts__item {
        min-height: 70px;
        padding-right: 60px;
    }

    .ag-artist-facts__icon {
        right: 16px;
        width: 32px;
        height: 32px;
    }

    .ag-artist-photos-grid,
    .ag-artist-photos-grid--count-3,
    .ag-artist-photos-grid--count-4,
    .ag-artist-photos-grid--count-5,
    .ag-artist-photos-grid--count-6,
    .ag-artist-photos-grid--count-7,
    .ag-artist-photos-grid--count-8 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ag-artist-photos-grid--count-1 {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .ag-artist-photos-grid--count-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .ag-artist-photo-card {
        border-radius: 9px;
    }

    .ag-artist-photo-link__zoom {
        width: 46px;
        height: 46px;
    }

    .ag-artist-photo-link__zoom svg {
        width: 21px;
        height: 21px;
    }

    .ag-photo-lightbox {
        grid-template-columns: 54px minmax(0, 1fr) 54px;
    }

    .ag-photo-lightbox__stage {
        padding: 62px 4px 72px;
    }

    .ag-photo-lightbox__image {
        max-height: calc(100vh - 134px);
        border-radius: 4px;
    }

    .ag-photo-lightbox__close {
        top: max(14px, env(safe-area-inset-top));
        right: max(14px, env(safe-area-inset-right));
        width: 43px;
        height: 43px;
    }

    .ag-photo-lightbox__nav {
        width: 42px;
        height: 42px;
    }

    .ag-photo-lightbox__nav svg {
        width: 22px;
        height: 22px;
    }

    .ag-video-grid {
        grid-template-columns: 1fr;
    }

    body.ag-listivo-artist-profile [class*="listivo"][style*="position: fixed"] {
        max-width: calc(100vw - 28px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ag-artist-panel,
    .ag-hero-button,
    .ag-artist-tabs__button::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* v1.0.19 - Full-width responsive YouTube/Vimeo presentation */
body.ag-listivo-artist-profile #ag-artist-videos .ag-video-grid {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

body.ag-listivo-artist-profile #ag-artist-videos .ag-video-card,
body.ag-listivo-artist-profile #ag-artist-videos .ag-video-link {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body.ag-listivo-artist-profile #ag-artist-videos .ag-video-card iframe {
    display: block;
    width: 100%;
    height: 100%;
}
