/* AI Content Processor — FiBL-inspired design foundation
   Version 0.1 | 15 October 2026
   Source: FiBL website main.css. Independent stylesheet, not a copy.
   Integration note: existing template <style> blocks may override these rules.
*/
:root {
  --fibl-blue: #2f6c86;
  --fibl-blue-hover: #377e9d;
  --fibl-blue-light: #e8f6ff;
  --fibl-yellow: #ffc032;
  --fibl-text: #26323a;
  --fibl-muted: #707070;
  --fibl-border: #dce5e9;
  --fibl-background: #f7f9fa;
  --fibl-surface: #ffffff;
  --fibl-danger: #b42318;
  --fibl-success: #276749;
  --fibl-radius: 6px;
  --fibl-font: 'Jost', Arial, Helvetica, sans-serif;
}

/* Typography and page foundation */
body { background: var(--fibl-background); color: var(--fibl-text); font-family: var(--fibl-font); line-height: 1.5; }
h1, h2, h3, h4 { color: var(--fibl-blue); line-height: 1.25; }
a { color: var(--fibl-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--fibl-yellow); outline-offset: 2px; }
/* ==================================================
   Page layout and existing project components
   ================================================== */

body {
  max-width: 1100px;
  margin: 45px auto;
  padding: 0 24px;
  box-sizing: border-box;
  line-height: 1.6;
}

.panel {
  background: var(--fibl-blue-light);
  padding: 28px;
  margin: 28px 0;
  border-radius: 8px;
}

input,
textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin: 8px 0 16px;
  border: 1px solid #b9c8d0;
  border-radius: var(--fibl-radius);
  font: inherit;
}

button {
  background: var(--fibl-blue);
  color: #fff;
  border: 0;
  padding: 11px 20px;
  border-radius: var(--fibl-radius);
  font: inherit;
  cursor: pointer;
}

button:hover {
  background: var(--fibl-blue-hover);
}

.project {
  border-bottom: 1px solid var(--fibl-border);
  padding: 18px 0;
}
/* Opt-in shared components: apply classes as templates are migrated. */
.app-header { background: var(--fibl-blue); color: #fff; }
.app-header h1, .app-header h2, .app-header a { color: #fff; }
.app-header a:hover { color: var(--fibl-yellow); }
.app-main { width: min(100% - 2rem, 1320px); margin-inline: auto; }
.app-panel { background: var(--fibl-surface); border: 1px solid var(--fibl-border); border-radius: var(--fibl-radius); padding: 1.25rem; }
.app-panel--info { background: var(--fibl-blue-light); border-color: transparent; }
.app-muted { color: var(--fibl-muted); }

.app-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem 1rem; border: 1px solid transparent; border-radius: var(--fibl-radius); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.app-btn:hover { text-decoration: none; }
.app-btn:disabled { opacity: .55; cursor: not-allowed; }
.app-btn--primary { background: var(--fibl-blue); color: #fff; }
.app-btn--primary:hover { background: var(--fibl-blue-hover); color: #fff; }
.app-btn--accent { background: var(--fibl-yellow); color: #26323a; }
.app-btn--accent:hover { background: #edaf1e; color: #26323a; }
.app-btn--secondary { background: #fff; color: var(--fibl-blue); border-color: var(--fibl-blue); }
.app-btn--secondary:hover { background: var(--fibl-blue-light); }

.app-field { display: block; width: 100%; max-width: 100%; box-sizing: border-box; padding: .65rem .75rem; border: 1px solid #b9c8d0; border-radius: var(--fibl-radius); background: #fff; color: var(--fibl-text); font: inherit; }
.app-field:focus { outline: 2px solid var(--fibl-blue); outline-offset: 1px; }
.app-label { display: block; margin-bottom: .35rem; font-weight: 600; }
.app-table { width: 100%; border-collapse: collapse; background: #fff; }
.app-table th, .app-table td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--fibl-border); vertical-align: top; }
.app-table thead { background: var(--fibl-blue-light); }
.app-table th { color: var(--fibl-blue); font-weight: 600; }
.app-table tbody tr:hover { background: #f8fbfd; }
.app-status { display: inline-block; padding: .2rem .55rem; border-radius: 4px; font-size: .875rem; font-weight: 600; background: var(--fibl-blue-light); color: var(--fibl-blue); }
.app-status--success { background: #e6f4eb; color: var(--fibl-success); }
.app-status--warning { background: #fff5d6; color: #795300; }
.app-status--error { background: #fce8e6; color: var(--fibl-danger); }

@media (max-width: 700px) {
  .app-main { width: min(100% - 1rem, 1320px); }
  .app-panel { padding: .9rem; }
  .app-table-wrap { overflow-x: auto; }
}
/* Systemmeldungen */

.message {
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: var(--fibl-radius);
}

.message.success {
  background: #e6f4eb;
  color: var(--fibl-success);
}

.message.error {
  background: #fce8e6;
  color: var(--fibl-danger);
}
/* ==================================================
   Dokumentanalyse
   ================================================== */

.analysis-page .summary {
  background: var(--fibl-blue-light);
  padding: 22px;
  margin: 25px 0;
  border-radius: var(--fibl-radius);
}

.analysis-page .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.analysis-page .stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--fibl-blue);
}

.analysis-page .slide {
  padding: 25px 0;
  border-bottom: 1px solid var(--fibl-border);
}

.analysis-page .slide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.analysis-page .meta {
  color: var(--fibl-muted);
  font-size: 0.9rem;
}

.analysis-page .speaker-text {
  white-space: pre-wrap;
  line-height: 1.75;
  margin-top: 18px;
}

.analysis-page .empty {
  color: var(--fibl-muted);
}

.analysis-page .warning {
  color: #8a651f;
  font-size: 0.9rem;
}

.analysis-page details {
  margin-top: 10px;
}

.analysis-page summary {
  cursor: pointer;
  color: var(--fibl-blue);
  font-weight: 600;
}

.analysis-page a {
  font-weight: 600;
}
/* ==================================================
   Batch-Verarbeitung
   ================================================== */

.batch-page .detail {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 8px 18px;
}

.batch-page .detail strong {
  font-weight: 600;
}

.batch-page .button {
  display: inline-block;
  background: var(--fibl-blue);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--fibl-radius);
  text-decoration: none;
}

.batch-page .button:hover {
  background: var(--fibl-blue-hover);
  text-decoration: none;
}

.batch-page .button.disabled {
  background: #aab5af;
  cursor: not-allowed;
}

.batch-page .hint {
  color: var(--fibl-muted);
}

@media (max-width: 600px) {
  .batch-page .detail {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
/* Phase 4 – Freigegebene Sprechertexte */
.phase4-heading {
    color: #75AF41;
}
/* Phase 4 – kompakte Präsentationsauswahl */

.phase4-options {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 1.25rem 0 1.5rem;
}

.phase4-option {
    display: flex !important;
    align-items: flex-start;
    gap: 0.85rem;
    margin: 0;
    cursor: pointer;
}

.phase4-option input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px;
    margin: 0.2rem 0 0 !important;
    padding: 0 !important;
    accent-color: #75AF41;
}

.phase4-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    line-height: 1.5;
}

.phase4-option-text strong {
    font-weight: 600;
}

.phase4-option-text > span {
    color: #59636b;
}
/* Phase 4 – gespeicherte Präsentationsfassungen */

.phase4-presentation-status {
    margin: 1.5rem 0 2rem;
}

.phase4-presentation-status h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.phase4-presentation-version {
    border-left: 3px solid #75AF41;
    padding: 0.5rem 0 0.5rem 1rem;
    margin-bottom: 1rem;
}

.phase4-presentation-version p {
    margin: 0.4rem 0 0;
    color: #59636b;
    font-size: 0.95rem;
}
/* Phase 4 – Gespeicherte Word-Prüfstände */

.phase4-review-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
/* Spaltenbreiten der Word-Prüfstände */
.phase4-review-table th:nth-child(1) {
  width: 27%;
}

.phase4-review-table th:nth-child(2) {
  width: 21%;
}

.phase4-review-table th:nth-child(3) {
  width: 8%;
}

.phase4-review-table th:nth-child(4) {
  width: 18%;
}

.phase4-review-table th:nth-child(5) {
  width: 26%;
}
.phase4-review-table thead,
.app-table.phase4-review-table thead {
  background: transparent;
}

.phase4-review-table th,
.app-table.phase4-review-table th {
  padding: 0.75rem;
  background: #edf5e7;
  color: #35434a;
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid #75AF41;
}

.phase4-review-table td {
  padding: 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid #dce2e5;
  overflow-wrap: anywhere;
}

.phase4-review-table tbody tr:hover,
.app-table.phase4-review-table tbody tr:hover {
  background: #f6f9f4;
}

.phase4-review-table .phase4-review-id {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #68757c;
  overflow-wrap: anywhere;
}

.phase4-review-table .phase4-review-status {
  color: #527d32;
}


/* Phase 4.3 – Folienzuordnung */

.phase4-mapping-table {
    table-layout: fixed;
    width: 100%;
}

.phase4-mapping-table th:nth-child(1),
.phase4-mapping-table td:nth-child(1) {
    width: 9%;
}

.phase4-mapping-table th:nth-child(2),
.phase4-mapping-table td:nth-child(2) {
    width: 53%;
}

.phase4-mapping-table th:nth-child(3),
.phase4-mapping-table td:nth-child(3) {
    width: 12%;
}

.phase4-mapping-table th:nth-child(4),
.phase4-mapping-table td:nth-child(4) {
    width: 26%;
}



/* Phase 4.3 – Auswahl der Word-Folien */

.phase4-mapping-select {
    width: 100%;
    max-width: 100%;
    padding: 0.55rem;
    border: 1px solid #b8c7b5;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    font: inherit;
    box-sizing: border-box;
}

.phase4-mapping-select:focus {
    outline: 2px solid #75AF41;
    outline-offset: 1px;
}



/* Phase 4.3 – Entwurf speichern */

.phase4-mapping-save-button {
    padding: 0.7rem 1.2rem;
    background: #75AF41;
    color: #fff;
    border: 0;
    border-radius: 4px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.phase4-mapping-save-button:hover {
    background: #5e9633;
}
