/* /var/www/html/vidono/css/components.css - UI Elemente */

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: var(--radius);
    font-weight: 600; cursor: pointer; text-decoration: none;
    transition: all 0.2s; border: none; gap: 8px; font-size: 0.95rem;
}
.btn-primary { background-color: var(--primary); color: #fff; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); }

.btn-danger { background-color: rgba(239, 68, 68, 0.1); color: var(--danger); }
.btn-danger:hover { background-color: rgba(239, 68, 68, 0.2); border: 1px solid var(--danger); }

.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 8px; }

/* Icon Button (für Delete Mod) */
.btn-icon-only {
    padding: 0; width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
    border: none; cursor: pointer; background: transparent; color: var(--text-muted);
}
.btn-icon-only:hover { background: rgba(0,0,0,0.1); color: var(--danger); }

/* Inputs & Forms */
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--text-main); font-size: 0.9rem; }

input[type="text"], input[type="number"], select, textarea {
    width: 100%; 
    padding: 12px; 
    border-radius: 8px;
    border: 1px solid #cbd5e1; 
    background-color: var(--bg-card); 
    color: var(--text-main); 
    font-size: 0.95rem; 
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

[data-theme="dark"] input[type="text"], 
[data-theme="dark"] input[type="number"], 
[data-theme="dark"] select, 
[data-theme="dark"] textarea {
    border-color: #3f3f46;
    background-color: #27272a;
}

input:focus, select:focus, textarea:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.15); 
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; vertical-align: middle; margin-right: 10px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #d1d5db; 
    transition: .3s; border-radius: 34px;
}
[data-theme="dark"] .slider { background-color: #3f3f46; }

.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; transition: .3s; border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* Badges */
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.status-active { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-inactive { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.status-pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* Alerts */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; border-left: 4px solid; background: var(--input-bg); }
.alert-warning { border-color: var(--warning); background: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main);
    cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- NEU: TOAST NOTIFICATIONS (Ersatz für alert) --- */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Klicks durchlassen wenn leer */
}

.custom-toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease forwards;
    color: var(--text-main);
    font-weight: 500;
    pointer-events: auto;
}
.custom-toast.error { border-left-color: var(--danger); }
.custom-toast.success { border-left-color: var(--success); }
.custom-toast.info { border-left-color: var(--primary); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(10px); }
}

/* --- NEU: CONFIRM MODAL (Ersatz für confirm) --- */
.confirm-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: none; /* Standardmäßig versteckt */
    align-items: center;
    justify-content: center;
}

.confirm-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.confirm-box h3 { margin-bottom: 10px; color: var(--text-main); font-size: 1.2rem; margin-top: 0; }
.confirm-box p { color: var(--text-muted); margin-bottom: 25px; line-height: 1.5; font-size: 1rem; }

.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions button { min-width: 100px; }

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- COOKIE BANNER (DSGVO Konform) --- */
.cookie-overlay {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    z-index: 10000;
    display: none; /* Wird per JS aktiviert */
    flex-direction: column;
    gap: 15px;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-title {
    font-weight: 800;
    font-size: 1.1rem;
    display: flex; 
    align-items: center; 
    gap: 10px;
    margin-bottom: 5px;
}

.cookie-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

/* Mobile Optimierung */
@media (max-width: 600px) {
    .cookie-overlay {
        left: 10px; right: 10px; bottom: 10px;
        padding: 20px;
    }
    .cookie-actions {
        flex-direction: column;
    }
    .cookie-actions button {
        width: 100%;
    }
}