.ma-type-editor { container: ma-invoice-type / inline-size; margin-block: 1.5rem; }
.ma-type-editor [hidden] { display: none !important; }
.ma-type-section { padding: 1.25rem; border: 1px solid var(--ma-line, #e7e1ef); border-radius: 1rem; background: #fff; }
.ma-type-section + .ma-type-section { margin-top: 1rem; }
.ma-type-section h3 { font-size: 1.16rem; margin: 0 0 .65rem; }
.ma-type-help { color: var(--ma-muted, #69647a); font-size: .92rem; line-height: 1.6; margin: 0 0 1.25rem; }
.ma-type-list { display: grid; gap: 1rem; margin-bottom: 1rem; }
.ma-type-card { padding: 1rem; background: #f9f7fd; border: 1px solid var(--ma-line, #e7e1ef); border-radius: .8rem; min-width: 0; }
.ma-type-card h4 { margin: 0 0 1rem; font-size: 1.05rem; }
.ma-type-document { border: 1px solid #ded6ea; border-radius: .65rem; background: #fff; padding: 1rem; min-width: 0; }
.ma-type-document h5 { margin: 0 0 1rem; font-size: .98rem; }
.ma-type-tax { border-top: 1px solid #e0d8eb; padding-top: 1rem; }
.ma-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.ma-type-grid > .ma-field { display: grid; grid-template-rows: subgrid; grid-row: span 3; gap: .4rem; margin: 0; min-width: 0; }
.ma-type-grid > .ma-field > span { align-self: end; }
.ma-type-grid > .ma-field > input, .ma-type-grid > .ma-field > select { align-self: start; width: 100%; min-width: 0; }
.ma-type-field-notes small { display: block; margin: 0; font-size: .82rem; color: var(--ma-muted, #69647a); }
.ma-type-field-notes .ma-field-error { color: var(--ma-danger, #b42338); }
.ma-type-grid > .ma-field > .ma-field-error { grid-row: 3; }
.ma-type-grid > .ma-field:has(> .ma-field-error) .ma-type-field-notes { visibility: hidden; }
.ma-type-wide { grid-column: 1 / -1; }
.ma-type-editor textarea { resize: vertical; min-height: 90px; overflow-wrap: anywhere; }
.ma-type-section > .ma-field { margin-bottom: 1rem; }
.ma-type-editor .ma-type-remove { margin-left: .7rem; margin-top: .5rem; }
.ma-type-check { display: flex; flex-wrap: wrap; gap: .65rem; align-items: start; font-size: .94rem; margin: 1rem 0; cursor: pointer; }
.ma-type-check input { width: 1.15rem; height: 1.15rem; min-height: 1.15rem; max-height: 1.15rem; padding: 0; flex: 0 0 auto; margin-top: .15rem; accent-color: #6713e9; }
.ma-type-check span { flex: 1; min-width: 160px; }
.ma-type-check.ma-field > span { font-size: .94rem; font-weight: 400; }
.ma-type-check .ma-field-error { flex-basis: 100%; }
.ma-type-summary { font-size: .9rem; color: var(--ma-muted, #69647a); padding: .75rem; background: #f6f2fb; overflow-wrap: anywhere; }
.ma-type-bank { margin-bottom: 1rem; border-top: 1px solid #e0d8eb; padding-top: .8rem; }
.ma-type-bank summary { font-weight: 700; cursor: pointer; margin-bottom: .9rem; }
@container ma-invoice-type (max-width: 760px) { .ma-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container ma-invoice-type (max-width: 520px) { .ma-type-grid { grid-template-columns: 1fr; } .ma-type-section, .ma-type-card, .ma-type-document { padding: .8rem; } .ma-type-editor .ma-type-remove { margin-left: 0; } }
