/**
 * AI Dashboard - Berichts-Einstellungen CSS
 * Ergänzung zu dashboard.css
 * Version: 1.0.0
 */

/* === SETTINGS GRID - 50/50 SPLIT === */
.ai-dashboard__settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* GEÄNDERT: Feste 50/50 Aufteilung */
    gap: 2rem;
    margin-top: 1.5rem;
}

/* === REPORTS BOX === */
.ai-dashboard__settings-box--reports {
    border-left: 4px solid var(--ai-success);
}

/* === BUTTON GROUP IN REPORTS BOX === */
.ai-dashboard__settings-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.ai-dashboard__settings-buttons .ai-dashboard__btn {
    flex: 1 1 auto;
    min-width: 150px;
    max-width: 24%;
    justify-content: center;
    padding: 0.65rem 0.5rem;
    font-size: 0.875rem;
}

.ai-dashboard__settings-buttons .ai-dashboard__btn-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.4rem;
}

/* === E-MAIL BUTTON GLEICHE HÖHE === */
.ai-dashboard__settings-box--email .ai-dashboard__btn {
    padding: 0.65rem 0.5rem;
    font-size: 0.875rem;
}

/* === LARGE MODAL FOR REPORTS === */
.ai-dashboard__modal--large {
    max-width: 900px;
    width: 90%;
}

.ai-dashboard__modal--large .ai-dashboard__modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* === REPORT FORM GRID (2 Spalten) === */
.ai-dashboard__report-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* === CHECKBOXEN SPALTE === */
.ai-dashboard__report-form-checks {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-dashboard__report-form-checks h4 {
    color: var(--ai-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* === CHECKBOX LABELS === */
.ai-dashboard__checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-dashboard__checkbox-label:hover {
    border-color: var(--ai-primary);
    background: #f8f9fa;
}

.ai-dashboard__checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--ai-primary);
}

.ai-dashboard__checkbox-label input[type="checkbox"]:checked {
    background: var(--ai-primary);
}

.ai-dashboard__checkbox-label span {
    flex: 1;
    font-size: 0.95rem;
    color: #1f2937;
}

.ai-dashboard__checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--ai-primary);
}

/* === FREITEXT SPALTE === */
.ai-dashboard__report-form-notes {
    display: flex;
    flex-direction: column;
}

.ai-dashboard__report-form-notes h4 {
    color: var(--ai-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.ai-dashboard__report-form-notes .ai-dashboard__form-textarea {
    flex: 1;
    min-height: 300px;
    resize: vertical;
}

/* === FORM HINTS === */
.ai-dashboard__form-hint {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

/* === BUTTON ICONS === */
.ai-dashboard__btn-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    /* Settings Grid: 2 Spalten â†’ 1 Spalte */
    .ai-dashboard__settings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Report Form: 2 Spalten â†’ 1 Spalte */
    .ai-dashboard__report-form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Modal verkleinern */
    .ai-dashboard__modal--large {
        width: 95%;
        max-height: 90vh;
    }
    
    /* Checkbox Labels kompakter */
    .ai-dashboard__checkbox-label {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Textarea kürzer auf Mobile */
    .ai-dashboard__report-form-notes .ai-dashboard__form-textarea {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    /* Buttons in Report Box: Stack vertikal */
    .ai-dashboard__settings-buttons {
        gap: 0.5rem;
    }
    
    .ai-dashboard__settings-buttons .ai-dashboard__btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .ai-dashboard__btn-icon {
        width: 18px;
        height: 18px;
    }
}

/* === SECONDARY BUTTON STYLE === */
.ai-dashboard__btn--secondary {
    background: white;
    color: var(--ai-primary);
    border: 2px solid var(--ai-primary);
}

.ai-dashboard__btn--secondary:hover {
    background: var(--ai-primary);
    color: white;
}

.ai-dashboard__btn--secondary:hover .ai-dashboard__btn-icon {
    stroke: white;
}

/* === LOADING STATE === */
.ai-dashboard__btn--loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.ai-dashboard__btn--loading::after {
    content: "...";
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}
