.kunst-reference-list{width:100%}.kunst-reference-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;align-items:end;gap:12px;margin-bottom:12px}.kunst-reference-row label{display:block;font-weight:400}.kunst-reference-row input{display:block;width:100%;box-sizing:border-box;margin-top:5px}.kunst-reference-row .button{margin-bottom:0}@media(max-width:650px){.kunst-reference-row{grid-template-columns:1fr}.kunst-reference-row .button{justify-self:start}}


/* Admin: VIITED eraldi üldplokis, väljaspool ACF TAB-e. */
body.wp-admin .kunst-admin-general-references{
    border:1px solid #dcdcde;
    box-shadow:0 1px 1px rgba(0,0,0,.04);
}
body.wp-admin .kunst-admin-general-references > .inside{
    margin:0;
    padding:16px;
}
body.wp-admin .kunst-admin-general-references .acf-field[data-name="viited"]{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
}
body.wp-admin .kunst-admin-general-references .acf-field[data-name="viited"] > .acf-label{
    margin:0 0 8px!important;
}


/* 1.12.61: admini ja kasutaja VIITED kasutavad sama visuaalset struktuuri. */
.kunst-reference-list,
.kunst-reference-list label,
.kunst-reference-list input,
.kunst-reference-list button,
body.wp-admin .kunst-admin-general-references{
    font-family:var(--kunst-ui-font,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);
    font-size:var(--kunst-ui-text-size,13px);
}
.kunst-footer-references > .acf-label > label,
body.wp-admin .kunst-admin-general-references .acf-field[data-name="viited"] > .acf-label > label{
    font-size:var(--kunst-ui-heading-size,16px)!important;
    line-height:1.35!important;
    font-weight:800!important;
    letter-spacing:.075em!important;
    text-transform:uppercase!important;
    color:#5f4d68!important;
}
.kunst-footer-references > .acf-label > .description,
body.wp-admin .kunst-admin-general-references .acf-field[data-name="viited"] > .acf-label > .description{
    margin:4px 0 12px!important;
    font-size:var(--kunst-ui-text-size,13px)!important;
    line-height:1.45!important;
    color:#526258!important;
}
.kunst-footer-references .kunst-reference-row,
body.wp-admin .kunst-admin-general-references .kunst-reference-row{
    display:grid!important;
    grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) auto!important;
    gap:8px!important;
    align-items:end!important;
    margin:0 0 8px!important;
}
.kunst-footer-references .kunst-reference-row input,
body.wp-admin .kunst-admin-general-references .kunst-reference-row input{
    min-height:38px!important;
    margin-top:4px!important;
    padding:7px 9px!important;
    border:1px solid #9fb5a4!important;
    border-radius:7px!important;
    background:#fff!important;
    font-size:var(--kunst-ui-text-size,13px)!important;
}
.kunst-footer-references .kunst-reference-add,
.kunst-footer-references .kunst-reference-remove,
body.wp-admin .kunst-admin-general-references .kunst-reference-add,
body.wp-admin .kunst-admin-general-references .kunst-reference-remove{
    display:inline!important;
    width:auto!important;
    min-height:0!important;
    height:auto!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:var(--kunst-ui-text-size,13px)!important;
    line-height:1.4!important;
    text-decoration:underline!important;
    cursor:pointer!important;
}
.kunst-footer-references .kunst-reference-add,
body.wp-admin .kunst-admin-general-references .kunst-reference-add{color:#315f41!important}
.kunst-footer-references .kunst-reference-remove,
body.wp-admin .kunst-admin-general-references .kunst-reference-remove{color:#7b4f2d!important;margin-bottom:8px!important}
body.wp-admin .kunst-admin-general-references .kunst-admin-rights-note{
    margin:0 0 12px!important;
    padding:0 0 12px!important;
    border-bottom:1px solid var(--kunst-ui-border,#dfe6df)!important;
    font-size:var(--kunst-ui-text-size,13px)!important;
    line-height:1.45!important;
}
body.wp-admin .kunst-admin-general-references .kunst-admin-references-slot{
    width:100%!important;
}
@media(max-width:650px){
    .kunst-footer-references .kunst-reference-row,
    body.wp-admin .kunst-admin-general-references .kunst-reference-row{
        grid-template-columns:1fr!important;
    }
}


/* 1.12.63: VIITED ühises plokis enne TAB-e, admin ja kasutaja vaates sama loogika. */
#kunst-konto-ulesande-vorm .kunst-general-references,
body.wp-admin .acf-field.kunst-general-references{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    position:static!important;
    box-sizing:border-box!important;
    width:100%!important;
    margin:0!important;
    padding:16px!important;
    border:1px solid #d7e2d8!important;
    border-left:4px solid #315f41!important;
    border-radius:8px!important;
    background:#f8faf8!important;
    box-shadow:none!important;
}
#kunst-konto-ulesande-vorm .kunst-general-references > .acf-label,
body.wp-admin .acf-field.kunst-general-references > .acf-label{
    margin:0 0 8px!important;
}
#kunst-konto-ulesande-vorm .kunst-general-references > .acf-label > label,
body.wp-admin .acf-field.kunst-general-references > .acf-label > label{
    color:#315f41!important;
    font-family:var(--kunst-ui-font,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif)!important;
    font-size:var(--kunst-ui-heading-size,16px)!important;
    font-weight:800!important;
    line-height:1.35!important;
    letter-spacing:.075em!important;
    text-transform:uppercase!important;
}
#kunst-konto-ulesande-vorm .kunst-general-references > .acf-label > .description,
body.wp-admin .acf-field.kunst-general-references > .acf-label > .description{
    margin:4px 0 12px!important;
    color:#526258!important;
    font-size:var(--kunst-ui-text-size,13px)!important;
    line-height:1.45!important;
}
#kunst-konto-ulesande-vorm .kunst-general-references .kunst-reference-row,
body.wp-admin .acf-field.kunst-general-references .kunst-reference-row{
    display:grid!important;
    grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) auto!important;
    gap:8px!important;
    align-items:end!important;
    margin:0 0 8px!important;
}
#kunst-konto-ulesande-vorm .kunst-general-references .kunst-reference-add,
#kunst-konto-ulesande-vorm .kunst-general-references .kunst-reference-remove,
body.wp-admin .acf-field.kunst-general-references .kunst-reference-add,
body.wp-admin .acf-field.kunst-general-references .kunst-reference-remove{
    display:inline!important;
    width:auto!important;
    min-height:0!important;
    height:auto!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:var(--kunst-ui-text-size,13px)!important;
    line-height:1.4!important;
    text-decoration:underline!important;
}
#kunst-konto-ulesande-vorm .kunst-general-references .kunst-reference-add,
body.wp-admin .acf-field.kunst-general-references .kunst-reference-add{color:#315f41!important}
#kunst-konto-ulesande-vorm .kunst-general-references .kunst-reference-remove,
body.wp-admin .acf-field.kunst-general-references .kunst-reference-remove{color:#7b4f2d!important;margin-bottom:8px!important}
body.wp-admin .kunst-admin-general-references{display:none!important}
@media(max-width:650px){
    #kunst-konto-ulesande-vorm .kunst-general-references .kunst-reference-row,
    body.wp-admin .acf-field.kunst-general-references .kunst-reference-row{
        grid-template-columns:1fr!important;
    }
}

/* Shared references are independent of the active ACF tab. */
#kunst-konto-ulesande-vorm .acf-field.kunst-general-references,
body.wp-admin .acf-field.kunst-general-references {
    float:none!important; clear:both!important;
    border:0!important; border-top:1px solid var(--kunst-ui-border,#dfe6df)!important;
    border-radius:0!important; background:transparent!important;
    padding:12px 0!important;
}

/* Account theme rules use :has() and !important; keep this neutral exception stronger. */
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-general-references {
    border:0!important; border-top:1px solid var(--kunst-ui-border,#dfe6df)!important;
    padding:12px 0!important; background:transparent!important; border-radius:0!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-general-references .kunst-reference-add,
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-general-references .kunst-reference-remove {
    background:transparent!important; border:0!important; box-shadow:none!important;
    padding:0!important; color:#315f41!important;
}


/* 1.12.75: neutral form cards; tab colours belong to tab controls only. */
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm :is(
 .acf-fields > .acf-field:not([data-type="tab"]),
 .kunst-lesson-ready-pdf, .kunst-general-images,
 .kunst-ulesande-teemad, .kunst-ulesande-marksonad,
 .kunst-ulesande-toovahendid, .kunst-ulesande-moisted),
body.wp-admin #poststuff :is(
 .acf-field.kunst-always-visible, .kunst-general-images,
 .acf-field[class*="kunst-admin-tab-"], .kunst-admin-ulesanne-card) {
 box-sizing:border-box!important;
 border:1px solid #dededb!important;
 border-radius:8px!important;
 background:#fff!important;
 box-shadow:none!important;
 color:#343a36!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm :is(
 .kunst-always-visible, .kunst-lesson-ready-pdf),
body.wp-admin #poststuff :is(.acf-field.kunst-always-visible, .kunst-general-images) {
 float:none!important; clear:both!important; width:100%!important;
 margin:0 0 16px!important; padding:18px 20px!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-lesson-ready-pdf > .acf-field {
 border:0!important; padding:0!important; margin:0!important; background:transparent!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm :is(
 .acf-field > .acf-label > label, .kunst-always-visible h3,
 .kunst-ulesande-lisad h3),
body.wp-admin #poststuff :is(
 .kunst-always-visible > .acf-label > label,
 .kunst-general-images > .postbox-header h2,
 .acf-field[class*="kunst-admin-tab-"] > .acf-label > label,
 .kunst-admin-ulesanne-card > .acf-label > label) {
 color:#343a36!important;
 font:700 16px/1.35 var(--kunst-ui-font,system-ui,sans-serif)!important;
 letter-spacing:.045em!important; text-transform:uppercase!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm :is(
 .kunst-always-visible .description, .kunst-always-visible .kunst-pildi-juhis),
body.wp-admin #poststuff .kunst-always-visible .description {
 color:#666c67!important; font-size:13px!important; line-height:1.45!important;
 margin:5px 0 12px!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-general-images .kunst-pildi-tulp {
 border:0!important; border-radius:0!important; background:transparent!important;
 padding:0!important; gap:8px!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-general-images .kunst-lisad-grid {
 gap:24px!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-general-images .kunst-pildi-tulp > label:first-child {
 color:#343a36!important;
}
body.wp-admin #poststuff .kunst-general-images > .postbox-header {
 border:0!important; padding:0!important; background:transparent!important;
}
body.wp-admin #poststuff .kunst-general-images > .postbox-header h2 {
 padding:0!important;
}
body.wp-admin #poststuff .kunst-general-images > .inside {
 margin:12px 0 0!important; padding:0!important; border:0!important;
}
body.wp-admin #poststuff .kunst-general-images > .inside > .acf-field {
 border:0!important; background:transparent!important; padding:0 16px 12px 0!important;
}
body.wp-admin #poststuff .kunst-general-images .acf-field > .acf-label > label {
 color:#343a36!important; font:600 13px/1.4 system-ui,sans-serif!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-always-visible :is(input:not([type="file"]):not([type="checkbox"]), textarea),
body.wp-admin #poststuff .kunst-always-visible :is(input:not([type="hidden"]):not([type="checkbox"]), textarea) {
 border:1px solid #c9ceca!important; background:#fff!important;
 border-radius:6px!important; color:#343a36!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-always-visible :is(.kunst-failinupp, .button:not(.kunst-reference-add):not(.kunst-reference-remove)),
body.wp-admin #poststuff .kunst-general-images .acf-button {
 background:#4d5952!important; color:#fff!important; border:1px solid #4d5952!important;
 box-shadow:none!important;
}
#kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm .kunst-general-references :is(.kunst-reference-add,.kunst-reference-remove),
body.wp-admin #poststuff .kunst-general-references :is(.kunst-reference-add,.kunst-reference-remove) {
 background:transparent!important; border:0!important; color:#4d5952!important;
 box-shadow:none!important; padding:0!important;
}
@media(max-width:650px) {
 #kunst-konto-ulesande-vorm#kunst-konto-ulesande-vorm :is(.kunst-always-visible,.kunst-lesson-ready-pdf),
 body.wp-admin #poststuff :is(.acf-field.kunst-always-visible,.kunst-general-images) {
  padding:15px 16px!important;
 }
 body.wp-admin #poststuff .kunst-general-images > .inside > .acf-field {
  width:100%!important; float:none!important; padding-right:0!important;
 }
}

/* Keep native ACF image fields in three equal columns. */
body.wp-admin #poststuff .kunst-general-images > .inside {
 display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important; gap:20px!important;
}
body.wp-admin #poststuff .kunst-general-images > .inside::before,
body.wp-admin #poststuff .kunst-general-images > .inside::after { display:none!important; }
body.wp-admin #poststuff .kunst-general-images > .inside > .acf-field {
 width:auto!important; float:none!important; clear:none!important; padding:0!important; min-width:0!important;
}
body.wp-admin #poststuff .kunst-general-images > .inside > [data-name="piltide_info"] { grid-column:1 / -1!important; }
@media(max-width:650px) {
 body.wp-admin #poststuff .kunst-general-images > .inside { grid-template-columns:1fr!important; }
}
