[data-artwork-detail] {
    cursor: pointer;
}

.fc-dialog-open {
    overflow: hidden;
}

.fc-artwork-detail-dialog {
    position: fixed;
    inset: 0;
    width: min(1120px, calc(100vw - 36px));
    max-width: none;
    max-height: min(90vh, 820px);
    max-height: min(90dvh, 820px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid rgba(240, 195, 106, .38);
    border-radius: 24px;
    background: #102832;
    color: var(--fc-text, #f1e5d0);
    box-shadow: 0 34px 90px rgba(2, 14, 20, .72);
}

.fc-artwork-detail-dialog::backdrop {
    background: rgba(4, 16, 22, .82);
    backdrop-filter: blur(5px);
}

.fc-artwork-detail-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    min-height: 520px;
}

.fc-artwork-detail-close {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 242, 220, .45);
    border-radius: 50%;
    background: rgba(7, 24, 31, .86);
    color: var(--fc-cream, #fff2dc);
    font: inherit;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
}

.fc-artwork-detail-close::before,
.fc-artwork-detail-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

.fc-artwork-detail-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.fc-artwork-detail-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.fc-artwork-detail-close:hover,
.fc-artwork-detail-close:focus-visible {
    border-color: var(--fc-gold-light, #f0c36a);
    background: #173946;
    outline: 3px solid rgba(240, 195, 106, .32);
    outline-offset: 2px;
}

.fc-artwork-detail-media {
    display: grid;
    min-height: 520px;
    place-items: center;
    overflow: hidden;
    background: #081a22;
}

.fc-artwork-detail-media img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 820px;
    object-fit: contain;
}

.fc-artwork-detail-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(42px, 5vw, 68px) clamp(26px, 4vw, 50px) 38px;
    background:
        radial-gradient(circle at 90% 0%, rgba(240, 195, 106, .12), transparent 22rem),
        linear-gradient(155deg, rgba(28, 61, 72, .99), rgba(15, 39, 49, .99));
}

.fc-artwork-detail-body h2 {
    margin: 8px 0 0;
    color: var(--fc-cream, #fff2dc);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    font-weight: 400;
    line-height: 1.12;
}

.fc-artwork-detail-copy p {
    margin: 18px 0 0;
    color: var(--fc-text, #f1e5d0);
    font-size: 1rem;
    line-height: 1.72;
}

.fc-artwork-detail-actions {
    margin-top: 28px;
}

.fc-artwork-detail-actions [hidden] {
    display: none !important;
}

.fc-artwork-detail-actions .fc-button {
    min-height: 44px;
}

@media (max-width: 820px) {
    .fc-artwork-detail-dialog {
        width: min(720px, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 18px;
    }

    .fc-artwork-detail-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .fc-artwork-detail-media {
        min-height: 0;
        max-height: 42vh;
    }

    .fc-artwork-detail-media img {
        height: auto;
        max-height: 42vh;
    }

    .fc-artwork-detail-body {
        padding: 34px 22px 26px;
    }

    .fc-artwork-detail-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .fc-artwork-detail-actions .fc-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fc-artwork-detail-dialog {
        scroll-behavior: auto;
    }
}
