/**
 * Scribigo Modes List Styles
 * 
 * Styles für die Liste aller AI-Modi
 */

.scribigo-modes-container {
    margin: 20px 0;
    overflow-x: auto;
}

/* Tabellen-Styling */
.scribigo-modes-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
    table-layout: auto !important;
}

/* Alle DataTables Wrapper ohne Rahmen */
.scribigo-modes-table.dataTable,
.scribigo-modes-table.dataTable thead,
.scribigo-modes-table.dataTable tbody,
.scribigo-modes-table.dataTable tr,
.scribigo-modes-table.dataTable th,
.scribigo-modes-table.dataTable td {
    border: none !important;
    box-shadow: none !important;
}

/* Icon-Spalte */
.icon-column {
    text-align: center;
    vertical-align: middle;
    width: 50px !important;
    min-width: 50px !important;
}

/* Spaltenbreiten für Desktop */
.mode-name-column {
    max-width: 550px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

.description-column {
    min-width: 250px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

.category-column {
    width: 350px !important;
    max-width: 350px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

.target-column {
    width: 200px !important;
    max-width: 200px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

.action-column {
    width: 120px !important;
    min-width: 120px !important;
    text-align: center;
    white-space: nowrap;
}

/* Aufgabe-Spalte */
.mode-name-column {
    font-size: 16px;
}

.mode-name-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    display: inline;
}

.mode-name-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Beschreibung */
.mode-description {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* Bereich Badge */
.category-badge-link {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e8f4f8;
    color: #2c3e50;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #d0e8f0;
    text-decoration: none !important;
    transition: all 0.2s ease;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 350px;
}

.category-badge-link:hover {
    background-color: #d0e8f0;
    border-color: #b8dce8;
    color: #1a4d5c;
    text-decoration: none !important;
}

.category-badge-link i {
    margin-right: 4px;
}

/* Ziel Badge - Basis */
.main-choice-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none !important;
    border: 1px solid;
    transition: all 0.2s ease;
    font-weight: 500;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 200px;
}

.main-choice-badge:hover {
    text-decoration: none !important;
    opacity: 0.85;
    transform: translateY(-1px);
}

/* Ziel Badge - Farbvarianten */
/* Analysieren - Blau */
.main-choice-badge[href*="targetMainChoice=analyze"] {
    background-color: #e3f2fd;
    color: #1565c0;
    border-color: #90caf9;
}

.main-choice-badge[href*="targetMainChoice=analyze"]:hover {
    background-color: #bbdefb;
    border-color: #64b5f6;
}

/* Überarbeiten / korrigieren - Lila */
.main-choice-badge[href*="targetMainChoice=improve"] {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border-color: #ce93d8;
}

.main-choice-badge[href*="targetMainChoice=improve"]:hover {
    background-color: #e1bee7;
    border-color: #ba68c8;
}

/* Übersetzen - Türkis */
.main-choice-badge[href*="targetMainChoice=translate"] {
    background-color: #e0f2f1;
    color: #00796b;
    border-color: #80cbc4;
}

.main-choice-badge[href*="targetMainChoice=translate"]:hover {
    background-color: #b2dfdb;
    border-color: #4db6ac;
}

/* Erstellen - Orange */
.main-choice-badge[href*="targetMainChoice=extras"] {
    background-color: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}

.main-choice-badge[href*="targetMainChoice=extras"]:hover {
    background-color: #ffe0b2;
    border-color: #ffb74d;
}

/* Layout / Struktur - Indigo */
.main-choice-badge[href*="targetMainChoice=layout"] {
    background-color: #eef2ff;
    color: #3730a3;
    border-color: #a5b4fc;
}

.main-choice-badge[href*="targetMainChoice=layout"]:hover {
    background-color: #e0e7ff;
    border-color: #818cf8;
}

/* Kreatives Schreiben - Rose */
.main-choice-badge[href*="targetMainChoice=create"] {
    background-color: #fff1f2;
    color: #be123c;
    border-color: #fda4af;
}

.main-choice-badge[href*="targetMainChoice=create"]:hover {
    background-color: #ffe4e6;
    border-color: #fb7185;
}

/* Action Button */
.mode-action-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: white !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mode-action-btn:hover {
    background-color: #005a87;
    color: white !important;
    transform: translateX(2px);
}

.mode-action-btn i {
    margin-left: 6px;
}

/* Kosten-Spalte */
.costs-column {
    white-space: nowrap;
}

.costs-badge {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    font-size: 13px;
    color: #374151;
}

.costs-badge.costs-free {
    color: #16a34a;
    font-weight: 600;
}

.costs-factor {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.costs-fixed {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* Zeilen haben keinen Hover-Effekt mehr, da nicht mehr anklickbar */

/* Filter-Bereich */
.scribigo-modes-filters input[type="text"] {
    font-size: 14px;
    padding: 8px 12px !important;
}

.scribigo-modes-filters input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* DataTables Overrides */
.scribigo-modes-table.dataTable thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #e9ecef !important;
    padding: 14px 10px;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.scribigo-modes-table.dataTable tbody td {
    padding: 14px 10px;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.scribigo-modes-table.dataTable tbody tr {
    border-bottom: 1px solid #f5f5f5 !important;
    border-left: none !important;
    border-right: none !important;
}

.scribigo-modes-table.dataTable tbody tr:last-child {
    border-bottom: none !important;
}

/* Responsive Anpassungen - Tabelle bleibt immer vollständig sichtbar */
@media screen and (max-width: 1200px) {
    /* Kleinere Bildschirme: Kleinere Schrift */
    .scribigo-modes-table.dataTable thead th {
        padding: 10px 6px;
        font-size: 13px;
    }
    
    .scribigo-modes-table.dataTable tbody td {
        padding: 10px 6px;
        font-size: 13px;
    }
    
    .mode-name-column {
        font-size: 14px;
    }
    
    .mode-description {
        font-size: 12px;
    }
    
    .category-badge-link,
    .main-choice-badge {
        font-size: 11px;
        padding: 3px 6px;
        word-wrap: break-word;
        white-space: normal;
        display: inline-block;
    }
    
    .mode-action-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .icon-column i {
        font-size: 18px !important;
    }
}

@media screen and (max-width: 1024px) {
    /* Tablet: Noch kleinere Schrift und kompakteres Layout */
    .scribigo-modes-table.dataTable thead th {
        padding: 8px 4px;
        font-size: 11px;
    }
    
    .scribigo-modes-table.dataTable tbody td {
        padding: 8px 4px;
        font-size: 11px;
    }
    
    .mode-name-column {
        font-size: 12px;
        width: 18% !important;
    }
    
    .description-column {
        font-size: 11px;
        width: 32% !important;
    }
    
    .category-column {
        width: 14% !important;
    }
    
    .target-column {
        width: 14% !important;
    }
    
    .action-column {
        width: 100px !important;
        min-width: 100px !important;
    }
    
    .category-badge-link,
    .main-choice-badge {
        font-size: 10px;
        padding: 2px 5px;
    }
    
    .mode-action-btn {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .mode-action-btn i {
        margin-left: 3px;
        font-size: 9px;
    }
    
    .icon-column {
        width: 40px !important;
        min-width: 40px !important;
    }
    
    .icon-column i {
        font-size: 16px !important;
    }
}

@media screen and (max-width: 768px) {
    /* Mobile: Card-ähnliches Layout - jede Zeile wird zu einem Block */
    .scribigo-modes-table {
        min-width: 100% !important;
        table-layout: auto !important;
        width: 100% !important;
    }
    
    .scribigo-modes-container {
        overflow-x: visible !important;
        width: 100%;
        max-width: 100%;
    }
    
    /* Thead ausblenden, Labels per CSS einblenden */
    .scribigo-modes-table.dataTable thead {
        display: none;
    }
    
    .scribigo-modes-table.dataTable tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e9ecef !important;
        border-radius: 8px;
        padding: 12px;
        background: #fff;
        width: 100%;
        box-sizing: border-box;
    }
    
    .scribigo-modes-table.dataTable tbody td {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px 5px !important;
        border: none !important;
        text-align: left !important;
        position: relative;
        padding-left: 120px !important;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Label vor jedem Feld */
    .scribigo-modes-table.dataTable tbody td:before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        font-weight: 600;
        color: #666;
        font-size: 11px;
        text-transform: uppercase;
        width: 100px;
        white-space: normal;
    }
    
    /* Icon Spalte */
    .icon-column {
        text-align: center !important;
        padding-left: 0 !important;
        width: 100% !important;
    }
    
    .icon-column:before {
        display: none;
    }
    
    .icon-column i {
        font-size: 32px !important;
        margin: 10px 0;
    }
    
    /* Aufgabe prominent */
    .mode-name-column {
        font-size: 16px !important;
        font-weight: 600;
        width: 100% !important;
    }
    
    .mode-name-column:before {
        content: "Aufgabe:";
    }
    
    .mode-name-link {
        display: inline-block;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Beschreibung */
    .description-column {
        width: 100% !important;
    }
    
    .description-column:before {
        content: "Beschreibung:";
    }
    
    .mode-description {
        font-size: 13px;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
    
    /* Bereich */
    .category-column {
        width: 100% !important;
    }
    
    .category-column:before {
        content: "Bereich:";
    }
    
    /* Ziel */
    .target-column {
        width: 100% !important;
    }
    
    .target-column:before {
        content: "Ziel:";
    }
    
    /* Badges */
    .category-badge-link,
    .main-choice-badge {
        font-size: 12px;
        padding: 5px 10px;
        display: inline-block;
        word-wrap: break-word;
        white-space: normal;
    }
    
    /* Aktion */
    .action-column {
        text-align: center !important;
        padding-left: 0 !important;
        padding-top: 15px !important;
        width: 100% !important;
    }
    
    .action-column:before {
        display: none;
    }
    
    .mode-action-btn {
        padding: 12px 24px;
        font-size: 14px;
        display: inline-block;
        width: auto;
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    /* Sehr kleines Mobile - noch kompakteres Card-Layout */
    .scribigo-modes-filters {
        padding: 8px !important;
    }
    
    .scribigo-modes-table.dataTable tbody tr {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .scribigo-modes-table.dataTable tbody td {
        padding: 6px 5px !important;
        padding-left: 105px !important;
        font-size: 12px;
    }
    
    .scribigo-modes-table.dataTable tbody td:before {
        font-size: 10px;
        left: 10px;
        width: 90px;
    }
    
    .icon-column i {
        font-size: 28px !important;
        margin: 8px 0;
    }
    
    .mode-name-column {
        font-size: 14px !important;
    }
    
    .mode-description {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .category-badge-link,
    .main-choice-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .category-badge-link i,
    .main-choice-badge i {
        display: none; /* Icons in Badges ausblenden */
    }
    
    .mode-action-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Action-Spalte zentrieren */
.action-column {
    text-align: center;
}

/* Sicherstellen, dass Icons nicht umbrechen */
.scribigo-modes-table i.fas {
    display: inline-block;
}

/* Zebra-Streifen für bessere Lesbarkeit */
.scribigo-modes-table.dataTable tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Sortier-Icons Styling */
.scribigo-modes-table.dataTable thead .sorting,
.scribigo-modes-table.dataTable thead .sorting_asc,
.scribigo-modes-table.dataTable thead .sorting_desc {
    cursor: pointer;
}

/* Leere Tabelle Nachricht */
.dataTables_empty {
    padding: 30px !important;
    text-align: center;
    color: #666;
    font-style: italic;
}
