/* Lees- en waardeerknoppen hebben dezelfde vorm op kaarten, profielen en bij gedichten. */
@layer poezie-knoppen {
  #ggw-site :is([data-gg20-quickread], [data-gg304-quick-open], .gg304-quick-open,
    .gg-heart-btn, button.gg-hearts-pill, button.gg-poem-heart, button.ggwb-heart, .gg-like-btn) {
    --knop-vlak: #24445b;
    --knop-inkt: #ffffff;
    --knop-rand: #24445b;
    box-sizing: border-box !important;
    border: 1px solid var(--knop-rand) !important;
    border-radius: 999px !important;
    background: var(--knop-vlak) !important;
    color: var(--knop-inkt) !important;
    min-height: 44px !important;
    padding: 6px 15px !important;
    max-width: 100%;
    font: 600 .875rem/1.25 var(--vv-font-sans, sans-serif) !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: none !important;
  }
  #ggw-site :is([data-gg20-quickread], [data-gg304-quick-open]) { display: inline-flex !important; }
  :where(html[data-gg-theme="dark"]) #ggw-site :is([data-gg20-quickread], [data-gg304-quick-open], .gg304-quick-open,
    .gg-heart-btn, button.gg-hearts-pill, button.gg-poem-heart, button.ggwb-heart, .gg-like-btn) {
    --knop-vlak: #d7e7ef;
    --knop-inkt: #193448;
    --knop-rand: #d7e7ef;
  }
  #ggw-site :is([data-gg20-quickread], [data-gg304-quick-open], .gg304-quick-open,
    .gg-heart-btn, button.gg-hearts-pill, button.gg-poem-heart, button.ggwb-heart, .gg-like-btn):is(:hover,:focus-visible,[aria-pressed="true"],.is-liked) {
    --knop-vlak: #f4d4aa;
    --knop-inkt: #193448;
    --knop-rand: #a6855c;
  }
  #ggw-site :is([data-gg20-quickread], [data-gg304-quick-open], .gg-heart-btn, .gg-like-btn) :is(span,i,svg) {
    color: inherit !important;
  }
  #ggw-site :is([data-gg20-quickread], [data-gg304-quick-open], .gg-heart-btn, .gg-like-btn) svg [stroke]:not([stroke="none"]) {
    stroke: currentColor !important;
  }
}
/* De lichte pagina gebruikt de papierlaag van het Helder-thema. */
@layer poezie-layout {
  html:not([data-gg-theme="dark"]) body.gg-literary-canvas:not(.wp-admin)::before {
    background: #f8f1e8 url('../images/gg-paper-background.webp') center / cover no-repeat !important;
  }
  html:not([data-gg-theme="dark"]) body.gg-literary-canvas:not(.wp-admin) #ggw-site {
    background:transparent !important;
  }
  html[data-gg-theme="dark"] body.gg-literary-canvas:not(.wp-admin) #ggw-site {
    background: #34495a !important;
  }
}
/* Eén buitenmaat, ook wanneer oudere paginasjablonen een eigen maximum opgeven. */
@layer poezie-layout {
  body.gg-literary-canvas {
    --poezie-buitenmarge: clamp(12px, 2vw, 24px);
    --poezie-inhoud: min(1280px, calc(100% - var(--poezie-buitenmarge) - var(--poezie-buitenmarge)));
  }
  body.gg-literary-canvas #ggw-site > main,
  body.gg-literary-canvas #ggw-site > .gg-poezie-inhoud > main,
  body.gg-literary-canvas #ggw-site > :is(.gg331-global-hero, .gg130-top-breadcrumb, .gg-hero-breadcrumb, .gg-atelier-brand, .gg-atelier-footer),
  body.gg-literary-canvas #vv49-shell-header .vv58-header-shell,
  body.gg-literary-canvas #vv49-shell-footer .vv49-foot-inner {
    box-sizing: border-box !important;
    width: var(--poezie-inhoud) !important;
    max-width: 1280px !important;
    min-width: 0 !important;
    margin-inline: auto !important;
  }
  body.gg-literary-canvas #ggw-site > main,
  body.gg-literary-canvas #ggw-site > .gg-poezie-inhoud > main {
    padding-inline: 0 !important;
  }
  #ggw-site .gg331-global-hero > :is(.gg-word-hero, .gg-hero-breadcrumb),
  #ggw-site main > :is(.gg-word-hero, .gg-hero-breadcrumb),
  #ggw-site main > :is(.ggw-container, .gg-container, .gg370-studio__container, .gg372-flow__container,
    .ggwb-v2-wrap, .gg406-wrap, .gg598-vinkje-wrap, .gg514-wrap, .gg402-rhyme__wrap, .gg40-themes__wrap,
    .gg513-col-wrap, .gg-rhyme-shell, .gg-rhyme-layout, .gg-workspace-surface, .gg-workspace-grid, .gg-login-split,
    .gg-ga-layout, .blog-studio-layout, .ggv5-hero) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: auto !important;
  }
}

@layer poezie-layout {
  #ggw-site .vv57-poem-card {
    --card-paper:#fffefa;
    --card-ink:#223f50;
    --card-meta:#496174;
    min-width:0 !important;
    background:var(--card-paper) !important;
    border:1px solid #b9cbd580 !important;
    border-radius:18px !important;
    overflow:hidden !important;
    display:flex !important;
    flex-direction:column !important;
  }
  html[data-gg-theme="dark"] #ggw-site .vv57-poem-card {
    --card-paper:#405767;
    --card-ink:#fbfcfe;
    --card-meta:#dbe8ef;
  }
  #ggw-site .vv57-poem-card__art {
    display:block !important;
    position:relative !important;
    height:clamp(66px,8vw,110px) !important;
    min-height:0 !important;
    flex:none !important;
    overflow:hidden !important;
  }
  #ggw-site .vv57-poem-card .vv57-poem-card__art {
    display:grid !important;
    place-items:center !important;
    padding:0 !important;
    background:#e6f0f7 url('../images/vv561-poem-background-clean.svg') center / cover no-repeat !important;
  }
  #ggw-site .gg-poezie-kaartveer {
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    border-radius:50%;
    color:#24485f;
    background:#f8fcff;
    box-shadow:0 2px 8px rgba(36,72,95,.14);
  }
  #ggw-site .gg-poezie-kaartveer svg { width:23px; height:23px; display:block; }
  html[data-gg-theme="dark"] #ggw-site .vv57-poem-card .vv57-poem-card__art {
    background-image:linear-gradient(rgba(61,87,106,.78),rgba(61,87,106,.78)),url('../images/vv561-poem-background-clean.svg') !important;
  }
  #ggw-site .vv57-poem-card__art::before, #ggw-site .vv57-poem-card__art::after,
  #ggw-site .vv57-poem-card__feather { display:none !important; }
  #ggw-site .vv57-poem-card__body {
    display:flex !important; flex-direction:column !important; flex:1 !important;
    padding:clamp(16px,2vw,25px) !important; gap:0 !important;
    background:var(--card-paper) !important; overflow-wrap:anywhere;
  }
  #ggw-site .vv57-poem-card__title, #ggw-site .vv57-poem-card__title a {
    color:var(--card-ink) !important;
    font-size:clamp(1.5rem,2.2vw,1.85rem) !important;
    line-height:1.14 !important; margin:0 !important;
  }
  #ggw-site .gg-poem-byline { font:500 .84rem/1.5 var(--vv-font-sans,sans-serif); color:var(--card-meta); margin:5px 0 14px; }
  #ggw-site .vv57-poem-card__verse {
    display:block !important; white-space:pre-line !important; color:var(--card-ink) !important;
    line-height:1.65 !important; font-size:1.08rem !important; margin:0 0 18px !important;
    max-height:none !important; height:auto !important;
  }
  #ggw-site .vv57-poem-card__footer {
    display:flex !important; flex-wrap:wrap !important; align-items:center !important;
    justify-content:space-between !important; margin-top:auto !important; gap:6px 10px !important;
    background:var(--card-paper) !important;
  }
  #ggw-site .vv57-poem-card__footer :is(a,button) { min-height:44px !important; }
}

/* Tekst en ondergrond als paar, ook voor kaarten en invoervelden uit oudere templates. */
@layer poezie-layout {
  html[data-gg-theme="dark"] #ggw-site {
    --lees-vlak: #384e60;
    --lees-zacht: #455d70;
    --lees-inkt: #fbfdff;
    --lees-detail: #e1ebf3;
    --lees-link: #d4edff;
    --lees-knop: #cce7fb;
    --lees-knoptekst: #19394e;
    color: var(--lees-inkt);
  }
  html[data-gg-theme="dark"] #ggw-site :is(.vv57-poem-card, .vv57-poem-card__body, .vv57-poem-card__footer,
    .gg-poem-card,.gg-comments-card,.gg-author-card,.gg-side-card,.gg-related-card,
    .gg-poem-header,.gg-poem-content,.gg-poem-toolbar,.gg-poem-actions,.gg-poem-meta,
    .gg-poezie-inhoud .card,.gg-poezie-inhoud .intent-card,.gg-poezie-inhoud .poet-chip,
    .gg-poezie-inhoud .book-body,.gg-poezie-inhoud .modal-box,.gg-poezie-inhoud dialog) {
    color:var(--lees-inkt) !important;
    background:var(--lees-vlak) !important;
  }
  html[data-gg-theme="dark"] #ggw-site :is(.gg-poem-title,.gg-poem-content p,.gg-poem-content div,.gg-poem-content span,
    .gg-author-name,.gg-author-bio,.gg-side-card h3,.gg-mini-title,.gg-related-title,.gg-related-excerpt,
    .gg-comments-card h2,.gg-comments-card label,.gg-poezie-inhoud .intent-card h3,.gg-poezie-inhoud .poet-chip strong,
    .vv57-poem-card__title,.vv57-poem-card__title a,#gg20-qr-title,#gg20-qr-verses) {
    color:var(--lees-inkt) !important;
  }
  html[data-gg-theme="dark"] #ggw-site :is(.gg-poem-meta,.gg-poem-meta a,.gg-poem-meta span,.gg-author-stats,
    .gg-mini-date,.gg-related-author,.gg-side-eyebrow,.gg-author-eyebrow,.gg-poem-byline,
    .vv57-poem-card__eyebrow,.vv57-poem-card__category,.gg-poezie-inhoud .hero-lead,
    .gg-poezie-inhoud .intent-card p,.gg-poezie-inhoud .poet-chip span,#gg20-qr-author,#gg20-qr-cat) {
    color:var(--lees-detail) !important;
    opacity:1 !important;
  }
  html[data-gg-theme="dark"] #ggw-site :is(.gg-poem-note,.gg-poem-note__label,.gg-poem-note p,.gg-mini-list a) {
    background:var(--lees-zacht) !important; color:var(--lees-inkt) !important;
  }
  html[data-gg-theme="dark"] #ggw-site :is(.vv57-read-btn,.vv57-poem-card__read,.gg-poezie-inhoud .intent-cta,.gg-related-cta) {
    background:var(--lees-vlak) !important; color:var(--lees-link) !important;
  }
  html[data-gg-theme="dark"] #ggw-site :is(.gg-ctrl-btn,.gg-action-btn,.gg-btn-outline,.gg-badge,.gg304-quick-open,
    .vv57-pill-act,.gg-poezie-inhoud .chip-btn,.gg-poezie-inhoud .btn-soft,.gg-poezie-inhoud .pagination .page-numbers) {
    background:var(--lees-zacht) !important; color:var(--lees-inkt) !important; border-color:#91a9bb !important;
  }
  html[data-gg-theme="dark"] #ggw-site :is(.gg-poezie-inhoud .btn-petrol,.gg-poezie-inhoud .btn-sand,.gg-btn-atelier,
    .gg-btn-sand,.gg-poezie-inhoud .pagination .current,.gg-action-btn[aria-pressed="true"]) {
    color:var(--lees-knoptekst) !important; background:var(--lees-knop) !important;
  }
  html[data-gg-theme="dark"] #ggw-site :is(.gg-action-btn,.gg304-quick-open,.gg-badge,.gg-btn-atelier) span { color:inherit !important; }
  html[data-gg-theme="dark"] #ggw-site :is(input:not([type]),input[type="text"],input[type="email"],input[type="search"],
    input[type="password"],input[type="url"],input[type="number"],textarea,select,option) {
    background:#f3f8fc !important; color:#19394e !important; caret-color:#19394e; color-scheme:light;
  }
  html[data-gg-theme="dark"] #ggw-site :is(input,textarea)::placeholder { color:#496174 !important; opacity:1 !important; }
  html[data-gg-theme="dark"] #ggw-site :focus-visible { outline:2px solid #9cdbff !important; outline-offset:2px; box-shadow:0 0 0 2px #19394e; }
}
@layer poezie-layout {
  html[data-gg-theme="dark"] #ggw-site :is(.ggw-plugin-page,.gg-profile-page,.gg370-studio,.ggwb-v2,.gg25-signup,.gg-rhyme) :is(label,legend,.description,.field-description) {
    color:#19394e !important;
    background-color:#e7f0f6 !important;
    border-radius:3px;
    box-decoration-break:clone;
  }
  html[data-gg-theme="dark"] #ggw-site .gg-poezie-inhoud .card-petrol :is(h1,h2,h3,h4,p,li,.eyebrow) {
    color:#fbfdff !important;
  }
}

@layer poezie-layout {
  @media (max-width: 820px) {
    body.gg-literary-canvas #ggw-site main {
      box-sizing:border-box;
      min-inline-size:0 !important;
      overflow-wrap:break-word;
    }
    #ggw-site main :where(section,article,aside,form,fieldset,figure,.wp-block-group,.wp-block-column) {
      box-sizing:border-box; min-inline-size:0 !important; max-inline-size:100% !important;
    }
    #ggw-site main :is(.gg-single-grid,.gg-profile-layout,.gg-workspace-grid,.gg-rhyme-layout,.gg-ga-layout,
      .blog-studio-layout,.gg411-single-layout,.gg-login-split,.ggw-with-sidebar,.ggw-layout--editorial,
      .builder-grid,.gg-cro-grid-4,.gg-poezie-inhoud .layout-sidebar) {
      grid-template-columns:minmax(0,1fr) !important;
      grid-template-areas:none !important;
    }
    #ggw-site main :is(.gg-single-grid,.gg-profile-layout,.gg-workspace-grid,.gg-rhyme-layout,.gg-ga-layout,
      .blog-studio-layout,.gg411-single-layout,.gg-login-split,.ggw-with-sidebar,.builder-grid) > * {
      grid-area:auto !important; min-width:0 !important; max-width:100% !important;
    }
    #ggw-site main :where(img,video,iframe,svg,textarea,select,input,button) {
      box-sizing:border-box; max-inline-size:100%;
    }
    #ggw-site main :where(.wp-block-table,pre) { max-width:100%; overflow-x:auto; }
    #ggw-site main :is(.gg-poem-toolbar,.gg-reading-controls,.gg-poem-actions,.gg-author-buttons,.gg-action-group) {
      flex-wrap:wrap !important; min-width:0;
    }
    #ggw-site main :where(h1,h2,h3,h4,p,legend,label,.wp-block-button__link) { overflow-wrap:anywhere; }
  }
  @media (max-width: 600px) {
    #ggw-site main :is(.gg-related-grid,.gg-profile-poem-card-grid,.gg-profile-community-grid,.gg-rhyme-result-grid,
      .gg-rubric-directory-grid,.gg-bundle-directory-grid,.gg-books-grid,.ggw-poem-grid,.gg-awards-grid,
      .gg406-card-grid,.gg320-book-grid,.gg321-books-grid,.gg48-grid,.blog-cards-grid) {
      grid-template-columns:minmax(0,1fr) !important;
    }
    #ggw-site main :is(.gg-profile-stat-grid,.gg-profile-action-grid) {
      grid-template-columns:repeat(auto-fit,minmax(min(100%,125px),1fr)) !important;
    }
    #ggw-site main :where(input[type=text],input[type=search],input[type=email],input[type=password],textarea,select) {
      min-width:0 !important; max-width:100% !important; font-size:16px;
    }
    #ggw-site main .wp-block-columns { flex-wrap:wrap !important; }
    #ggw-site main .wp-block-columns > .wp-block-column { flex-basis:100% !important; }
  }
}
