/* SOLA Concept: compact controls - external stylesheet required by CSP style-src self */
.tb-ux .text-block-group{border:1px solid #dfe3e7;border-radius:7px;margin:10px 0;background:#fff;overflow:hidden}
.tb-ux .text-block-group>summary{padding:15px 17px;cursor:pointer;display:flex;gap:12px;align-items:center}
.tb-ux .tb-count{margin-left:auto;font-size:12px;color:#65717c}
.tb-ux .tb-body{padding:16px;background:#fbfcfd}
.tb-ux .tb-row{padding:9px 11px;border:1px solid #e0e4e9;border-radius:6px;background:#fff;margin:7px 0}
.tb-ux .tb-actions{display:inline-flex;gap:4px;flex-wrap:wrap}
.tb-ux .tb-actions form{display:inline-flex;margin:0}
.tb-ux select{width:100%;max-width:560px;padding:10px}
.tb-ux .tb-preview{white-space:pre-wrap;background:#f5f7f9;padding:12px;font-size:12px;line-height:1.5}
.tb-ux details details{margin-top:8px}
.tb-ux .tb-muted{color:#68737e;font-size:12px}
/* Higher specificity overrides general button and .inline button rules. */
body.project-page button.sola-mini-action,
body.project-page .inline button.sola-mini-action,
body.project-page .tb-ux .tb-actions button.sola-mini-action,
body.project-page .attachment-actions button.sola-mini-action {
 box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
 width:24px!important;min-width:24px!important;max-width:24px!important;height:24px!important;min-height:24px!important;
 padding:0!important;margin:0!important;border:1px solid #e4e8ec!important;border-radius:5px!important;
 background:#fff!important;color:#6d7986!important;font:400 13px/1 Arial,sans-serif!important;
 box-shadow:none!important;cursor:pointer;vertical-align:middle;transition:background .15s,border-color .15s,color .15s;
}
body.project-page button.sola-mini-action:hover{background:#f3f6f8!important;border-color:#c8d1d9!important;color:#263747!important}
body.project-page button.sola-mini-action.sola-mini-danger{color:#a2767a!important;border-color:#efe5e7!important}
body.project-page button.sola-mini-action.sola-mini-danger:hover{background:#fff3f3!important;border-color:#e5b8be!important;color:#ae3442!important}
body.project-page button.sola-mini-action:disabled{opacity:.3!important;cursor:default;pointer-events:none}
body.project-page button.sola-mini-action:focus-visible{outline:2px solid #5089b8;outline-offset:2px}
body.project-page .tb-ux .tb-row-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
body.project-page .tb-ux .tb-row-head>strong{font-size:13px;font-weight:600;min-width:0;overflow-wrap:anywhere}
body.project-page .tb-ux .tb-actions{display:flex;align-items:center;gap:3px;margin-left:auto}
body.project-page .attachment-actions .attachment-move{display:inline-flex;gap:3px;align-items:center}
body.project-page .attachment-actions form{margin:0}
body.project-page .image-remove-form{display:flex;justify-content:flex-end;margin-top:4px}
/* Component actions were not covered by previous patch. */
body.project-page .component-entry-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
body.project-page .component-entry-actions form{margin:0}
body.project-page .component-entry-actions .component-link-btn,
body.project-page .component-entry-actions .component-action{
 box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
 min-height:25px!important;height:25px;padding:3px 8px!important;
 border:1px solid #e2e7eb!important;border-radius:5px!important;background:#fff!important;
 color:#637181!important;font:400 11px/1.1 Arial,sans-serif!important;
 box-shadow:none!important;text-decoration:none;cursor:pointer;
}
body.project-page .component-entry-actions .component-link-btn:hover,
body.project-page .component-entry-actions .component-action:hover{background:#f3f6f8!important;border-color:#cbd4dc!important;color:#283b4d!important}
body.project-page .component-entry-actions .component-delete{color:#a2767a!important}
body.project-page .component-entry-actions .component-delete:hover{background:#fff3f3!important;color:#ae3442!important}
body.project-page .attachment-pdf-toggle button,
body.project-page .component-print .component-small-btn{min-height:25px;padding:3px 8px;font-size:11px;border-radius:5px}
@media(hover:none){body.project-page button.sola-mini-action{width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;min-height:32px!important}}
@media(max-width:600px){body.project-page .tb-ux .tb-row-head{align-items:flex-start}body.project-page .tb-ux .tb-actions{margin-left:0}}

/* V5: compact secondary actions in text blocks, image panels, attachments and components. */
body.project-page .tb-ux .tb-body > form > button,
body.project-page .tb-ux .tb-body > form button[type="submit"],
body.project-page .image-upload-form > button,
body.project-page .image-editor form:not(.image-remove-form) > button,
body.project-page .attachment-add form > button,
body.project-page .attachment-pdf-toggle button,
body.project-page .component-add form > button,
body.project-page .component-edit form > button,
body.project-page .component-print button {
  box-sizing:border-box!important;
  width:auto!important;min-width:0!important;max-width:100%!important;
  height:32px!important;min-height:32px!important;
  padding:5px 12px!important;margin:6px 0 0!important;
  border-radius:5px!important;font-size:12px!important;
  line-height:1.2!important;font-weight:600!important;
  box-shadow:none!important;
}
body.project-page .tb-ux .tb-body > form > button,
body.project-page .image-upload-form > button,
body.project-page .image-editor form:not(.image-remove-form) > button {
  background:#f5f7f9!important;border:1px solid #d7dee5!important;
  color:#34475b!important;
}
body.project-page .tb-ux .tb-body > form > button:hover,
body.project-page .image-upload-form > button:hover,
body.project-page .image-editor form:not(.image-remove-form) > button:hover {
  background:#eaf0f5!important;border-color:#b7c5d1!important;
}
body.project-page .tb-ux .tb-body > form > button:focus-visible,
body.project-page .image-editor form > button:focus-visible {outline:2px solid #5089b8;outline-offset:2px}

/* V6: consistent compact controls, including the previously oversized caption save button. */
body.project-page .images-card .image-slot-entry form button:not(.sola-mini-action),
body.project-page .tb-ux .tb-body form button:not(.sola-mini-action),
body.project-page .attachments-card form button:not(.sola-mini-action),
body.project-page .component-editor form button:not(.sola-mini-action) {
 width:auto!important;min-width:0!important;max-width:100%!important;
 height:30px!important;min-height:30px!important;padding:4px 10px!important;
 font-size:12px!important;font-weight:600!important;line-height:1.15!important;
 border-radius:5px!important;box-shadow:none!important;
 background:#f5f7f9!important;color:#34475b!important;border:1px solid #d7dee5!important;
}
body.project-page .tb-row[draggable=true],body.project-page .attachment-entry[draggable=true]{cursor:grab;touch-action:pan-y}
body.project-page .tb-row.dragging,body.project-page .attachment-entry.dragging{opacity:.45}
body.project-page .tb-row.drag-over,body.project-page .attachment-entry.drag-over{outline:2px dashed #4489bd;outline-offset:2px}

/* V7: reduce the remaining prominent save actions, without changing other primary buttons. */
body.project-page #project-form > button.primary.sticky {
  box-sizing:border-box!important; width:auto!important; min-width:0!important;
  min-height:32px!important;height:32px!important;padding:5px 13px!important;
  font-size:12px!important;line-height:1.2!important;font-weight:600!important;
  border-radius:6px!important;box-shadow:none!important;
}
body.project-page .component-print button.component-small-btn,
body.project-page .attachment-pdf-toggle button {
  box-sizing:border-box!important;width:auto!important;min-width:0!important;
  height:28px!important;min-height:28px!important;padding:4px 9px!important;
  font-size:11px!important;line-height:1.1!important;border-radius:5px!important;
  box-shadow:none!important;background:#f5f7f9!important;color:#34475b!important;
  border:1px solid #d7dee5!important;
}
body.project-page .attachment-drag-handle {
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  width:25px;height:28px;margin-right:7px;border-radius:5px;
  color:#81909d;cursor:grab;font-size:19px;line-height:1;user-select:none;
}
body.project-page .attachment-drag-handle:hover {background:#edf2f6;color:#405b72}
body.project-page .attachment-drag-handle:active {cursor:grabbing}
body.project-page .attachment-entry[draggable=true] {cursor:default}
/* V8: catalog save buttons, including the one shown in the screenshot. */
body.project-page .component-catalog form button,
body.project-page .component-add form button,
body.project-page .component-group-body .component-add button,
body.project-page .component-group-body .component-edit button,
.component-catalog-settings form button {
 box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
 width:auto!important;min-width:0!important;max-width:100%!important;
 height:28px!important;min-height:28px!important;padding:3px 9px!important;margin:5px 0!important;
 font-size:11px!important;line-height:1.1!important;font-weight:600!important;
 border-radius:5px!important;background:#f5f7f9!important;color:#34475b!important;
 border:1px solid #d7dee5!important;box-shadow:none!important;
}
.component-catalog-settings .catalog-manage-actions{display:flex;gap:8px;flex-wrap:wrap}
.component-catalog-settings .component-group-body{padding:12px}
.component-catalog-settings .catalog-manage-item{border-bottom:1px solid #e5e9ed;padding:10px 0}
.component-catalog-settings .catalog-manage-item summary{cursor:pointer;font-weight:600}

/* Standortkennzeichnung in der oberen Standortzeile mittig ausrichten. */
body.project-page #Standort .site-maps {
  align-items: center;
}
body.project-page #Standort .site-maps > .site-map-card:first-child {
  align-self: center;
}
@media (max-width: 650px) {
  body.project-page #Standort .site-maps > .site-map-card:first-child {
    justify-self: center;
    width: 100%;
  }
}

/* V11: PV field labels stay on one line at desktop widths. */
@media (min-width: 851px) {
  body.project-page .project-grid [id="PV-Anlage"] .fields > label {
    grid-template-columns: minmax(235px, 37%) minmax(0, 1fr);
    column-gap: 10px;
    font-size: 11px;
    white-space: nowrap;
    min-width: 0;
  }
  body.project-page .project-grid [id="PV-Anlage"] .fields > label > input,
  body.project-page .project-grid [id="PV-Anlage"] .fields > label > select {
    min-width: 0;
  }
}
@media (max-width: 850px) {
  body.project-page .project-grid [id="PV-Anlage"] .fields > label {
    grid-template-columns: 1fr;
    row-gap: 5px;
    white-space: normal;
  }
}

/* Teilflaechen und Simulationstabellen */
.pv-data-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:18px 0}
.pv-data-card{min-width:0}.pv-data-card .component-group{margin:10px 0}
.pv-data-card .fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.pv-data-card .fields label{display:block;font-size:13px}
.pv-data-card .fields input{width:100%;min-width:0;box-sizing:border-box}
.pv-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}
.pv-actions button{font-size:12px!important;min-height:30px!important;padding:5px 10px!important}
.pv-table-scroll{overflow:auto;max-height:510px;border:1px solid #e0e5ec;border-radius:8px}
.pv-simulation-table{border-collapse:collapse;width:max-content;min-width:100%}
.pv-simulation-table td{border:1px solid #e0e5ec;padding:3px}
.pv-simulation-table input{box-sizing:border-box;width:125px;min-width:90px;padding:5px 6px;font-size:12px;border:1px solid #d4dce5;border-radius:4px}
.pv-simulation-table td:first-child input{width:255px}
@media(max-width:1050px){.pv-data-grid{grid-template-columns:1fr}}
@media(max-width:560px){.pv-data-card .fields{grid-template-columns:1fr}}

/* V13: exact monthly/simulation reference tables */
.monthly-reference th,.simulation-reference th{text-align:left;white-space:normal;font-weight:600}
.monthly-reference td input{min-width:90px;width:100%;max-width:170px;box-sizing:border-box}
.monthly-reference th:first-child{min-width:125px}
.monthly-summary{background:#f1f3f5;font-weight:700}
.monthly-paste-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}
.monthly-paste-fields label{display:block;font-size:12px;font-weight:600}
.monthly-paste-fields textarea{width:100%;min-height:66px;box-sizing:border-box;font:12px/1.4 inherit;margin-top:6px}
.monthly-help{font-size:12px;color:#566576;margin:12px 0 4px}
.simulation-reference th:first-child{min-width:270px}
@media(max-width:720px){.monthly-paste-fields{grid-template-columns:1fr}}

.monthly-reference .monthly-20year-cell input{width:100%;max-width:none;box-sizing:border-box;text-align:right}
.monthly-20year-paste-label{display:block;font-size:12px;font-weight:600;margin:10px 0}
.monthly-20year-paste-label textarea{display:block;width:100%;max-width:360px;min-height:46px;margin-top:6px;box-sizing:border-box}

/* V15: calculated monthly share column */
.monthly-reference .monthly-percent{min-width:100px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;padding:8px 10px;color:#35475b;background:#f8fafc}
.monthly-reference .monthly-summary .monthly-percent{font-weight:700;background:#f1f3f5}
