/**
 * Shared, narrowly scoped authoring visual layer, 2026-11.
 * Loaded after account/admin base styles. One source for all three content types.
 * Do not recolour ACF tabs, teacher notes, student stages or native TinyMCE toolbars.
 */
:root {
  --kunst-authoring-card-border: var(--kunst-ui-border, #dfe6df);
  --kunst-authoring-card-radius: var(--kunst-ui-radius, 8px);
  --kunst-authoring-card-gap: var(--kunst-ui-gap-md, 16px);
  --kunst-authoring-card-padding: 18px;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,
  body.kunst-authoring-admin #poststuff) {
  font-family:var(--kunst-ui-font,system-ui,-apple-system,sans-serif);
  font-size:var(--kunst-ui-text-size,13px);
  line-height:var(--kunst-ui-line-height,1.45);
  min-width:0;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,
  body.kunst-authoring-admin #poststuff) :is(.acf-field,.acf-input,.acf-fields,.wp-editor-wrap,.wp-editor-container,.postbox,.inside) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
  > .acf-fields {
  min-width:0;
  max-width:100%;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,
  body.kunst-authoring-admin #poststuff)
  .acf-field > .acf-label > label,
body.kunst-authoring-admin #poststuff :is(.kunst-admin-main-editor-heading h2,.kunst-admin-editor-section h2) {
  font-family:var(--kunst-ui-heading-font,var(--kunst-ui-font,system-ui));
  font-size:var(--kunst-ui-heading-size,16px);
  font-weight:600;
  line-height:1.35;
  text-transform:none;
  letter-spacing:0;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,
  body.kunst-authoring-admin #poststuff)
  .acf-field > .acf-label > .description,
body.kunst-authoring-admin #poststuff :is(.postbox .inside > p.description,.kunst-admin-editor-section > p.description) {
  font-family:var(--kunst-ui-font,system-ui);
  font-size:var(--kunst-ui-text-size,13px);
  line-height:1.55;
  font-weight:400;
  color:var(--kunst-ui-muted,#66706a);
  margin:5px 0 12px;
  overflow-wrap:anywhere;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,
  body.kunst-authoring-admin #poststuff)
  :is(input[type="text"],input[type="url"],input[type="number"],input[type="email"],select,textarea:not(.wp-editor-area)) {
  box-sizing:border-box;
  max-width:100%;
  min-width:0;
  font-family:var(--kunst-ui-font,system-ui);
  font-size:var(--kunst-ui-text-size,13px);
  line-height:var(--kunst-ui-line-height,1.45);
}
:is(#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
  > .acf-fields > :is(.acf-field,.kunst-worksheet-upload-block,.kunst-worksheet-meta-block,.kunst-worksheet-design-block) {
  box-sizing:border-box;
  width:100%;
  min-width:0;
  max-width:100%;
  grid-column:1/-1;
  clear:both;
}
:is(#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
  > .acf-fields > :is(.acf-field,.kunst-worksheet-upload-block,.kunst-worksheet-meta-block,.kunst-worksheet-design-block)
  .acf-field {
  min-width:0;
  max-width:100%;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
  :is(.kunst-submit-actions,.kunst-draft-actions,.acf-form-submit),
body.kunst-authoring-admin #poststuff :is(#submitdiv .inside,#major-publishing-actions) {
  box-sizing:border-box;
  max-width:100%;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
  :is(.kunst-submit-actions,.kunst-draft-actions) {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-block:16px;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
  :is(.kunst-submit-actions,.kunst-draft-actions) button,
body.kunst-authoring-admin #poststuff #publish {
  box-sizing:border-box;
  min-height:44px;
  padding-inline:16px;
  font-family:var(--kunst-ui-button-font,var(--kunst-ui-font,system-ui));
  font-size:var(--kunst-ui-text-size,13px);
  font-weight:600;
  line-height:1.35;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
  :is(.kunst-submit-actions,.kunst-draft-actions) .button.alt,
body.kunst-authoring-admin #poststuff #publish {
  background:var(--kunst-color-primary-main,#315f41);
  border-color:var(--kunst-color-primary-main,#315f41);
  color:#fff;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
  :is(.kunst-submit-actions,.kunst-draft-actions) .kunst-save-draft {
  background:#fff;
  border-color:var(--kunst-color-primary-border,#b7cdbb);
  color:var(--kunst-color-primary-dark,#234632);
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,
  body.kunst-authoring-admin #poststuff)
  :is(.kunst-materjal-pildilisaja,.kunst-failivalik,.kunst-worksheet-upload-group) {
  max-width:100%;
  min-width:0;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,
  body.kunst-authoring-admin #poststuff) .kunst-materjal-pilditeade {
  font-size:var(--kunst-ui-text-size,13px);
  line-height:1.5;
  overflow-wrap:anywhere;
}
body.kunst-authoring-admin #poststuff :is(#post-body-content,#postbox-container-1,#postbox-container-2,#normal-sortables,#side-sortables) {
  box-sizing:border-box;
  min-width:0;
}
body.kunst-authoring-admin #poststuff .postbox > .inside > :is(.wp-editor-wrap,.acf-fields) {
  width:100%;
  max-width:100%;
}
body.kunst-authoring-admin #poststuff .kunst-admin-workflow {
  border-color:var(--kunst-color-primary-border,#b7cdbb);
  background:var(--kunst-color-primary-surface,#f7f9f7);
}
/* Exclude phase cards from the neutral palette: student purple and teacher brown
   remain controlled by tab-colors.css and the existing admin phase classes. */
@media (max-width:782px) {
  :root { --kunst-authoring-card-padding:14px; }
  :is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
    :is(.acf-fields,.kunst-worksheet-meta-block,.kunst-worksheet-upload-block,.kunst-worksheet-design-block) {
    width:100%;
    min-width:0;
    max-width:100%;
  }
  body.kunst-authoring-admin #poststuff .kunst-admin-editor-section { padding:14px; }
}
@media (max-width:600px) {
  :is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,
    body.kunst-authoring-admin #poststuff)
    :is(input[type="text"],input[type="url"],input[type="number"],input[type="email"],select,textarea:not(.wp-editor-area)) {
    font-size:16px; /* Prevent focus zoom on narrow touch screens. */
  }
  :is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm)
    :is(.kunst-submit-actions,.kunst-draft-actions) button {
    flex:1 1 180px;
    max-width:100%;
  }
}
/* Do not override native media buttons, editing tabs or TinyMCE toolbar controls. */


/* Exact same progress row in My Account and the native WordPress edit screen. */
.kunst-authoring-workflow {
  box-sizing:border-box;
  max-width:100%;
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px 11px;
  margin:12px 0 18px;
  padding:10px 14px;
  border:1px solid var(--kunst-color-primary-border,#b7cdbb);
  border-radius:6px;
  background:var(--kunst-color-primary-surface,#f7f9f7);
  color:var(--kunst-color-primary-main,#315f41);
  font:500 13px/1.45 var(--kunst-ui-font,system-ui,-apple-system,sans-serif);
}
.kunst-authoring-workflow strong {
  font-weight:700;
  color:var(--kunst-color-primary-dark,#234632);
  margin-right:12px;
}
.kunst-authoring-workflow span[aria-hidden="true"] { user-select:none; }
@media (max-width:600px) {
  .kunst-authoring-workflow { gap:6px 8px; padding:10px 12px; }
  .kunst-authoring-workflow strong { flex-basis:100%; margin-right:0; }
}


/* 2026-11-11: lesson form metadata. ACF tab handling remains unchanged. */
#kunst-konto-ulesande-vorm .acf-fields > :is(.kunst-meta-full,.acf-field[data-name="ulesande_luhikirjeldus"]),
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field.kunst-meta-full {
  box-sizing:border-box!important;width:100%!important;max-width:none!important;
  min-width:0!important;grid-column:1 / -1!important;clear:both!important;
  float:none!important;flex-basis:100%!important;
}
#kunst-konto-ulesande-vorm .acf-fields > .kunst-meta-third {
  box-sizing:border-box!important;min-width:0!important;max-width:none!important;
  grid-column:auto!important;width:100%!important;float:none!important;
  margin:0 0 12px!important;
}
@media(min-width:900px) {
  #kunst-konto-ulesande-vorm .acf-fields {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    column-gap:14px!important;
  }
}
@media(min-width:760px) and (max-width:899px) {
  #kunst-konto-ulesande-vorm .acf-fields {grid-template-columns:1fr!important}
}
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field.kunst-meta-third {
  box-sizing:border-box!important;min-width:0!important;width:33.333%!important;
  max-width:33.333%!important;float:left!important;clear:none!important;
}
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field.kunst-meta-full {
  float:none!important;clear:both!important;
}
@media(max-width:1100px) {
  body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field.kunst-meta-third {
    width:100%!important;max-width:none!important;float:none!important;clear:both!important;
  }
}
/* Full-width concepts card with one consistent sentence-case heading. */
#kunst-konto-ulesande-vorm .acf-field[data-name="kunst_moisted_read"],
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field[data-name="kunst_moisted_read"] {
  box-sizing:border-box!important;width:100%!important;max-width:none!important;
  grid-column:1 / -1!important;float:none!important;clear:both!important;
  padding:16px!important;margin:12px 0!important;
  border:1px solid var(--kunst-ui-border,#dfe6df)!important;
  border-left:1px solid var(--kunst-ui-border,#d8ddd9)!important;
  border-radius:8px!important;background:#fff!important;
}
#kunst-konto-ulesande-vorm .acf-field[data-name="kunst_moisted_read"] > .acf-label,
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field[data-name="kunst_moisted_read"] > .acf-label {
  margin:0 0 12px!important;padding:0 0 9px!important;
  border-bottom:1px solid var(--kunst-ui-border,#dfe6df)!important;
}
#kunst-konto-ulesande-vorm .acf-field[data-name="kunst_moisted_read"] > .acf-label > label,
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field[data-name="kunst_moisted_read"] > .acf-label > label {
  font:600 16px/1.35 system-ui,-apple-system,sans-serif!important;
  text-transform:none!important;letter-spacing:0!important;
  color:var(--kunst-color-primary-dark,#064b34)!important;
  margin:0!important;
}
#kunst-konto-ulesande-vorm .acf-field[data-name="kunst_moisted_read"] .acf-input,
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field[data-name="kunst_moisted_read"] .acf-input {
  width:100%!important;max-width:none!important;min-width:0!important;
}
#kunst-konto-ulesande-vorm .acf-field[data-name="ulesande_luhikirjeldus"] textarea,
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field[data-name="ulesande_luhikirjeldus"] textarea {
  display:block;box-sizing:border-box;width:100%!important;max-width:none!important;
  min-height:6.8em!important;resize:vertical!important;overflow-y:auto;
}
/* Any image-removal control in rich authoring prose is an inline text action. */
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,
  body.kunst-authoring-admin #poststuff)
  .kunst-inline-image-remove-link {
    display:inline!important;width:auto!important;height:auto!important;min-height:0!important;
    padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;
    color:#7b4f2d!important;font:500 13px/1.45 system-ui,sans-serif!important;
    text-decoration:underline!important;cursor:pointer!important;
}


/* ACF section supplements always span the stage, not one column. */
#kunst-konto-ulesande-vorm .acf-fields > .acf-field[data-type="kunst_phase_references"],
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field[data-type="kunst_phase_references"] {
  box-sizing:border-box!important;width:100%!important;max-width:none!important;
  min-width:0!important;grid-column:1 / -1!important;float:none!important;clear:both!important;
}
#kunst-konto-ulesande-vorm .acf-field .kunst-extra-refs-editor button.kunst-extra-ref-add,
#kunst-konto-ulesande-vorm .acf-field .kunst-extra-refs-editor button.kunst-extra-ref-remove,
#kunst-konto-materjali-vorm .kunst-extra-refs-editor button.kunst-extra-ref-add,
#kunst-konto-materjali-vorm .kunst-extra-refs-editor button.kunst-extra-ref-remove,
#kunst-konto-toolehe-vorm .kunst-extra-refs-editor button.kunst-extra-ref-add,
#kunst-konto-toolehe-vorm .kunst-extra-refs-editor button.kunst-extra-ref-remove,
body.kunst-authoring-admin #poststuff .acf-field .kunst-extra-refs-editor button.kunst-extra-ref-add,
body.kunst-authoring-admin #poststuff .acf-field .kunst-extra-refs-editor button.kunst-extra-ref-remove {
  display:inline-block!important;width:auto!important;height:auto!important;min-height:0!important;
  padding:0!important;margin:4px 0!important;border:0!important;border-radius:0!important;
  background:transparent!important;background-image:none!important;box-shadow:none!important;
  font:500 13px/1.45 system-ui,sans-serif!important;text-decoration:underline!important;
}

/* 1.18.102: retired the conflicting outer-form 12-column grid. */
/* New rows are simple controls, NOT lesson submit buttons. */
:is(#kunst-konto-ulesande-vorm,body.kunst-authoring-admin #poststuff) .kunst-concept-pairs :is(button[data-concept-add],button[data-concept-remove]),
:is(#kunst-konto-ulesande-vorm,body.kunst-authoring-admin #poststuff) .kunst-concept-pairs :is(button[data-concept-add],button[data-concept-remove]):is(:hover,:focus-visible),
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) .kunst-save-info > button,
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) .kunst-save-info > button:is(:hover,:focus-visible),
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) :is(button,a).kunst-inline-image-remove-link,
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) :is(button,a).kunst-inline-image-remove-link:is(:hover,:focus-visible){
  display:inline-block!important;flex:none!important;box-sizing:border-box!important;
  width:auto!important;max-width:max-content!important;min-width:0!important;
  height:auto!important;min-height:0!important;padding:0!important;margin:3px 12px 3px 0!important;
  background:transparent!important;background-color:transparent!important;background-image:none!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;text-shadow:none!important;
  color:var(--kunst-color-primary-main,#315f41)!important;
  font:500 13px/1.45 system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none!important;
  text-decoration:underline!important;text-underline-offset:2px!important;cursor:pointer!important;
}
:is(#kunst-konto-ulesande-vorm,body.kunst-authoring-admin #poststuff) .kunst-concept-pairs button[data-concept-remove],
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) .kunst-save-info > button:last-child,
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) :is(button,a).kunst-inline-image-remove-link{
  color:var(--kunst-color-teacher-main,#765c47)!important;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) .kunst-save-info > button[hidden]{display:none!important}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) .kunst-save-info{display:flex;gap:4px 12px;align-items:baseline;flex-wrap:wrap}
/* Recovery is an ordinary neutral notice, not a new colored content phase.
 * Both choices remain low-emphasis text actions with identical ink. */
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) .kunst-save-info {
  background:#fff!important;
  border:1px solid #d8ddd9!important;
  color:var(--kunst-color-primary-dark,#244730)!important;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) .kunst-save-info > button,
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) .kunst-save-info > button:last-child {
  color:var(--kunst-color-primary-main,#315f41)!important;
}
:is(#kunst-konto-ulesande-vorm,#kunst-konto-materjali-vorm,#kunst-konto-toolehe-vorm,body.kunst-authoring-admin #poststuff) .kunst-save-info > .kunst-save-status{width:100%;flex-basis:100%}
/* Textareas replace the old WYSIWYG inside each concept row. */
#kunst-konto-ulesande-vorm .kunst-concept-row textarea,
body.kunst-authoring-admin #poststuff .kunst-concept-row textarea{
  display:block!important;width:100%!important;max-width:none!important;
  min-height:4.35em!important;resize:vertical!important;overflow-y:auto!important;
}
/* Prevent button-skin rules for phase cards from styling image removal bars. */
#kunst-konto-ulesande-vorm .acf-field .kunst-inline-image-remove-link,
#kunst-konto-materjali-vorm .acf-field .kunst-inline-image-remove-link,
#kunst-konto-toolehe-vorm .acf-field .kunst-inline-image-remove-link,
body.kunst-authoring-admin #poststuff .acf-field .kunst-inline-image-remove-link{
  display:inline-block!important;width:auto!important;max-width:max-content!important;
  height:auto!important;min-height:0!important;background:none!important;border:0!important;
  box-shadow:none!important;padding:0!important;margin:3px 0!important;
  color:var(--kunst-color-teacher-main,#765c47)!important;
  font:500 13px/1.45 system-ui,sans-serif!important;text-decoration:underline!important;
}

/* 1.18.102: one stable, equally divided metadata row in the lesson form.
   This wrapper deliberately does not move, recreate, or style the ACF tab bar. */
#kunst-konto-ulesande-vorm .acf-fields > .kunst-meta-three-row {
  box-sizing:border-box!important;
  grid-column:1/-1!important;
  grid-row:auto!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(150px,.42fr)!important;
  gap:14px!important;
  align-items:stretch!important;
}
#kunst-konto-ulesande-vorm .acf-fields > .kunst-meta-three-row[hidden] {
  display:none!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row > :is(.kunst-meta-work,.kunst-meta-tools,.kunst-meta-time) {
  box-sizing:border-box!important;
  grid-column:auto!important;
  grid-row:auto!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  float:none!important;
  clear:none!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row > :is(.kunst-meta-work,.kunst-meta-tools) input,
#kunst-konto-ulesande-vorm .kunst-meta-three-row > .kunst-meta-time input {
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row > :is(.kunst-meta-work,.kunst-meta-tools) > input,
#kunst-konto-ulesande-vorm .kunst-meta-three-row > .kunst-meta-time > .acf-input {
  margin-top:auto!important;
}
@media(max-width:900px) {
  #kunst-konto-ulesande-vorm .acf-fields > .kunst-meta-three-row {
    grid-template-columns:1fr!important;
  }
}
/* WP admin keeps the original ACF fields as direct siblings: equal floats are safer
   than reparenting them because ACF needs the native tab and field hierarchy. */
@media(min-width:1080px) {
  body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field.kunst-meta-tools,
  body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field.kunst-meta-work {
    box-sizing:border-box!important;
    width:42%!important;
    max-width:42%!important;
    min-width:0!important;
    float:left!important;
    clear:none!important;
  }
  body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field.kunst-meta-tools {
    clear:both!important;
  }
  body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .acf-field.kunst-meta-time {
    box-sizing:border-box!important;
    width:16%!important;
    max-width:16%!important;
    min-width:0!important;
    float:left!important;
    clear:none!important;
  }
}

/* Work form is a native ACF field. Keep its saved field name and choices unchanged. */
#kunst-konto-ulesande-vorm .kunst-meta-three-row > .kunst-meta-work {
  --kunst-tab-accent:#d8ddd9;
  --kunst-tab-bg:#fff;
  --kunst-tab-title:var(--kunst-color-primary-dark,#064b34);
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row > .kunst-meta-work > .acf-input {
  box-sizing:border-box!important;width:100%!important;max-width:none!important;min-width:0!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row > :is(.kunst-meta-work,.kunst-meta-tools,.kunst-meta-time) {
  box-sizing:border-box!important;width:100%!important;max-width:none!important;min-width:0!important;
}

/* 1.18.103: the time control is compact within the third column. */
#kunst-konto-ulesande-vorm .kunst-meta-three-row > .kunst-meta-time {min-width:0!important;max-width:none!important;width:100%!important;}
#kunst-konto-ulesande-vorm .kunst-meta-three-row > .kunst-meta-time input[type="number"] {max-width:100%!important;width:100%!important;box-sizing:border-box!important;}
@media(min-width:901px) {#kunst-konto-ulesande-vorm .acf-fields > .kunst-meta-three-row {grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(150px,.42fr)!important;}}


/* 1.18.104: independent row, including time field from html_before_fields.
   Applied equally in native WordPress admin and account; no ACF tabs are moved. */
#kunst-konto-ulesande-vorm .kunst-meta-three-row,
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .kunst-meta-three-row {
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(150px,.42fr)!important;
  align-items:stretch!important;
  gap:14px!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  grid-column:1/-1!important;
  clear:both!important;
  float:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row[hidden],
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .kunst-meta-three-row[hidden] {display:none!important;}
#kunst-konto-ulesande-vorm .kunst-meta-three-row > :is(.kunst-meta-tools,.kunst-meta-work,.kunst-meta-time),
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .kunst-meta-three-row > :is(.kunst-meta-tools,.kunst-meta-work,.kunst-meta-time) {
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  margin:0!important;
  padding:18px 20px 20px!important;
  float:none!important;
  clear:none!important;
  grid-column:auto!important;
  border:1px solid #d8ddd9!important;
  border-left:1px solid #d8ddd9!important;
  border-radius:8px!important;
  background:#fff!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row .kunst-meta-time input[type="number"],
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .kunst-meta-three-row .kunst-meta-time input[type="number"] {
  box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row .kunst-meta-time input[type="number"] {
  margin-top:auto!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row .kunst-meta-tools > input,
#kunst-konto-ulesande-vorm .kunst-meta-three-row .kunst-meta-work > .acf-input {
  margin-top:auto!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row .kunst-meta-tools input[type="text"],
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .kunst-meta-three-row .kunst-meta-tools input[type="text"] {
  width:100%!important;min-width:0!important;max-width:none!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row .acf-checkbox-list label {
  display:inline-flex!important;align-items:center;gap:6px;
}
@media(max-width:900px){
  #kunst-konto-ulesande-vorm .kunst-meta-three-row,
  body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .kunst-meta-three-row {
    grid-template-columns:minmax(0,1fr)!important;
  }
}

/* 1.18.106: account lesson metadata row. Override the older full-width
   timing-card rule from forms.css only when time belongs to this row.
   The WordPress admin layout and all field names/data remain unchanged. */
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .acf-fields > .kunst-meta-three-row {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(150px,.42fr)!important;
  align-items:stretch!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-meta-three-row > .kunst-timing-block {
  grid-column:auto!important;
  grid-row:auto!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
}
/* Legacy generic input styles must never expand checkboxes to text-field width. */
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-meta-three-row .kunst-meta-work input[type="checkbox"] {
  display:inline-block!important;
  width:16px!important;
  min-width:16px!important;
  max-width:16px!important;
  height:16px!important;
  min-height:16px!important;
  margin:0!important;
  padding:0!important;
  vertical-align:middle!important;
  flex:0 0 16px!important;
  accent-color:var(--kunst-color-primary-main,#315f41);
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row .kunst-meta-work .acf-checkbox-list {
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:8px!important;
  margin:0!important;
  padding:0!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row .kunst-meta-work .acf-checkbox-list li {
  margin:0!important;
  padding:0!important;
  list-style:none!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row .kunst-meta-work .acf-checkbox-list label {
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  margin:0!important;
  cursor:pointer;
}
@media(max-width:900px) {
  #kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .acf-fields > .kunst-meta-three-row {
    grid-template-columns:minmax(0,1fr)!important;
  }
}

/* 1.18.110: the custom metadata row belongs exclusively to Ülesanne.
   Stronger than the legacy two-ID display:grid!important rule above. */
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .acf-fields > .kunst-meta-three-row[hidden] {
  display:none!important;
}

/* Neutral lesson editing surface; action buttons retain the shared site color. */
#kunst-konto-ulesande-vorm {
  --kunst-lesson-border:#d8ddd9;
  --kunst-lesson-bg:#fff;
  --kunst-lesson-label:var(--kunst-color-primary-dark,#064b34);
    --kunst-lesson-green:var(--kunst-color-primary-main,#315f41);
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row > :is(.kunst-meta-tools,.kunst-meta-work,.kunst-meta-time),
#kunst-konto-ulesande-vorm .acf-field[data-name="kunst_moisted_read"] {
  border-color:var(--kunst-lesson-border)!important;
  background:var(--kunst-lesson-bg)!important;
}
#kunst-konto-ulesande-vorm .kunst-meta-three-row > :is(.kunst-meta-tools,.kunst-meta-work,.kunst-meta-time) > .acf-label > label,
#kunst-konto-ulesande-vorm .acf-field[data-name="kunst_moisted_read"] > .acf-label > label {
  color:var(--kunst-lesson-label)!important;
}
#kunst-konto-ulesande-vorm :is(input[type="text"],input[type="url"],input[type="number"],textarea,select):focus-visible {
  outline-color:var(--kunst-lesson-violet);
}
#kunst-konto-ulesande-vorm .kunst-save-draft {
  border-color:var(--kunst-color-primary-border,#b7cdbb)!important;
  color:var(--kunst-color-primary-dark,#234632)!important;
}
/* Neutral stage and teacher tabs are defined in tab-colors.css. */

/* 1.18.113: lesson editing surface uses the site's current palette variables.
   This affects the form only, not the shared theme or other content forms. */
#kunst-konto-ulesande-vorm.acf-form {
 --kunst-lesson-action:var(--kunst-color-primary-main,#315f41);
 --kunst-lesson-field-border:#d8ddd9;
 --kunst-lesson-field-bg:#fff;
 --kunst-lesson-heading:var(--kunst-color-primary-dark,#064b34);
}
#kunst-konto-ulesande-vorm.acf-form .acf-field.kunst-meta-full:not([data-type="tab"]),
#kunst-konto-ulesande-vorm.acf-form .kunst-meta-three-row > :is(.kunst-meta-tools,.kunst-meta-work,.kunst-meta-time) {
 border-color:var(--kunst-lesson-field-border)!important;
 background:var(--kunst-lesson-field-bg)!important;
 box-shadow:none!important;
}
#kunst-konto-ulesande-vorm.acf-form .acf-field.kunst-meta-full:not([data-type="tab"]) > .acf-label > label,
#kunst-konto-ulesande-vorm.acf-form .kunst-meta-three-row > :is(.kunst-meta-tools,.kunst-meta-work,.kunst-meta-time) > .acf-label > label {
 color:var(--kunst-lesson-heading)!important;
}
#kunst-konto-ulesande-vorm.acf-form .acf-fields :is(input[type="text"],input[type="url"],input[type="number"],textarea:not(.wp-editor-area),select) {
 border-color:var(--kunst-color-primary-border,#b7cdbb);
 background:var(--kunst-color-primary-surface,#fff);
 box-shadow:none;
}
#kunst-konto-ulesande-vorm.acf-form .acf-fields :is(input[type="text"],input[type="url"],input[type="number"],textarea:not(.wp-editor-area),select):focus {
 border-color:var(--kunst-lesson-action);
 outline-color:var(--kunst-lesson-action);
}
#kunst-konto-ulesande-vorm.acf-form .acf-form-submit input[type="submit"],
#kunst-konto-ulesande-vorm.acf-form .kunst-next-tab,
#kunst-konto-ulesande-vorm.acf-form .kunst-prev-tab {
 border-color:var(--kunst-lesson-action);
 color:var(--kunst-lesson-action);
}

/* Lesson-only general metadata now matches the neutral material editor fields. */
#kunst-konto-ulesande-vorm.acf-form .kunst-meta-three-row > :is(.kunst-meta-tools,.kunst-meta-work,.kunst-meta-time),
#kunst-konto-ulesande-vorm.acf-form .acf-field[data-name="kunst_moisted_read"],
body.kunst-authoring-admin.post-type-kunstiulesanne #poststuff .kunst-meta-three-row > :is(.kunst-meta-tools,.kunst-meta-work,.kunst-meta-time) {
  background:#fff!important;
  border-color:#d8ddd9!important;
}
#kunst-konto-ulesande-vorm.acf-form .kunst-meta-three-row > :is(.kunst-meta-tools,.kunst-meta-work,.kunst-meta-time) > .acf-label > label,
#kunst-konto-ulesande-vorm.acf-form .acf-field[data-name="kunst_moisted_read"] > .acf-label > label {
  color:var(--kunst-color-primary-dark,#064b34)!important;
}
