/* =========================================================
   ATG STUDIO MANAGER — SITE INTEGRATION SAFETY RULES
   Existing ATG page styles remain the visual source of truth.
========================================================= */

/* Artists Directory: roster-safe layout for any artist count. */
.atg-artists-directory__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.atg-artists-directory__grid > .atg-directory-card {
    flex: 0 1 calc((100% - 72px) / 4);
    min-width: 0;
    grid-column: auto;
}

@media (max-width: 1180px) {
    .atg-artists-directory__grid > .atg-directory-card {
        flex-basis: calc((100% - 48px) / 3);
    }
}

@media (max-width: 900px) {
    .atg-artists-directory__grid {
        gap: 20px;
    }

    .atg-artists-directory__grid > .atg-directory-card {
        flex-basis: calc((100% - 20px) / 2);
    }
}

@media (max-width: 600px) {
    .atg-artists-directory__grid {
        gap: 18px;
    }

    .atg-artists-directory__grid > .atg-directory-card {
        flex-basis: 100%;
    }
}

/*
 * Homepage collage: the original stylesheet gives the reversed collage geometry
 * to specific current artists. Extend that same geometry to every future
 * dynamically generated reversed artist without affecting the mobile reset.
 */
@media (min-width: 651px) {
    .atg-artists .atg-artist--reverse .atg-artist__work-bg {
        grid-template-columns: .95fr .8fr 1.25fr;
    }

    .atg-artists .atg-artist--reverse .atg-artist__work--1 {
        grid-column: 3;
        grid-row: 1 / 3;
    }

    .atg-artists .atg-artist--reverse .atg-artist__work--2 {
        grid-column: 1;
        grid-row: 1;
    }

    .atg-artists .atg-artist--reverse .atg-artist__work--3 {
        grid-column: 2;
        grid-row: 1;
    }

    .atg-artists .atg-artist--reverse .atg-artist__work--4 {
        grid-column: 1;
        grid-row: 2;
    }

    .atg-artists .atg-artist--reverse .atg-artist__work--5 {
        grid-column: 2;
        grid-row: 2;
    }

    .atg-artists .atg-artist--reverse .atg-artist__work--6 {
        right: auto;
        left: 3.5%;
        transform: rotate(-1.5deg);
    }
}

/* =========================================================
   v2 — PARTIAL ARTIST GALLERY GROUPS
   Only applies when the final group has fewer than six items.
========================================================= */

@media (min-width: 1051px) {
    .atg-artist-gallery__grid--count-1 .atg-artist-gallery__piece--feature {
        grid-column: 3 / span 8;
        grid-row: auto;
        aspect-ratio: 16 / 10;
    }

    .atg-artist-gallery__grid--count-2 .atg-artist-gallery__piece--feature,
    .atg-artist-gallery__grid--count-2 .atg-artist-gallery__piece {
        grid-column: span 6;
        grid-row: auto;
        aspect-ratio: 4 / 5;
    }

    .atg-artist-gallery__grid--count-3 .atg-artist-gallery__piece--feature {
        grid-column: span 8;
        grid-row: span 2;
    }

    .atg-artist-gallery__grid--count-3 .atg-artist-gallery__piece:not(.atg-artist-gallery__piece--feature) {
        grid-column: span 4;
    }

    .atg-artist-gallery__grid--count-4 .atg-artist-gallery__piece--feature,
    .atg-artist-gallery__grid--count-4 .atg-artist-gallery__piece {
        grid-column: span 6;
        grid-row: auto;
        aspect-ratio: 4 / 5;
    }

    .atg-artist-gallery__grid--count-5 .atg-artist-gallery__piece--feature {
        grid-column: span 8;
        grid-row: span 2;
    }

    .atg-artist-gallery__grid--count-5 .atg-artist-gallery__piece:nth-child(2),
    .atg-artist-gallery__grid--count-5 .atg-artist-gallery__piece:nth-child(3) {
        grid-column: span 4;
    }

    .atg-artist-gallery__grid--count-5 .atg-artist-gallery__piece:nth-child(4),
    .atg-artist-gallery__grid--count-5 .atg-artist-gallery__piece:nth-child(5) {
        grid-column: span 6;
        grid-row: auto;
    }
}

/* v3.3 — Piercings page reusable content */
.atg-meet-piercer > .atg-meet-piercer__inner + .atg-meet-piercer__inner {
    margin-top: clamp(80px, 9vw, 140px);
}

@media (min-width: 1025px) {
    .atg-jewelry-showcase__grid[data-atg-jewelry-gallery] {
        grid-auto-rows: 340px;
    }

    .atg-jewelry-showcase__grid[data-atg-jewelry-gallery] > .atg-jewelry-showcase__item:nth-child(n + 12) {
        grid-area: auto;
        min-height: 340px;
    }
}

/* ATG contact form submission states */
.atg-contact__honeypot {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.atg-contact__notice {
    margin: 0 0 24px;
    padding: 14px 16px;
    border: 1px solid rgba(183, 141, 73, 0.45);
    background: rgba(255, 255, 255, 0.025);
    color: #f3eee4;
    font-size: 14px;
    line-height: 1.6;
}

.atg-contact__notice--success {
    border-color: rgba(0, 229, 255, 0.38);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.06);
}

.atg-contact__notice--error {
    border-color: rgba(255, 45, 149, 0.4);
    box-shadow: 0 0 18px rgba(255, 45, 149, 0.05);
}

/* =========================================================
   v3.6.2 — CONTACT REFERENCE IMAGE SELECTION PREVIEW
========================================================= */
.atg-form-upload[data-atg-reference-upload] {
    position: relative;
}

.atg-form-upload__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.atg-form-upload__picker {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 32px;
    cursor: pointer;
}

.atg-form-upload__selection {
    width: 100%;
    min-height: 170px;
    padding: 18px;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.atg-form-upload__selection[hidden],
.atg-form-upload__picker[hidden] {
    display: none;
}

.atg-form-upload__preview {
    display: block;
    width: 130px;
    height: 130px;
    object-fit: cover;
    border: 1px solid rgba(183, 141, 73, 0.5);
    background: #090909;
}

.atg-form-upload__file-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.atg-form-upload__file-info strong {
    overflow: hidden;
    color: #f3eee4;
    font-size: 16px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.atg-form-upload__file-info span {
    color: #bcb5aa;
    font-size: 13px;
    line-height: 1.5;
}

.atg-form-upload__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.atg-form-upload__change,
.atg-form-upload__remove {
    min-width: 108px;
    padding: 11px 14px;
    border: 1px solid rgba(183, 141, 73, 0.55);
    background: transparent;
    color: #f3eee4;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
}

.atg-form-upload__remove {
    border-color: rgba(255, 45, 149, 0.35);
    color: #d9a6b7;
}

.atg-form-upload__change:hover,
.atg-form-upload__change:focus-visible {
    border-color: #f3eee4;
}

.atg-form-upload__remove:hover,
.atg-form-upload__remove:focus-visible {
    border-color: rgba(255, 45, 149, 0.75);
    color: #f3eee4;
}

.atg-form-upload__change:focus-visible,
.atg-form-upload__remove:focus-visible,
.atg-form-upload__input:focus-visible + .atg-form-upload__picker {
    outline: 2px solid #00e5ff;
    outline-offset: 4px;
}

@media (max-width: 650px) {
    .atg-form-upload__picker {
        min-height: 190px;
        padding: 26px 18px;
    }

    .atg-form-upload__selection {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .atg-form-upload__preview {
        width: 88px;
        height: 88px;
    }

    .atg-form-upload__actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}
