/* =========================================================
   DROHNEN-FRONTEND – FEUERWEHR NORDEN LOOK
   ========================================================= */

/* Farben grob an feuerwehr-norden.de angelehnt */
:root {
    --ffn-rot: #c00021;
    --ffn-rot-dunkel: #900018;
    --ffn-grau-hell: #f5f5f5;
    --ffn-grau-mittel: #dddddd;
    --ffn-text: #222222;
}

/* Gesamter Wrapper */
.ffn-drohnen-form {
    max-width: 1100px;
    margin: 30px auto;
    padding: 20px 24px 30px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    color: var(--ffn-text);
    font-size: 14px;
}

/* Absätze & Labels */
.ffn-drohnen-form p {
    margin-bottom: 12px;
}

.ffn-drohnen-form label {
    font-weight: 500;
}

/* Überschriften im Formular */
.ffn-drohnen-form h2,
.ffn-drohnen-form h3 {
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--ffn-rot);
}

.ffn-drohnen-form h2 {
    font-size: 22px;
    border-bottom: 2px solid var(--ffn-rot);
    padding-bottom: 6px;
    margin-bottom: 16px;
}

.ffn-drohnen-form h3 {
    font-size: 18px;
    margin-top: 25px;
}

/* kleine Statuszeile: "Schritt X von 3" */
.ffn-drohnen-form p strong {
    font-weight: 600;
}

/* Erfolgs- und Fehlermeldungen */
.ffn-drohnen-success {
    border-left: 4px solid #3ab74a;
    background: #ecf9ee;
    padding: 10px 12px;
    margin-bottom: 18px;
}

.ffn-drohnen-error {
    border-left: 4px solid #d63638;
    background: #fdeaea;
    padding: 10px 12px;
    margin-bottom: 18px;
}

/* Kopfinfo-Banner über Checkliste / Logbuch */
.ffn-kopfinfo {
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Input-Felder */
.ffn-drohnen-form input[type="text"],
.ffn-drohnen-form input[type="datetime-local"],
.ffn-drohnen-form select,
.ffn-drohnen-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #cccccc;
    border-radius: 2px;
    padding: 6px 8px;
    font-size: 13px;
    box-shadow: none;
}

.ffn-drohnen-form textarea {
    min-height: 70px;
}

.ffn-drohnen-form input:focus,
.ffn-drohnen-form select:focus,
.ffn-drohnen-form textarea:focus {
    outline: none;
    border-color: var(--ffn-rot);
    box-shadow: 0 0 0 1px rgba(192,0,33,0.15);
}

/* Checkbox allgemein im Formular */
.ffn-drohnen-form label input[type="checkbox"] {
    margin-right: 5px;
}

/* Primär-Buttons (Speichern / Weiter) */
.ffn-drohnen-form .button.button-primary {
    background: var(--ffn-rot);
    border-color: var(--ffn-rot);
    color: #ffffff;
    padding: 8px 16px;
    font-weight: 600;
    text-transform: none;
}

.ffn-drohnen-form .button.button-primary:hover,
.ffn-drohnen-form .button.button-primary:focus {
    background: var(--ffn-rot-dunkel);
    border-color: var(--ffn-rot-dunkel);
    color: #ffffff;
}

/* Sekundäre Buttons */
.ffn-drohnen-form .button {
    border-radius: 2px;
}

/* Plus-Button (Logbuch-Eintrag hinzufügen / ggf. Checkliste) */
.ffn-drohnen-form #ffn_add_bes_row_front,
.ffn-drohnen-form #ffn_add_checklist_row {
    background: #ffffff;
    border-color: var(--ffn-rot);
    color: var(--ffn-rot);
}

.ffn-drohnen-form #ffn_add_bes_row_front:hover,
.ffn-drohnen-form #ffn_add_checklist_row:hover {
    background: var(--ffn-rot);
    color: #ffffff;
}

/* Minus-Button (Zeile entfernen) */
.ffn-drohnen-form .ffn-remove-row {
    background: #ffffff;
    border-color: #cccccc;
    color: #444444;
    width: 28px;
    height: 28px;
    text-align: center;
    padding: 0;
    line-height: 26px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
}

.ffn-drohnen-form .ffn-remove-row:hover {
    background: #ffecec;
    border-color: #d63638;
    color: #d63638;
}

/* =========================================================
   Tabellen (Checkliste / Logbuch / Meine Flüge)
   ========================================================= */

.ffn-drohnen-form table.widefat {
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 18px;
    font-size: 13px;
}

.ffn-drohnen-form table.widefat thead th {
    background: var(--ffn-grau-hell);
    border-bottom: 2px solid var(--ffn-grau-mittel);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
}

.ffn-drohnen-form table.widefat tbody td {
    border-bottom: 1px solid #ececec;
    padding: 6px 8px;
    vertical-align: middle;
}

.ffn-drohnen-form table.widefat tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Inputs in Tabellen */
.ffn-drohnen-form table.widefat input[type="text"],
.ffn-drohnen-form table.widefat input[type="datetime-local"],
.ffn-drohnen-form table.widefat select,
.ffn-drohnen-form table.widefat textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Logbuch-Tabelle im Wizard – etwas mehr Luft */
#ffn_besonderheiten_table_front tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

#ffn_besonderheiten_table_front tbody tr:last-child {
    border-bottom: none;
}

#ffn_besonderheiten_table_front tbody td {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Abstand über dem "Logbuch-Eintrag hinzufügen"-Button */
#ffn_add_bes_row_front {
    margin-top: 8px;
}

/* =========================================================
   Bereich "Meine Flüge"
   ========================================================= */

.ffn-myflights-wrapper {
    margin-bottom: 30px;
}

.ffn-myflights-wrapper h2 {
    margin-top: 0;
}

.ffn-myflights-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.4;
}

/* optionale Statusfarben */
.ffn-status-offen {
    background: #fff7e0;
    color: #8a5a00;
}

.ffn-status-checkliste_ok {
    background: #e7f7ea;
    color: #1f6b2c;
}

.ffn-status-geschlossen {
    background: #ececec;
    color: #555555;
}

/* Tabelle „Meine Flüge“ */
.ffn-meine-fluege-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

.ffn-meine-fluege-table th,
.ffn-meine-fluege-table td {
    padding: 8px 10px;
}

.ffn-meine-fluege-table thead th {
    background: #f5f5f5;
    font-weight: 600;
}

.ffn-meine-fluege-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.ffn-meine-fluege-title {
    font-weight: 600;
}

.ffn-meine-fluege-id {
    font-size: 0.8rem;
    color: #888;
}

/* kleine Aktion-Buttons in der Übersicht */
.ffn-btn-small {
    font-size: 0.85rem;
    line-height: 1;
    padding: 4px 10px;
}

/* Status-Badges (falls du sie nutzt) */
.ffn-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ffn-status-open {
    background: #fff3cd;
    color: #856404;
}

.ffn-status-checkliste {
    background: #e0f7fa;
    color: #006064;
}

.ffn-status-closed {
    background: #e8f5e9;
    color: #2e7d32;
}

/* =========================================================
   Abschlussbereich bei Schritt 3 – "Flug endgültig abschließen"
   ========================================================= */

.ffn-logbuch-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dddddd;
    gap: 16px;
    flex-wrap: wrap;
}

.ffn-logbuch-actions .ffn-left {
    font-size: 13px;
}

/* Hervorhebung "Flug endgültig abschließen" */
.ffn-logbuch-actions .ffn-left label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #f5c2c7;
    background: #fef2f2;
    color: #842029;
    font-weight: 500;
}

.ffn-logbuch-actions .ffn-left input[type="checkbox"] {
    margin: 0;
}

.ffn-logbuch-actions .ffn-left label:hover {
    background: #fddede;
    border-color: #f1aeb5;
}

/* rechter Bereich = Speichern-Button */
.ffn-logbuch-actions .ffn-right {
    margin-left: auto;
}

/* =========================================================
   Mobile-Optimierung
   ========================================================= */

@media (max-width: 768px) {

    .ffn-drohnen-form {
        padding: 16px 14px 22px;
        margin: 15px 0;
        font-size: 13px;
    }

    .ffn-drohnen-form h2 {
        font-size: 18px;
    }

    .ffn-drohnen-form h3 {
        font-size: 16px;
    }

    .ffn-drohnen-form input[type="text"],
    .ffn-drohnen-form input[type="datetime-local"],
    .ffn-drohnen-form select,
    .ffn-drohnen-form textarea {
        font-size: 13px;
        padding: 5px 7px;
    }

    .ffn-logbuch-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ffn-logbuch-actions .ffn-right {
        width: 100%;
        text-align: right;
        margin-left: 0;
    }

    .ffn-logbuch-actions .ffn-right .button-primary {
        width: auto;
    }

    /* Responsive "Meine Flüge" – Karten-Layout */
    .ffn-meine-fluege-table thead {
        display: none;
    }

    .ffn-meine-fluege-table,
    .ffn-meine-fluege-table tbody,
    .ffn-meine-fluege-table tr,
    .ffn-meine-fluege-table td {
        display: block;
        width: 100%;
    }

    .ffn-meine-fluege-table tbody tr {
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        padding: 8px 10px;
        margin-bottom: 10px;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }

    .ffn-meine-fluege-table tbody td {
        padding: 4px 0;
        border: none;
        display: flex;
        justify-content: space-between;
        gap: 8px;
        font-size: 13px;
    }

    .ffn-meine-fluege-table tbody td::before {
        margin-right: 6px;
        color: #555;
        font-weight: 600;
    }

    .ffn-meine-fluege-table tbody td:nth-child(1)::before {
        content: "Flug:";
    }

    .ffn-meine-fluege-table tbody td:nth-child(2)::before {
        content: "Beginn:";
    }

    .ffn-meine-fluege-table tbody td:nth-child(3)::before {
        content: "Status:";
    }

    .ffn-meine-fluege-table tbody td:nth-child(4)::before {
        content: "Aktion:";
    }
} 