/* dianetietjen.com - the art pages: All Art (/art/, /art/medium/..., search),
   the galleries (/gallery/...) and one painting (/art/<slug>).
   Loaded after theme.css and only adds what is particular to these pages;
   cards, chips, tags, buttons and motion come from theme.css.

   #gallery-section[data-view] says which page is showing (set by
   setGalleryView() in gallery.js): art-list, gallery, art-detail or
   art-missing. */

/* ---------- Page column and title ---------- */
#gallery-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px 72px;
    box-sizing: border-box;
}

#gallery-eyebrow {
    margin: 52px 0 0;
    text-align: center;
    animation: dt-rise .8s var(--ease) both;
}
#gallery-title {
    margin: 52px auto 0;
    max-width: 18em;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.06;
    letter-spacing: -0.015em;
    text-align: center;
    animation: dt-rise .8s .06s var(--ease) both;
}
#gallery-eyebrow:not([hidden]) + #gallery-title { margin-top: 0; }

#gallery-section .breadcrumb { padding: 12px 0 0; text-align: center; }
#gallery-section .breadcrumb:empty { display: none; }
#gallery-section .breadcrumb a { display: inline-block; padding: 6px 2px; }

/* The <br> in the markup: spacing comes from margins here instead. */
#gallery-section .content-loading-wrapper > br { display: none; }

/* ---------- Medium filter chips ---------- */
#gallery-section .art-medium {
    margin: 32px auto 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
    text-align: center;
}
/* Filters on the left, a small search on the right; stacked on phones. */
#gallery-section .art-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    text-align: left;
}
#gallery-section .art-filters { flex: 1 1 520px; min-width: 0; }
#gallery-section .art-search {
    position: relative;
    flex: 0 1 300px;
    display: flex;
    align-items: center;
    margin: 0;
}
#gallery-section .art-search svg { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
#gallery-section .art-search input[type=search] {
    flex: 1;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding: 0 52px 0 44px;
    border: 1px solid var(--line-2);
    border-radius: var(--pill);
    background: var(--ink-2);
    color: var(--text);
    font-size: 15px;
}
#gallery-section button.art-search-go {
    position: absolute;
    right: 4px;
    width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--green);
    color: var(--ink) !important;
    font-size: 18px;
}
#gallery-section button.art-search-go:hover { background: var(--mint); color: var(--ink) !important; }
/* Medium: one button that opens a short list (artworkgallery.js). */
#gallery-section .medium-picker { position: relative; display: inline-block; }
#gallery-section button.medium-picker-btn {
    gap: 10px;
    min-height: 44px;
    padding: 0 16px 0 14px;
    background: transparent;
    color: var(--text-2) !important;
    font-size: 15px;
}
#gallery-section button.medium-picker-btn:hover,
#gallery-section button.medium-picker-btn[aria-expanded="true"] { background: var(--ink-3); color: #ffffff !important; }
#gallery-section button.medium-picker-btn:focus:not(:focus-visible) { background: transparent; }
#gallery-section button.medium-picker-btn[aria-expanded="true"]:focus { background: var(--ink-3); }
.medium-picker-label { color: var(--muted); font-weight: 500; }
.medium-picker-current { color: var(--text); font-weight: 600; }
#gallery-section .medium-picker-btn.is-filtered { border-color: var(--green); background: var(--green-deep); }
#gallery-section .medium-picker-btn.is-filtered .medium-picker-current { color: var(--mint); }
.medium-picker-chevron { transition: transform .3s var(--ease); }
.medium-picker-btn[aria-expanded="true"] .medium-picker-chevron { transform: rotate(180deg); }
#gallery-section .medium-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 230px;
    padding: 6px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    background: var(--ink-2);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
    animation: dt-rise .25s var(--ease) both;
}
#gallery-section .medium-menu #medium-filters { display: contents; }
#gallery-section .medium-menu a.medium-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: var(--radius-s);
    background: transparent;
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.2;
}
#gallery-section .medium-menu a.medium-filter:hover,
#gallery-section .medium-menu a.medium-filter:focus-visible { background: var(--ink-4); color: #ffffff; border: 0; }
#gallery-section .medium-menu a.medium-filter.medium-selected { background: var(--green-deep); color: var(--mint); font-weight: 600; }
#gallery-section .medium-menu a.medium-filter.medium-selected::after { content: "✓"; }

/* "Showing results for: ..." */
#search-results {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}
#search-results #search-term {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-style: italic;
}

/* ---------- The grid of paintings ---------- */
#artwork-gallery { margin-top: 40px; }

/* Cards rise in as they are added, a few at a time. */
#artwork-gallery > a,
#artwork-gallery .gallery-section-content > a { animation: dt-rise .7s var(--ease) both; }
#artwork-gallery > a:nth-child(8n+2) { animation-delay: .05s; }
#artwork-gallery > a:nth-child(8n+3) { animation-delay: .1s; }
#artwork-gallery > a:nth-child(8n+4) { animation-delay: .15s; }
#artwork-gallery > a:nth-child(8n+5) { animation-delay: .2s; }
#artwork-gallery > a:nth-child(8n+6) { animation-delay: .25s; }
#artwork-gallery > a:nth-child(8n+7) { animation-delay: .3s; }
#artwork-gallery > a:nth-child(8n) { animation-delay: .35s; }

#artwork-gallery a { border-radius: var(--radius); }
#artwork-gallery a:focus-visible { outline-offset: 6px; }
#artwork-gallery a:focus-visible .art-thumb { transform: translateY(-6px); }
#artwork-gallery .art-thumb:hover img { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }

/* Still loading: a soft shimmer where the picture will be. */
#gallery-section .art-thumb.loading { opacity: 1; }
#gallery-section .art-thumb.loading::before,
#gallery-section .gallery-thumb.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 240px;
    border-radius: var(--radius);
    background: linear-gradient(100deg, var(--ink-2) 30%, var(--ink-4) 50%, var(--ink-2) 70%);
    background-size: 300% 100%;
    animation: art-shimmer 1.4s linear infinite;
}
@keyframes art-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Headings and groups inside the grid (a gallery with both sub-galleries
   and paintings, and the suggestions when nothing matched). */
#artwork-gallery > .gallery-section-header,
#artwork-gallery > .gallery-section-content,
#artwork-gallery > article { grid-column: 1 / -1; }
#artwork-gallery .gallery-section-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    text-align: left;
}
#artwork-gallery .gallery-section-header:not(:first-child) { margin-top: 28px; }
#artwork-gallery .gallery-section-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line-2);
}
#artwork-gallery .gallery-section-header h2,
#artwork-gallery .gallery-section-header h3 { margin: 0; font-size: 1.6rem; }
#artwork-gallery .gallery-section-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 28px 22px;
    margin: 0 0 12px;
}
#artwork-gallery .gallery-section-content > a { margin: 0; }

/* ---------- Nothing found ---------- */
#artwork-gallery .gallery-empty,
#gallery-section #no-results {
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 28px;
    border: 1px dashed var(--line-2);
    border-radius: var(--radius-l);
    background: var(--ink-2);
    color: var(--text-2);
    font-size: 1.05rem;
    text-align: center;
}
#artwork-gallery .gallery-empty { display: block; }
#artwork-gallery .gallery-empty::after { display: none; }
#artwork-gallery .gallery-empty h2 { font-size: 1.6rem; }
#artwork-gallery .gallery-empty p { margin: 0; color: var(--muted); font-size: 15px; }
.gallery-empty-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    display: block;
    fill: none;
    stroke: var(--mint);
    stroke-width: 1.6;
    stroke-linecap: round;
}
#artwork-gallery .gallery-empty + .gallery-section-header { margin-top: 48px; }

/* ---------- Loading more, count, Load more ---------- */
#gallery-section .loading-more { padding: 32px 0 8px; font-size: 14px; }
#gallery-section .loading-more .lds-hourglass { transform: scale(.6); }
#gallery-section .pagination {
    margin: 40px 0 0;
    color: var(--muted);
    font-size: 14px;
    letter-spacing: .02em;
    text-align: center;
}
#load-more-button { margin-top: 16px; text-align: center; }
#load-more-button .button-link {
    min-height: 48px;
    padding: 0 30px;
    background: transparent;
    border-color: var(--line-2);
}
#load-more-button .button-link:hover {
    background: var(--ink-3);
    border-color: var(--mint);
    color: #ffffff !important;
}

/* ---------- Galleries: collection cards with a cover picture ---------- */
#gallery-section .gallery:has(.gallery-thumb) {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 26px;
}
#gallery-section .gallery-thumb {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--ink-3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
#gallery-section .gallery-thumb:hover,
#gallery-section a:focus-visible .gallery-thumb {
    transform: translateY(-6px);
    border-color: var(--line-2);
    box-shadow: var(--shadow-l);
}
#gallery-section .gallery-thumb img {
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 0;
    background: var(--ink-2);
    transition: transform .9s var(--ease), opacity .3s;
}
#gallery-section .gallery-thumb:hover img { transform: scale(1.05); }
#gallery-section .gallery-thumb.loading::before { height: auto; bottom: 0; border-radius: 0; z-index: 1; }
#gallery-section .gallery-thumb .gallery-desc {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    margin: 0;
    padding: 64px 22px 18px;
    background: linear-gradient(to top, rgba(8, 11, 10, 0.94) 0%, rgba(8, 11, 10, 0.7) 50%, rgba(8, 11, 10, 0) 100%);
    color: #ffffff;
    font-size: 24px;
    line-height: 1.15;
}
#gallery-section .gallery-thumb:hover .gallery-desc { color: var(--mint); background: linear-gradient(to top, rgba(8, 11, 10, 0.94) 0%, rgba(8, 11, 10, 0.7) 50%, rgba(8, 11, 10, 0) 100%); }
.gallery-count {
    display: block;
    margin-top: 6px;
    color: var(--text-2);
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: .04em;
}
#gallery-section .gallery-thumb .dt-sheen { z-index: 3; }

/* ---------- One painting ---------- */
#gallery-section[data-view="art-detail"] #gallery-eyebrow,
#gallery-section[data-view="art-detail"] #gallery-title,
#gallery-section[data-view="art-detail"] .pagination { display: none; }
#gallery-section[data-view="art-detail"] .breadcrumb { padding-top: 28px; text-align: left; }
#gallery-section[data-view="art-detail"] #artwork-gallery,
#gallery-section[data-view="art-missing"] #artwork-gallery { display: block; margin-top: 20px; }

.art-detail { padding: 0; }
.art-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
    gap: 44px;
    align-items: start;
}

/* The wall: dark, with a soft light from above. */
.art-wall {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 460px;
    margin: 0;
    padding: 56px 48px 104px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background:
        radial-gradient(ellipse 70% 55% at 50% 30%, rgba(164, 235, 210, 0.07), transparent 70%),
        linear-gradient(180deg, var(--ink-2) 0%, var(--ink-deep) 100%);
    box-sizing: border-box;
}
.art-wall img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(64vh, 760px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), 0 30px 60px rgba(0, 0, 0, 0.6);
    -webkit-box-reflect: below 4px linear-gradient(transparent 76%, rgba(255, 255, 255, 0.13));
    opacity: 0;
    transition: opacity .7s var(--ease);
}
.art-wall img.loaded { opacity: 1; }
/* On a tall enough screen the painting stays in view while the panel scrolls. */
@media screen and (min-width: 961px) and (min-height: 700px) {
    .art-wall { position: sticky; top: 88px; padding-top: 48px; }
}

/* The panel: the painting's label, then ordering. */
.art-panel {
    padding: 30px 28px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--ink-2);
    box-sizing: border-box;
}
.art-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.art-panel-head .dt-eyebrow { margin-bottom: .6rem; }
.art-panel-title {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

/* Favorite heart, beside the title (shop.css floats it; here it sits still). */
.art-panel .fav-wrap {
    position: relative;
    top: auto;
    right: auto;
    z-index: 5;
    display: block;
    flex: none;
    height: auto;
    pointer-events: auto;
}
.art-panel .fav-wrap .fav-button {
    position: static;
    width: 48px;
    height: 48px;
    min-height: 48px;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--line-2);
    box-shadow: none;
    color: var(--text);
}
.art-panel .fav-wrap .fav-button:hover,
.art-panel .fav-wrap .fav-button:focus-visible {
    background: var(--ink-4);
    border-color: var(--mint);
    transform: scale(1.06);
}
.art-panel .fav-wrap .fav-button:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.art-panel .fav-wrap .fav-button.fav-on { border-color: #e0506b; }
.art-panel .fav-wrap .fav-status {
    position: absolute;
    top: 58px;
    right: 0;
    width: max-content;
    max-width: min(16rem, calc(100vw - 4rem));
    padding: 10px 14px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-s);
    background: var(--ink-4);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: 14px;
    text-align: left;
}
.art-panel .fav-wrap .fav-status a { color: var(--mint); }

/* Medium, year, galleries. */
.art-facts {
    display: grid;
    gap: 12px;
    margin: 24px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
}
.art-facts > div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
}
.art-facts dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.art-facts dd {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: var(--text);
}
/* The painting page's tags are a little larger; the link behavior is in theme.css. */
a.dt-tag { font-size: 13px; padding: 5px 12px; }

.art-description {
    margin: 22px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    color: var(--text-2);
    font-size: 15.5px;
    line-height: 1.7;
}

/* Ordering a print or card. */
.art-panel .print-order {
    margin: 24px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}
.art-panel .print-order h2 { margin: 0 0 16px; font-size: 1.55rem; }
.art-panel .print-order-row { grid-template-columns: minmax(0, 1fr) 5.25rem; gap: 12px; margin-bottom: 16px; }
.art-panel .print-order-card .print-order-row { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
.art-panel .print-order label { gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.art-panel .print-order select,
.art-panel .print-order input[type=number] {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 400;
    border-radius: 10px;
}
.art-panel .print-order-view {
    margin: 0 0 18px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--ink);
    border: 1px solid var(--line);
}
.art-panel .print-order-view img { max-height: 20rem; border-radius: 2px; box-shadow: var(--shadow); }
.art-panel .print-order-view figcaption { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.5; opacity: 1; }
.art-panel .print-order-card { margin: 0 0 18px; padding: 12px 16px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.art-panel .print-order-card legend { padding: 0 6px; color: var(--text); font-size: 14px; }
/* The message box looks like the card's paper, in the ink picked. */
.art-panel .print-order-card textarea {
    background: var(--paper) !important;
    border-color: #c9c3b6 !important;
    border-radius: var(--radius-s);
    padding: 12px;
}
.art-panel .print-order-card textarea::placeholder { color: #5f625e !important; }
.art-panel .print-order-message-note { color: var(--muted); font-size: 13px; opacity: 1; }
.art-panel .print-order-message-bad { color: #ffd9d2; }

.art-panel .print-order .print-order-add {
    width: 100%;
    min-height: 52px;
    margin: 4px 0 0;
    border: 1px solid var(--green);
    border-radius: var(--pill);
    background: var(--green);
    color: var(--ink) !important;
    font-size: 16px;
    font-weight: 600;
}
.art-panel .print-order .print-order-add:hover {
    background: #45ad88;
    border-color: #45ad88;
    box-shadow: 0 10px 30px rgba(58, 153, 120, 0.4);
    transform: translateY(-2px);
}
.art-panel .print-order .print-order-add:focus { background: var(--green); }
.art-panel .print-order .print-order-add:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.art-panel .print-order-status { margin-top: 12px; color: var(--text); font-size: 14px; }
.art-panel .print-order-status a { color: var(--mint); }
.art-panel .print-order-note { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; opacity: 1; }

/* Previous / All / Next: a quiet bar that stays above the footer (shop.css). */
.art-detail .art-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 12px 0;
    background: rgba(13, 17, 16, 0.82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
}
.art-detail .art-nav .button-link { margin: 0; }
.art-nav .art-nav-prev { grid-column: 1; justify-self: start; }
.art-nav .art-nav-all { grid-column: 2; }
.art-nav .art-nav-next { grid-column: 3; justify-self: end; }

/* Not found */
.art-missing { padding: 8px 0 24px; text-align: center; color: var(--text-2); }
.art-missing p { margin: 0 0 20px; }

/* ---------- Narrower screens ---------- */
@media screen and (max-width: 960px) {
    .art-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .art-wall { min-height: 0; padding: 40px 28px 88px; }
    .art-wall img { max-height: 70vh; }
}
@media screen and (max-width: 760px) {
    #gallery-section { padding: 0 16px 56px; }
    #gallery-eyebrow, #gallery-title { margin-top: 36px; }
    #gallery-section .art-medium { margin-top: 24px; }
    #gallery-section .art-search { flex-basis: 100%; order: -1; }
    #artwork-gallery { margin-top: 28px; }
    #gallery-section .gallery:has(.gallery-thumb) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    #artwork-gallery .gallery-section-content { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
    #gallery-section .gallery-thumb .gallery-desc { font-size: 22px; padding: 56px 18px 16px; }

    .art-wall { padding: 24px 16px; border-radius: var(--radius); }
    .art-wall img { -webkit-box-reflect: unset; max-height: 64vh; }
    .art-panel { padding: 22px 18px; border-radius: var(--radius); }
    .art-detail .art-nav { gap: 6px; }
    .art-detail .art-nav .button-link { padding: 0 14px; font-size: 14px; }
}
@media screen and (max-width: 580px) {
    #gallery-section .art-thumb.loading::before { height: 170px; }
    #artwork-gallery .gallery-section-header h2,
    #artwork-gallery .gallery-section-header h3 { font-size: 1.3rem; }
}
@media screen and (max-width: 400px) {
    .art-facts > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .art-detail .art-nav .button-link { padding: 0 10px; font-size: 13px; }
}
