/* ═══════════════════════════════════════════════════════════════
   AI MODAL — Plan-Wahl-Dialog
   ───────────────────────────────────────────────────────────────
   Wird inline im KI-Chat angezeigt, wenn die KI Aufgaben generiert
   hat, aber der aktuelle Plan nicht leer ist. Der Nutzer wählt:
     • Neuen Plan erstellen (empfohlen)
     • Zum aktuellen Plan hinzufügen
     • Aktuellen Plan ersetzen (mit Warnung)

   Theme-aware: passt sich Glass / White / Dark an.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Container im Chat ─────────────────────────────────────── */
.ai-message-choice {
    justify-content: stretch !important;
}
.ai-message-choice > .ai-choice-card {
    width: 100%;
}

.ai-choice-card {
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 18px;
    padding: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    animation: aiChoiceFadeIn 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes aiChoiceFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Header ─────────────────────────────────────────────────── */
.ai-choice-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ai-choice-title {
    font-size: 15.5px;
    font-weight: 700;
    color: #1A1A2E;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.ai-choice-subtitle {
    font-size: 13px;
    color: rgba(26,26,46,0.62);
    line-height: 1.45;
}

/* ─── Option-Buttons ─────────────────────────────────────────── */
.ai-choice-options {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.ai-choice-option {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    background: rgba(255,255,255,0.7);
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    color: inherit;
}
.ai-choice-option:hover {
    background: rgba(255,255,255,0.95);
    border-color: var(--accent-blue, #007AFF);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,122,255,0.10);
}
.ai-choice-option:active {
    transform: translateY(0);
}

.ai-choice-recommended {
    background: rgba(0,122,255,0.06);
    border-color: rgba(0,122,255,0.30);
}
.ai-choice-recommended:hover {
    background: rgba(0,122,255,0.10);
}

.ai-choice-danger {
    background: rgba(255,59,48,0.04);
    border-color: rgba(255,59,48,0.20);
}
.ai-choice-danger:hover {
    background: rgba(255,59,48,0.08);
    border-color: rgba(255,59,48,0.45);
    box-shadow: 0 4px 12px rgba(255,59,48,0.12);
}

.ai-choice-opt-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255,255,255,0.85);
    border-radius: 9px;
    border: 1px solid rgba(0,0,0,0.05);
}

.ai-choice-opt-body {
    flex: 1;
    min-width: 0;
}
.ai-choice-opt-title {
    font-size: 14px;
    font-weight: 700;
    color: #1A1A2E;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ai-choice-opt-desc {
    font-size: 12.5px;
    line-height: 1.45;
    color: rgba(26,26,46,0.65);
}
.ai-choice-opt-desc strong {
    color: rgba(255,59,48,0.85);
    font-weight: 600;
}

.ai-choice-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    background: var(--accent-blue, #007AFF);
    color: white;
    border-radius: 5px;
}

/* ─── Plan-Name-Input (nur in der "neuer Plan" Option) ───────── */
.ai-choice-name-wrap {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 9px;
    border-top: 1px dashed rgba(0,0,0,0.10);
}
.ai-choice-name-label {
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(26,26,46,0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ai-choice-name-input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    background: white;
    font-family: inherit;
    font-size: 13px;
    color: #1A1A2E;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 0;
}
.ai-choice-name-input:focus {
    border-color: var(--accent-blue, #007AFF);
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}

/* ─── Abbrechen-Button ───────────────────────────────────────── */
.ai-choice-cancel {
    margin-top: 12px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: rgba(26,26,46,0.55);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.ai-choice-cancel:hover {
    background: rgba(0,0,0,0.05);
    color: rgba(26,26,46,0.85);
}

/* ═══════════════════════════════════════════════════════════════
   WHITE MODE
   ═══════════════════════════════════════════════════════════════ */
[data-theme="white"] .ai-choice-card {
    background: #F7F9FC;
    border-color: rgba(0,0,0,0.08);
}
[data-theme="white"] .ai-choice-option {
    background: white;
    border-color: rgba(0,0,0,0.10);
}
[data-theme="white"] .ai-choice-option:hover {
    background: #FAFBFD;
}
[data-theme="white"] .ai-choice-recommended {
    background: rgba(0,122,255,0.05);
    border-color: rgba(0,122,255,0.25);
}
[data-theme="white"] .ai-choice-recommended:hover {
    background: rgba(0,122,255,0.08);
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════════ */
[data-theme="dark"] .ai-choice-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 4px 18px rgba(0,0,0,0.30);
}
[data-theme="dark"] .ai-choice-header {
    border-bottom-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .ai-choice-title {
    color: #E8EAF0;
}
[data-theme="dark"] .ai-choice-subtitle {
    color: rgba(232,234,240,0.6);
}
[data-theme="dark"] .ai-choice-option {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .ai-choice-option:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--accent-blue, #007AFF);
}
[data-theme="dark"] .ai-choice-recommended {
    background: rgba(0,122,255,0.10);
    border-color: rgba(0,122,255,0.35);
}
[data-theme="dark"] .ai-choice-recommended:hover {
    background: rgba(0,122,255,0.16);
}
[data-theme="dark"] .ai-choice-danger {
    background: rgba(255,59,48,0.07);
    border-color: rgba(255,59,48,0.25);
}
[data-theme="dark"] .ai-choice-danger:hover {
    background: rgba(255,59,48,0.13);
    border-color: rgba(255,59,48,0.50);
}
[data-theme="dark"] .ai-choice-opt-icon {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .ai-choice-opt-title {
    color: #E8EAF0;
}
[data-theme="dark"] .ai-choice-opt-desc {
    color: rgba(232,234,240,0.6);
}
[data-theme="dark"] .ai-choice-opt-desc strong {
    color: rgba(255,100,90,0.95);
}
[data-theme="dark"] .ai-choice-name-wrap {
    border-top-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .ai-choice-name-label {
    color: rgba(232,234,240,0.55);
}
[data-theme="dark"] .ai-choice-name-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    color: #E8EAF0;
}
[data-theme="dark"] .ai-choice-name-input:focus {
    border-color: var(--accent-blue, #007AFF);
    box-shadow: 0 0 0 3px rgba(0,122,255,0.20);
}
[data-theme="dark"] .ai-choice-cancel {
    color: rgba(232,234,240,0.55);
}
[data-theme="dark"] .ai-choice-cancel:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(232,234,240,0.9);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .ai-choice-card {
        padding: 14px;
        border-radius: 14px;
    }
    .ai-choice-title {
        font-size: 14.5px;
    }
    .ai-choice-option {
        padding: 11px 12px;
    }
    .ai-choice-opt-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    .ai-choice-opt-title {
        font-size: 13.5px;
    }
    .ai-choice-opt-desc {
        font-size: 12px;
    }
}