/* ==================== MODALS - MOBILE OPTIMIERT ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.modal-body {
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.modal-footer button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-footer button:active {
    transform: scale(0.98);
}

/* ABC Modal spezifische Styles */
.abc-select-group {
    margin-bottom: 12px;
}

.abc-select-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.abc-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.abc-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.abc-checkbox input {
    width: auto;
    margin: 0;
}

.abc-checkbox:has(input:checked) {
    background: rgba(46, 204, 113, 0.1);
    border-color: var(--primary);
}

textarea {
    min-height: 80px;
    resize: vertical;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
#toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 3000;
    max-width: 320px;
    animation: slideInRight 0.3s ease-out;
}

#toast.active {
    display: flex;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#toast-icon {
    font-size: 1.8rem;
}

#toast-content {
    flex: 1;
}

#toast-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}

#toast-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
}

#toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 10px 10px;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 768px) {
    .modal-content {
        padding: 24px;
    }

    .abc-checkbox-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}