/**
 * WAHLMODULE DIALOG STYLING
 * Styling für den Modulauswahl-Dialog
 */

/* Overlay */
.wahlmodul-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Dialog Container */
.wahlmodul-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

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

/* Header */
.wahlmodul-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wahlmodul-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.wahlmodul-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.wahlmodul-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Body */
.wahlmodul-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

/* Filter/Search */
.wahlmodul-filter {
    margin-bottom: 16px;
}

#wahlmodul-search {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

#wahlmodul-search:focus {
    outline: none;
    border-color: #4a90e2;
}

/* Module List */
.wahlmodul-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wahlmodul-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.wahlmodul-item:hover {
    background: #f8f9fa;
    border-color: #4a90e2;
}

.wahlmodul-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 12px;
}

.wahlmodul-item label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.wahlmodul-name {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.wahlmodul-ects {
    font-size: 0.9rem;
    color: #666;
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

/* Checked state */
.wahlmodul-checkbox:checked + label {
    color: #4a90e2;
}

.wahlmodul-checkbox:checked + label .wahlmodul-ects {
    background: #4a90e2;
    color: white;
}

/* Footer */
.wahlmodul-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.wahlmodul-selected-info {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.wahlmodul-selected-info span {
    color: #4a90e2;
    font-weight: 700;
}

/* Buttons */
.wahlmodul-cancel,
.wahlmodul-confirm {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wahlmodul-cancel {
    background: #f0f0f0;
    color: #666;
}

.wahlmodul-cancel:hover {
    background: #e0e0e0;
    color: #333;
}

.wahlmodul-confirm {
    background: #4a90e2;
    color: white;
}

.wahlmodul-confirm:hover {
    background: #3a7bc8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* Platzhalter Styling */
.modul-platzhalter {
    cursor: pointer;
    border: 3px dashed #4a90e2 !important;
    transition: all 0.3s;
    position: relative;
    min-width: 150px !important;
    min-height: 150px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modul-platzhalter .modul-titel {
    text-align: center;
    font-weight: 600;
}

.modul-platzhalter::before {
    content: "➕";
    font-size: 2.5rem;
    color: #4a90e2;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.modul-platzhalter::after {
    content: "Klicken zum Auswählen";
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #4a90e2;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.modul-platzhalter:hover {
    background: #f0f7ff !important;
    border-color: #2a70c2 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.modul-platzhalter:hover::before {
    transform: scale(1.2) rotate(90deg);
}

.modul-platzhalter:hover::after {
    opacity: 1;
}

/* Container für ausgewählte Module */
.wahlmodul-selected-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.wahlmodul-selected-container .modul {
    cursor: pointer;
    transition: all 0.2s;
}

.wahlmodul-selected-container .modul:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .wahlmodul-dialog {
        width: 95%;
        max-height: 90vh;
    }

    .wahlmodul-header h3 {
        font-size: 1.25rem;
    }

    .wahlmodul-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .wahlmodul-selected-info {
        text-align: center;
        margin-bottom: 8px;
    }

    .wahlmodul-cancel,
    .wahlmodul-confirm {
        width: 100%;
    }
}
