/* REV142 FIX61 / PROD 15.39 — Prelavori canonical field system.
   Intentionally isolated from .fix68-fasc-grid: that class carries Fascicolo-only
   priority grid templates and cannot host the additional Prelavoro structural fields.
   Values are the same canonical detail tokens used by Fascicoli/Pratiche. */
.prework-detail-page .prework-canonical-grid{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  grid-template-areas:
    "code code code status status status subject subject subject subject subject subject"
    "title title title title title title title title title title title title"
    "prov prov comune comune comune comune comune comune comune cat cat cat"
    "address address address address address address address address address cap cap cap"
    "object object object object object object object object object object object object"
    "description description description description description description description description description description description description"
    "notes notes notes notes notes notes notes notes notes notes notes notes";
  gap:10px 12px;
  width:100%;
  margin-top:12px;
  align-items:start;
  min-width:0;
}
.prework-detail-page .prework-canonical-grid>.field{min-width:0;max-width:100%;margin:0}
.prework-detail-page .pw-code{grid-area:code}.prework-detail-page .pw-status{grid-area:status}.prework-detail-page .pw-subject{grid-area:subject}.prework-detail-page .pw-title{grid-area:title}.prework-detail-page .pw-prov{grid-area:prov}.prework-detail-page .pw-comune{grid-area:comune}.prework-detail-page .pw-cat{grid-area:cat}.prework-detail-page .pw-address{grid-area:address}.prework-detail-page .pw-cap{grid-area:cap}.prework-detail-page .pw-object{grid-area:object}.prework-detail-page .pw-description{grid-area:description}.prework-detail-page .pw-notes{grid-area:notes}
.prework-detail-page .prework-canonical-grid>.field>label{
  display:block;height:13px;min-height:13px;max-height:13px;margin:0 0 4px;padding:0;
  font-size:var(--stgpt-detail-label-font);line-height:13px;font-weight:650;color:var(--muted);
  text-transform:none;letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:clip;
}
.prework-detail-page .prework-canonical-grid :is(.prework-read-control,input,select){
  display:flex;align-items:center;width:100%;min-width:0;max-width:100%;height:var(--stgpt-detail-control-h);min-height:var(--stgpt-detail-control-h);max-height:var(--stgpt-detail-control-h);
  margin:0;padding:10px 10px;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:var(--stgpt-detail-value-font);font-weight:500;line-height:var(--stgpt-detail-line-h);
  color:var(--text);-webkit-text-fill-color:var(--text);white-space:nowrap;text-align:left;text-align-last:left;text-indent:0;
  background:#edf3f2;box-shadow:none;outline:0;
}
.prework-detail-page .prework-canonical-grid input,.prework-detail-page .prework-canonical-grid select{display:block}
.prework-detail-page .prework-read-control{display:flex;align-items:center;overflow:hidden;text-overflow:clip}
.prework-detail-page .prework-read-control.multiline{display:block;overflow-wrap:anywhere;word-break:break-word}
.prework-detail-page .prework-canonical-grid select{appearance:none;-webkit-appearance:none;background-image:none}
.prework-detail-page .prework-canonical-grid :is(input,select,textarea):is(:focus,:focus-visible,:active){background:#edf3f2;border-color:var(--line);box-shadow:none;outline:0}
.prework-detail-page .prework-canonical-grid :is(textarea,.prework-read-control.multiline){
  width:100%;min-width:0;max-width:100%;height:var(--stgpt-detail-textarea-min,88px);min-height:var(--stgpt-detail-textarea-min,88px);max-height:none;margin:0;padding:9px 10px;box-sizing:border-box;
  border:1px solid var(--line);border-radius:10px;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:var(--stgpt-detail-value-font);font-weight:500;line-height:1.38;
  color:var(--text);-webkit-text-fill-color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;background:#edf3f2;box-shadow:none;outline:0;
}
.prework-detail-page .prework-canonical-grid textarea{overflow-y:hidden;resize:none}
.prework-detail-page .prework-subject-control{display:grid;grid-template-columns:minmax(0,1fr) var(--stgpt-detail-control-h);gap:7px;align-items:stretch;width:100%;min-width:0;height:var(--stgpt-detail-control-h);min-height:var(--stgpt-detail-control-h);max-height:var(--stgpt-detail-control-h);box-sizing:border-box}
.prework-detail-page .prework-subject-control>select{width:100%;min-width:0;height:100%;min-height:100%;max-height:100%}
.prework-detail-page .prework-inline-icon{width:var(--stgpt-detail-control-h);height:100%;min-width:var(--stgpt-detail-control-h);min-height:100%;max-height:100%;padding:0;display:grid;place-items:center;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;background:#edf3f2;color:var(--accent);cursor:pointer}
.prework-detail-page .prework-inline-icon :is(.stgpt-ui-icon,.stgpt-ui-icon svg){width:21px;height:21px}
.prework-detail-page .stgpt-geo-address-control{position:relative;display:block;width:100%;min-width:0;box-sizing:border-box}
.prework-detail-page .stgpt-geo-address-control>:is(.prework-read-control,input){padding-right:44px}
.prework-detail-page .stgpt-geo-address-icon{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:34px;min-width:34px;height:34px;min-height:34px;margin:0;padding:5px;border:0;border-radius:6px;background:transparent;box-shadow:none;display:grid;place-items:center;z-index:1;color:#63817d;cursor:pointer;box-sizing:border-box}
.prework-detail-page .stgpt-geo-address-icon.is-read{pointer-events:none;cursor:default;opacity:.72}
.prework-detail-page .stgpt-geo-address-icon:focus-visible{outline:2px solid currentColor;outline-offset:0}
.prework-detail-page .stgpt-geo-address-icon svg{width:20px;height:20px}
.prework-detail-page .pw-prov :is(.prework-read-control,input,select),.prework-detail-page .pw-cat :is(.prework-read-control,input,select),.prework-detail-page .pw-cap :is(.prework-read-control,input,select){padding-left:8px;padding-right:6px;font-variant-numeric:tabular-nums;word-break:keep-all}

@media(max-width:820px){
  .prework-detail-page .prework-hero{padding:13px}
  .prework-detail-page .prework-hero-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px}
  .prework-detail-page .prework-detail-actions{display:grid;grid-auto-flow:column;grid-auto-columns:40px;justify-content:end;gap:8px}
  .prework-detail-page .prework-canonical-grid{
    grid-template-columns:70px minmax(0,1fr) 72px 88px;
    column-gap:6px;row-gap:10px;
    grid-template-areas:
      "code code status status"
      "subject subject subject subject"
      "title title title title"
      "prov comune comune cat"
      "address address address cap"
      "object object object object"
      "description description description description"
      "notes notes notes notes";
  }
}
@media(max-width:390px){
  .prework-detail-page .prework-canonical-grid{grid-template-columns:66px minmax(0,1fr) 68px 88px;column-gap:5px}
}
@media(max-width:390px){
  .prework-detail-page .prework-detail-actions{
    grid-template-columns:repeat(2,40px);
    grid-auto-flow:row;
    grid-auto-columns:auto;
    gap:8px;
    width:88px;
    min-width:88px;
    max-width:88px;
  }
}
