/**
 * Frontend-Styles für Umfragetool
 */

/* Container */
.umfragetool-container {
    margin: 20px 0;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Frage */
.umfragetool-question h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    line-height: 1.4;
}

/* Timer */
.umfragetool-timer {
    text-align: right;
    margin-bottom: 20px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.umfragetool-timer .timer-label {
    color: #666;
    margin-right: 10px;
}

.umfragetool-timer .timer-display {
    font-weight: bold;
    font-size: 18px;
    color: #333;
    font-family: monospace;
}

.umfragetool-timer.warning .timer-display {
    color: #ff6b6b;
}

/* Antworten */
.umfragetool-answers {
    margin-bottom: 20px;
}

.umfragetool-answer {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 15px 18px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    user-select: none;
}

.umfragetool-answer:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.umfragetool-answer span {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
}

.umfragetool-answer input[type="radio"],
.umfragetool-answer input[type="checkbox"] {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    cursor: pointer;
    transform: scale(1);
    accent-color: #0073aa;
}

/* Für bessere Browser-Kompatibilität */
.umfragetool-answer input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #ccc;
    border-radius: 50%;
    background: white;
    position: relative;
    outline: none;
    transition: all 0.2s ease;
}

.umfragetool-answer input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: white;
    position: relative;
    outline: none;
    transition: all 0.2s ease;
}

.umfragetool-answer input[type="radio"]:checked {
    border-color: #0073aa;
    background: #0073aa;
}

.umfragetool-answer input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.umfragetool-answer input[type="checkbox"]:checked {
    border-color: #0073aa;
    background: #0073aa;
}

.umfragetool-answer input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    color: white;
    font-size: 18px;
    font-weight: bold;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.umfragetool-answer input[type="radio"]:hover,
.umfragetool-answer input[type="checkbox"]:hover {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.umfragetool-answer input[type="radio"]:checked + span,
.umfragetool-answer input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #0073aa;
}

.umfragetool-answer:has(input:checked) {
    background: #e7f3ff;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.2);
}

/* Fallback für Browser ohne :has() Support */
.umfragetool-answer.selected {
    background: #e7f3ff;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.2);
}

.umfragetool-answer.selected span {
    font-weight: 600;
    color: #0073aa;
}

/* Freitext */
.umfragetool-freetext {
    margin-bottom: 20px;
}

.umfragetool-freetext label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.umfragetool-freetext textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.umfragetool-freetext textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Submit Button */
.umfragetool-actions {
    text-align: center;
}

.umfragetool-submit {
    padding: 12px 30px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.umfragetool-submit:hover {
    background: #005a87;
}

.umfragetool-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Nachrichten */
.umfragetool-messages {
    margin-top: 20px;
}

.umfragetool-notice {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.umfragetool-notice-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.umfragetool-notice-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.umfragetool-notice-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.umfragetool-notice-info {
    color: #004085;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Ergebnisse */
.umfragetool-results {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

.umfragetool-results h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.umfragetool-result-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.umfragetool-result-item .result-label {
    min-width: 150px;
    font-weight: 500;
    color: #333;
}

.umfragetool-result-item .result-bar {
    flex: 1;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.umfragetool-result-item .result-fill {
    height: 100%;
    background: #0073aa;
    transition: width 0.5s ease;
    position: relative;
}

.umfragetool-result-item .result-percentage {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.umfragetool-result-item .result-count {
    min-width: 50px;
    text-align: right;
    color: #666;
    font-size: 14px;
}

.umfragetool-total-votes {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.umfragetool-no-results {
    text-align: center;
    color: #666;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Freitext-Ergebnisse im Frontend */
.umfragetool-freetext-results {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.umfragetool-freetext-results h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.umfragetool-freetext-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.umfragetool-freetext-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.umfragetool-freetext-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.umfragetool-freetext-item .freetext-author {
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 10px;
    font-size: 16px;
}

.umfragetool-freetext-item .freetext-content {
    margin: 12px 0;
    line-height: 1.6;
    color: #333;
    font-size: 15px;
}

.umfragetool-freetext-item .freetext-time {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
    text-align: right;
    font-style: italic;
}

/* Legacy support für alte Struktur */
.umfragetool-freetext-item strong {
    color: #0073aa;
    font-weight: 600;
}

.umfragetool-freetext-item p {
    margin: 8px 0 5px 0;
    color: #333;
    line-height: 1.5;
}

.umfragetool-freetext-item small {
    color: #666;
    font-size: 12px;
}

/* Loading State */
.umfragetool-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.umfragetool-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: umfragetool-spin 1s linear infinite;
}

@keyframes umfragetool-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Timer abgelaufen - Formular deaktiviert */
.umfragetool-timer-expired {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.umfragetool-timer-expired::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid #dc3545;
    border-radius: 8px;
    pointer-events: none;
}

.umfragetool-timer-expired .umfragetool-answer {
    background: #f8d7da !important;
    border-color: #f1aeb5 !important;
    color: #721c24 !important;
}

.umfragetool-timer-expired .umfragetool-submit {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    cursor: not-allowed !important;
}

/* Reset Button */
.umfragetool-reset-vote {
    margin-left: 10px;
    padding: 6px 12px;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.umfragetool-reset-vote:hover {
    background: #555;
}

/* Kurzantwort-Eingabe */
.umfragetool-short-answer {
    margin-bottom: 20px;
}

.umfragetool-short-answer label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.umfragetool-short-answer-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.umfragetool-short-answer-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.umfragetool-short-answer-input::placeholder {
    color: #999;
    font-style: italic;
}

.umfragetool-input-help {
    margin-top: 8px;
}

.umfragetool-input-help small {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* Kurzantwort-Ergebnisse */
.umfragetool-short-answer-results {
    margin-top: 20px;
}

.short-answer-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    flex: 1;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
}

.stat-item.correct {
    border-color: #28a745;
    background: #d4edda;
}

.stat-item.wrong {
    border-color: #dc3545;
    background: #f8d7da;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.correct-answer-display {
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    margin: 20px 0;
}

.correct-answer-display strong {
    color: #0073aa;
}

.short-answers-list {
    margin-top: 20px;
}

.short-answers-list h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.short-answer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #dee2e6;
}

.short-answer-item.correct {
    border-left-color: #28a745;
    background: #d4edda;
}

.short-answer-item.wrong {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.answer-status {
    font-size: 20px;
    font-weight: bold;
    min-width: 25px;
    text-align: center;
}

.short-answer-item.correct .answer-status {
    color: #28a745;
}

.short-answer-item.wrong .answer-status {
    color: #dc3545;
}

.answer-text {
    font-weight: 500;
    color: #333;
}

/* Responsive für Kurzantworten */
@media screen and (max-width: 600px) {
    .short-answer-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .short-answer-item {
        flex-wrap: wrap;
        gap: 5px;
    }
}

/* Universelle Fragen */
.presenter-universal-controls {
    margin: 20px 0;
    padding: 20px;
    background: #f0f8ff;
    border: 2px solid #0073aa;
    border-radius: 8px;
}

.presenter-universal-controls h3 {
    margin: 0 0 15px 0;
    color: #0073aa;
    font-size: 18px;
}

.universal-control-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.universal-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.universal-input-group label {
    font-weight: 600;
    color: #333;
}

.universal-question-input,
.universal-correct-input,
.universal-answer-type {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.universal-question-input {
    min-height: 60px;
    resize: vertical;
}

.universal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.universal-update-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    background: #0073aa;
    color: white;
}

.universal-update-btn:hover {
    background: #005a87;
}

.universal-update-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.universal-status {
    margin-top: 10px;
}

.umfragetool-universal-container {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.umfragetool-loading-universal {
    text-align: center;
    color: #666;
    font-style: italic;
}

.umfragetool-universal-question {
    width: 100%;
}

.umfragetool-universal-question h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

/* Responsive für universelle Fragen */
@media screen and (max-width: 600px) {
    .universal-buttons {
        flex-direction: column;
    }
    
    .universal-update-btn {
        width: 100%;
    }
}

/* Presenter Ansicht */
.umfragetool-presenter {
    max-width: 1200px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.presenter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.presenter-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.presenter-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.presenter-type {
    padding: 5px 12px;
    background: #17a2b8;
    color: white;
    border-radius: 4px;
    font-size: 14px;
}

.presenter-clear {
    padding: 5px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
}

.presenter-clear:hover {
    background: #c82333;
}

.presenter-clear:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.presenter-results-container {
    margin-bottom: 30px;
}

.presenter-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.presenter-result-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.presenter-result-item .result-label {
    min-width: 250px;
    font-size: 18px;
    font-weight: 500;
}

.presenter-result-item .result-bar {
    flex: 1;
    height: 35px;
    background: #e9ecef;
    border-radius: 17px;
    overflow: hidden;
}

.presenter-result-item .result-fill {
    height: 100%;
    background: linear-gradient(to right, #007bff, #0056b3);
    position: relative;
    transition: width 0.5s ease;
}

.presenter-result-item .result-percentage {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.presenter-result-item .result-count {
    min-width: 60px;
    text-align: right;
    font-weight: bold;
    font-size: 18px;
}

.presenter-stats {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
}

.presenter-no-data {
    text-align: center;
    padding: 60px;
    color: #666;
    font-size: 18px;
}

.presenter-participants {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.presenter-participants h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
}

.participants-list {
    display: grid;
    gap: 10px;
}

/* Participants Section - Neue Styling für detaillierte Anzeige */
.participants-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.participants-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid #007bff;
}

.participant-name {
    font-weight: 600;
    color: #007bff;
    min-width: 150px;
}

.participant-answers {
    flex: 1;
    margin: 0 15px;
    color: #333;
}

.participant-time {
    font-size: 12px;
    color: #666;
    min-width: 120px;
    text-align: right;
}

/* Timer-Steuerung im Frontend-Presenter */
.presenter-timer-controls {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.presenter-timer-controls h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.timer-control-panel {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* Timer Enable/Disable Checkbox */
.timer-enable-group {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.timer-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.timer-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #007bff;
}

.timer-settings-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.timer-settings-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.timer-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-input-group label {
    font-weight: 600;
    color: #333;
    min-width: auto;
    white-space: nowrap;
}

.timer-input-group input[type="number"] {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.timer-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.presenter-timer-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.presenter-timer-btn.start {
    background: #28a745;
    color: white;
}

.presenter-timer-btn.start:hover {
    background: #218838;
}

.presenter-timer-btn.stop {
    background: #dc3545;
    color: white;
}

.presenter-timer-btn.stop:hover {
    background: #c82333;
}

.presenter-timer-btn.extend {
    background: #ffc107;
    color: #212529;
}

.presenter-timer-btn.extend:hover {
    background: #e0a800;
}

.presenter-timer-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.presenter-timer-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #007bff;
    color: white;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.presenter-timer-display.warning {
    background: #dc3545;
    animation: pulse 1s infinite;
}

.presenter-timer-display .timer-time {
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
}

/* Presenter Selector */
.umfragetool-presenter-selector {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.umfragetool-presenter-selector h3 {
    margin: 0 0 20px 0;
}

.presenter-survey-list {
    display: grid;
    gap: 15px;
}

.presenter-survey-item {
    padding: 20px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.presenter-survey-item h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.presenter-survey-item code {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .umfragetool-container {
        padding: 20px 15px;
    }
    
    .umfragetool-result-item,
    .presenter-result-item {
        flex-wrap: wrap;
    }
    
    .umfragetool-result-item .result-label,
    .presenter-result-item .result-label {
        min-width: 100%;
        margin-bottom: 8px;
    }
    
    .umfragetool-result-item .result-bar,
    .presenter-result-item .result-bar {
        flex: 1;
    }
    
    .umfragetool-submit {
        width: 100%;
    }
    
    .participant-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .participant-name,
    .participant-answers,
    .participant-time {
        min-width: auto;
        margin: 2px 0;
    }
    
    .participant-time {
        text-align: left;
        font-size: 11px;
    }
    
    .presenter-info {
        flex-wrap: wrap;
    }
    
    .timer-control-panel {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .timer-input-group {
        justify-content: space-between;
        gap: 10px;
    }
    
    .timer-input-group label {
        min-width: auto;
        flex: 1;
    }
    
    .timer-input-group input[type="number"] {
        width: 60px;
    }
    
    .timer-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .presenter-timer-btn {
        flex: 1;
        min-width: 100px;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .presenter-timer-display {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .presenter-timer-display .timer-time {
        font-size: 14px;
    }
}

/* Tägliche Teilnehmer-Sektion */
.daily-participants-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.daily-participants-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.date-selector {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.date-selector label {
    font-weight: 600;
    color: #333;
}

.date-selector select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    min-width: 200px;
    height: 45px;
}

.date-selector .button {
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

.date-selector .button:hover {
    background: #005a87;
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.participant-badge {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.participant-badge.not-voted {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.participant-badge.has-voted {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.participants-summary {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
}

.participants-content .no-data {
    text-align: center;
    color: #666;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 6px;
    font-style: italic;
}

/* Responsive Anpassungen für Teilnehmer-Sektion */
@media screen and (max-width: 600px) {
    .date-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .date-selector select {
        min-width: 100%;
    }
    
    .participants-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
    
    .participant-badge {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* Presenter Freitext-Antworten */
.presenter-freetext-results {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.presenter-freetext-results .freetext-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.presenter-freetext-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.presenter-freetext-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.presenter-freetext-item .freetext-author {
    font-weight: bold;
    color: #007bff;
    margin-bottom: 8px;
    font-size: 16px;
}

.presenter-freetext-item .freetext-content {
    margin: 8px 0;
    line-height: 1.5;
    color: #333;
    font-size: 15px;
}

.presenter-freetext-item .freetext-time {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

/* Responsive für Presenter Freitext */
@media screen and (max-width: 600px) {
    .presenter-freetext-results {
        padding: 15px;
        margin-top: 20px;
    }
    
    .presenter-freetext-item {
        padding: 12px;
    }
    
    .presenter-freetext-item .freetext-author {
        font-size: 15px;
    }
    
    .presenter-freetext-item .freetext-content {
        font-size: 14px;
    }
}

/* Frontend-Presenter Chart-Sektion */
.umfragetool-presenter .chart-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.umfragetool-presenter .chart-controls {
    text-align: center;
    margin-bottom: 20px;
}

.umfragetool-presenter .chart-controls .chart-type-btn {
    margin: 0 5px;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.umfragetool-presenter .chart-controls .chart-type-btn:hover {
    background: #005a87;
}

.umfragetool-presenter .chart-controls .chart-type-btn.active {
    background: #00a0d2;
}

.umfragetool-presenter .chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Frontend-Presenter Freitext-Sektion */
.umfragetool-presenter .presenter-freetext-results {
    margin-top: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.umfragetool-presenter .presenter-freetext-results .freetext-title {
    margin: 0 0 25px 0;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.umfragetool-presenter .presenter-freetext-list {
    display: grid;
    gap: 20px;
}

.umfragetool-presenter .presenter-freetext-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.umfragetool-presenter .presenter-freetext-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.umfragetool-presenter .presenter-freetext-item .freetext-author {
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
    font-size: 18px;
}

.umfragetool-presenter .presenter-freetext-item .freetext-content {
    margin: 12px 0;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
}

.umfragetool-presenter .presenter-freetext-item .freetext-time {
    font-size: 14px;
    color: #666;
    margin-top: 12px;
    text-align: right;
    font-style: italic;
}

/* Responsive für Frontend-Presenter Charts und Freitext */
@media screen and (max-width: 768px) {
    .umfragetool-presenter .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .umfragetool-presenter .chart-controls .chart-type-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .umfragetool-presenter .presenter-freetext-results {
        padding: 20px;
        margin-top: 30px;
    }
    
    .umfragetool-presenter .presenter-freetext-item {
        padding: 15px;
    }
    
    .umfragetool-presenter .presenter-freetext-item .freetext-author {
        font-size: 16px;
    }
    
    .umfragetool-presenter .presenter-freetext-item .freetext-content {
        font-size: 15px;
    }
    
    .umfragetool-presenter .presenter-freetext-item .freetext-time {
        font-size: 13px;
    }
}

/* ====================================
   Neue Styles für erweiterte Funktionen
   ==================================== */

/* Diagramm-Container */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-type-selector {
    margin-bottom: 20px;
    text-align: center;
}

.chart-type-selector button {
    margin: 0 5px;
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.chart-type-selector button:hover {
    background: #005a87;
}

.chart-type-selector button.active {
    background: #00a0d2;
}

/* Statistik-Zusammenfassung */
.statistics-summary {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.statistics-summary h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 600;
    color: #555;
}

.stat-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.stat-value.correct {
    color: #46b450;
}

.stat-value.incorrect {
    color: #dc3232;
}

/* Hervorhebung richtiger Antworten in Teilnehmerliste */
.participant-item.correct-answer {
    background: #e7f5e7 !important;
    border-left: 4px solid #46b450 !important;
}

.participant-item.incorrect-answer {
    background: #fef5f5 !important;
    border-left: 4px solid #dc3232 !important;
}

.correct-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    background: #46b450;
    color: white;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
}

/* Richtige Antwort-Markierung in Ergebnissen */
.result-row.correct-answer {
    background: #e7f5e7;
    border: 2px solid #46b450;
    border-radius: 4px;
    padding: 5px;
    margin: 5px 0;
}

.answer-option.correct {
    border-color: #46b450;
    background: #e7f5e7;
}

.answer-option.correct.selected {
    background: #46b450;
    color: white;
}

.answer-option.incorrect.selected {
    background: #dc3232;
    color: white;
    border-color: #dc3232;
}

/* Legende für Diagramme */
.chart-legend {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.legend-item {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.legend-label {
    vertical-align: middle;
}

/* Richtige Antworten in Presenter-Ansicht */
.presenter-result-item.correct-answer {
    background: #e7f5e7;
    padding: 5px 10px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.presenter-result-item.correct-answer .result-fill {
    background: linear-gradient(to right, #46b450, #3a9542) !important;
}

.presenter-result-item .correct-indicator {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 10px;
    background: #46b450;
    color: white;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

/* Responsive Design für Diagramme */
@media (max-width: 768px) {
    .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .chart-type-selector button {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .statistics-summary {
        padding: 15px;
    }
    
    .stat-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .stat-label,
    .stat-value {
        text-align: left;
    }
}

/* Presenter Kurzantwort-Statistiken */
.presenter-short-answer-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.presenter-short-answer-stats .stat-box {
    flex: 1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    background: #f5f5f5;
    border: 2px solid #ddd;
}

.presenter-short-answer-stats .stat-box.correct {
    background: #d4edda;
    border-color: #28a745;
}

.presenter-short-answer-stats .stat-box.wrong {
    background: #f8d7da;
    border-color: #dc3545;
}

.presenter-short-answer-stats .stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.presenter-short-answer-stats .stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #333;
}

.presenter-answer-list {
    margin-top: 30px;
}

.presenter-answer-list h4 {
    margin-bottom: 15px;
    color: #333;
}

.presenter-answer-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.presenter-answer-item.correct-answer {
    background: #d4edda;
    border-color: #28a745;
}

.presenter-answer-item.incorrect-answer {
    background: #f8d7da;
    border-color: #dc3545;
}

.presenter-answer-item .answer-icon {
    font-size: 20px;
    font-weight: bold;
}

.presenter-answer-item.correct-answer .answer-icon {
    color: #28a745;
}

.presenter-answer-item.incorrect-answer .answer-icon {
    color: #dc3545;
}

.presenter-answer-item .answer-author {
    font-weight: bold;
    color: #555;
}

.presenter-answer-item .answer-text {
    color: #333;
}

/* Richtige Antworten in Balkendiagramm */
.presenter-result-item.correct-answer {
    position: relative;
    background: #d4edda;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}

.presenter-result-item .correct-indicator {
    position: absolute;
    right: 10px;
    top: 10px;
    color: #28a745;
    font-size: 20px;
    font-weight: bold;
}

/* Teilnehmer-Bewertung in Presenter-Ansicht */
.participant-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid #007bff;
    position: relative;
}

.participant-item.correct {
    background: #d4edda;
    border-left-color: #28a745;
}

.participant-item.incorrect {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.participant-status {
    margin-right: 15px;
    min-width: 30px;
}

.status-icon {
    font-size: 20px;
    font-weight: bold;
}

.status-icon.correct {
    color: #28a745;
}

.status-icon.incorrect {
    color: #dc3545;
}

.participant-answers .answer-correct {
    color: #28a745;
    font-weight: bold;
}

.participant-answers .answer-incorrect {
    color: #dc3545;
    text-decoration: line-through;
    opacity: 0.7;
}

.participant-name {
    font-weight: 600;
    color: #007bff;
    min-width: 150px;
}

.participant-answers {
    flex: 1;
    margin: 0 15px;
    color: #333;
}

.participant-time {
    font-size: 12px;
    color: #666;
    min-width: 120px;
    text-align: right;
}
