/**
 * rechnungen.css  v1.0
 * CS Aviation – Rechnungssystem
 * Setzt abrechnungssystem.css (res-abr-*) voraus.
 */

/* ══ RECHNUNGSÜBERSICHT ═══════════════════════════════════════════════════════ */

/* Filter-Bereich */
#res-rech-wrap .res-abr-field label {
    font-size: 0.71rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-60);
    display: block;
    margin-bottom: 4px;
}

/* Tabellen-Zeile hover: linke Akzentlinie */
#res-rech-tabelle .res-abr-tbl tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--blue-deep);
}

/* Rechnungsnummer */
.res-rech-nr {
    font-family: var(--font-mono, 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace);
    font-size: 11px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.06em;
}

/* Bezahlt-Datum Inline-Input */
.res-rech-bezahlt-input:focus {
    outline: none;
    border-color: var(--blue-deep) !important;
    box-shadow: 0 0 0 4px rgba(31,108,178,0.15);
    background: #fff !important;
}

/* PDF-Download-Link */
.res-rech-pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--edge);
    border-radius: var(--r-btn);
    background: var(--glass-strong);
    color: var(--ink-60);
    text-decoration: none;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.res-rech-pdf-link:hover {
    background: var(--dsky-accent);
    border-color: transparent;
    color: #fff;
}

/* ══ ZAHLUNGSLAUF-MODAL ═══════════════════════════════════════════════════════ */

#res-zl-body .res-abr-tbl tbody tr td:first-child { font-weight: 600; }

/* Summenzeile im Editor */
#res-editor-summen,
#res-ind-summen {
    padding: 10px 14px;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(15,37,68,0.08);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

/* Positions-Tabelle im Editor */
#res-editor-pos-tbody input,
#res-ind-pos-tbody input {
    font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif) !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}
#res-editor-pos-tbody input:focus,
#res-ind-pos-tbody input:focus {
    outline: none !important;
    border-color: var(--blue-deep) !important;
    box-shadow: 0 0 0 4px rgba(31,108,178,0.15) !important;
    background: #fff !important;
}

/* ══ EINSTELLUNGEN ════════════════════════════════════════════════════════════ */

#res-rech-einst-wrap .res-abr-field textarea {
    font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 13px;
    line-height: 1.55;
}

#res-einst-logo-preview {
    border: 1px solid var(--edge);
    border-radius: 6px;
    padding: 4px;
    background: rgba(255,255,255,0.5);
}

/* ══ RECHNUNG (DRUCKANSICHT) ══════════════════════════════════════════════════
   Diese Styles werden direkt in res_rech_render_html() eingebettet (Inline).
   Sie sind hier nur zur Dokumentation — nicht für die WP-Seite selbst.
   ════════════════════════════════════════════════════════════════════════════ */

/* ══ RESPONSIVE ═══════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
    /* Filter vertikal */
    #res-rech-wrap .res-abr-card-body > div[style*="display:flex"] {
        flex-direction: column !important;
    }

    /* Tabellen-Spalten reduzieren */
    #res-rech-tabelle .res-abr-tbl th:nth-child(3),
    #res-rech-tabelle .res-abr-tbl td:nth-child(3) { display: none; } /* Betrag */

    /* Editor-Positionen: Einheit-Spalte ausblenden */
    #res-editor-pos-tbody td:nth-child(3),
    #res-ind-pos-tbody td:nth-child(3),
    #res-editor-positionen thead th:nth-child(3),
    #res-ind-positionen thead th:nth-child(3) { display: none; }
}

/* Lösch-Dialog: Flugliste max-height + interner Scroll */
.res-rech-del-fluege {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid rgba(15,37,68,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.5);
}
.res-rech-del-fluege table { margin: 0; }

/* Bulk-Bar in der Übersicht */
#res-rech-bulk-bar { transition: opacity .15s; }
