/* 
 * KI-Umfrage Plugin CSS - Ergänzungen zum Literarisches Tagesrätsel Design
 * Version 2.1.0
 * Nutzt die lit-* Klassen vom Quiz-Plugin, nur Abweichungen hier definiert
 */

/* ==========================================================================
   UMFRAGE-SPEZIFISCHE ANPASSUNGEN
   ========================================================================== */

/* Vollbreite für Desktop */
.lit-quiz-container {
    max-width: 100% !important;
    margin-bottom: 30px;
}

@media screen and (min-width: 768px) {
    .lit-quiz-container {
        max-width: 100% !important;
    }
}

/* Header-Anpassungen für Umfrage */
.lit-quiz-header h3 {
    font-size: 18px;
    color: #ffffff !important;
}

.lit-stats {
    gap: 15px;
}

/* ==========================================================================
   FORTSCHRITTSBALKEN
   ========================================================================== */

.lit-progress {
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    height: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lit-progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.lit-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #950000, #c0392b);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   SZENARIO-BEREICHE (Abweichungen vom Quiz)
   ========================================================================== */

.lit-scenario {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    margin: 20px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lit-scenario:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lit-scenario-hidden {
    display: none;
}

.lit-scenario-answered {
    border-left: 4px solid #27ae60;
    background: linear-gradient(135deg, #f8fff8, #ffffff);
}

.lit-scenario-header {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 12px 15px;
    border-bottom: 1px solid #e1e8ed;
}

.lit-scenario-number {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 600;
}

.lit-scenario-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
    margin: 0;
}

.lit-scenario-content {
    padding: 15px;
}

.lit-scenario-text {
    color: #34495e;
    margin-bottom: 15px;
    line-height: 1.6;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #bdc3c7;
    font-size: 0.95em;
}

/* ==========================================================================
   ABSTIMMUNGS-BUTTONS (vereinfacht)
   ========================================================================== */

.lit-voting-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.lit-vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    position: relative;
    background: #ecf0f1;
    color: #2c3e50;
}

.lit-vote-btn:hover:not(:disabled) {
    background: #bdc3c7;
    color: #2c3e50;
}

.lit-vote-yes {
    background: #ecf0f1;
}

.lit-vote-yes:hover:not(:disabled) {
    background: #bdc3c7;
    color: #2c3e50;
}

.lit-vote-no {
    background: #ecf0f1;
}

.lit-vote-no:hover:not(:disabled) {
    background: #bdc3c7;
    color: #2c3e50;
}

.lit-vote-btn:disabled {
    cursor: not-allowed;
    transform: none !important;
}

/* Mobile Touch: Hover-State auf Touch-Geräten deaktivieren */
@media (hover: none) {
    .lit-vote-btn:hover:not(:disabled) {
        background: #ecf0f1 !important;
        color: #2c3e50 !important;
    }
    
    .lit-vote-yes:hover:not(:disabled) {
        background: #ecf0f1 !important;
        color: #2c3e50 !important;
    }
    
    .lit-vote-no:hover:not(:disabled) {
        background: #ecf0f1 !important;
        color: #2c3e50 !important;
    }
}

/* Spezielle Klasse für gewählte Buttons */
.lit-vote-btn.voted {
    background: #950000 !important;
    color: white !important;
    opacity: 1 !important;
}

/* Spezielle Klasse für nicht-gewählte Buttons */
.lit-vote-btn.not-voted {
    opacity: 0.5 !important;
}

/* Ladeanimation nur für Buttons mit loading-Klasse */
.lit-vote-btn.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #7f8c8d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   ANTWORT-ANZEIGE (Abweichungen)
   ========================================================================== */

.lit-answer-display {
    text-align: center;
    margin: 20px 0;
}

.lit-answer-selected {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    animation: answerReveal 0.6s ease-out;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@keyframes answerReveal {
    from { 
        opacity: 0; 
        transform: scale(0.9) translateY(10px);
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0);
    }
}

.lit-answer-icon {
    font-size: 18px;
    margin-right: 10px;
}

.lit-answer-yes {
    background: #bdc3c7;
    color: #2c3e50;
    border: 2px solid #95a5a6;
}

.lit-answer-no {
    background: #bdc3c7;
    color: #2c3e50;
    border: 2px solid #95a5a6;
}

/* ==========================================================================
   FINALE AUSWERTUNG (Abweichungen)
   ========================================================================== */

.lit-final-evaluation {
    background: #f8f9fa;
    color: #2c3e50;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    animation: finalSlide 0.8s ease-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

/* Ergebnisvergleich - Szenario für Szenario */
.lit-result-scenario {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 0px;
    margin: 15px 0;
    overflow: hidden;
}

.lit-result-scenario-header {
    background: #f8f9fa;
    padding: 12px 15px;
    border-bottom: 1px solid #e1e8ed;
}

/* Lade-Animation für Ergebnisse */
.lit-results-loading {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.lit-loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #ecf0f1;
    border-top: 3px solid #950000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.lit-loading-text {
    font-size: 16px;
    font-style: italic;
    white-space: nowrap;
    text-align: center;
    margin: 0 auto;
    display: block;
}

.lit-loading-message {
    text-align: center;
    margin-top: 15px;
    color: #7f8c8d;
    font-style: italic;
    white-space: nowrap;
    display: block;
}

.lit-result-scenario-number {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-weight: 600;
}

.lit-result-scenario-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
    margin: 0;
}

.lit-result-scenario-content {
    padding: 15px;
}

.lit-result-scenario-text {
    color: #34495e;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 0.95em;
}

.lit-result-comparison {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.lit-result-user, .lit-result-community {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lit-result-label {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 600;
}

.lit-result-vote {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    font-size: 14px;
}

.lit-result-vote-yes {
    color: #27ae60;
}

.lit-result-vote-no {
    color: #e74c3c;
}

.lit-result-vote-pending {
    color: #7f8c8d;
    font-style: italic;
}

.lit-result-icon {
    font-size: 16px;
}

.lit-result-match {
    background: #d5f4e6 !important;
    border-left: 4px solid #27ae60;
}

.lit-result-mismatch {
    background: #fdeaea !important;
    border-left: 4px solid #e74c3c;
}

@media (max-width: 600px) {
    .lit-result-comparison {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Community-Vergleich */
.lit-community-comparison {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.lit-community-comparison h4 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.lit-community-info {
    margin-bottom: 20px;
    opacity: 0.9;
}

.lit-community-results {
    margin-top: 15px;
}

.lit-community-row {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    margin: 3px 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.lit-community-icon {
    font-size: 14px;
    margin-right: 10px;
    font-weight: bold;
}

.lit-community-scenario {
    flex: 1;
    margin-right: 10px;
}

.lit-community-decision {
    font-weight: bold;
    min-width: 40px;
    text-align: right;
}

.lit-community-yes .lit-community-icon {
    color: #2ecc71;
}

.lit-community-no .lit-community-icon {
    color: #e74c3c;
}

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

.lit-final-evaluation h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
    text-align: center;
}

.lit-evaluation-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
}

.lit-evaluation-result {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.lit-result-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #ecf0f1;
    line-height: 1;
}

.lit-result-label {
    font-size: 1em;
    margin-top: 5px;
    opacity: 0.9;
}

.lit-tendency-display {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   RESPONSIVE ANPASSUNGEN
   ========================================================================== */

@media (max-width: 768px) {
    .lit-voting-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .lit-vote-btn {
        width: 100%;
        max-width: 300px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .lit-vote-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: auto;
    }
    
    .lit-final-evaluation {
        padding: 20px 15px;
    }
    
    .lit-result-number {
        font-size: 2em;
    }
    
    .lit-evaluation-result {
        flex-direction: column;
        gap: 10px;
    }
}

/* ==========================================================================
   SHARE-BEREICH
   ========================================================================== */

.lit-share-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 0px;
    text-align: center;
    animation: shareSlide 0.6s ease-out;
}

.lit-share-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: bold;
}

.lit-share-section p {
    margin: 0 0 20px 0;
    color: #7f8c8d;
    line-height: 1.6;
    font-size: 0.95em;
}

.lit-share-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Shariff-Button Styling falls nötig */
.lit-share-buttons .shariff {
    margin: 0;
}

.lit-share-buttons .shariff ul {
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Direkte Share-Buttons */
.lit-direct-share-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.lit-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 0px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 120px;
    justify-content: center;
}

.lit-share-btn:hover {
    background: #f8f9fa;
    border-color: #bdc3c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #2c3e50;
}

.lit-share-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.lit-share-icon {
    font-size: 16px;
    line-height: 1;
}

.lit-share-text {
    font-size: 13px;
    font-weight: 600;
}

/* Spezifische Button-Farben */
.lit-share-facebook:hover {
    background: #f0f2ff;
    border-color: #4267B2;
}

.lit-share-twitter:hover {
    background: #f0f8ff;
    border-color: #1DA1F2;
}

.lit-share-linkedin:hover {
    background: #f0f4ff;
    border-color: #0077B5;
}

.lit-share-email:hover {
    background: #fff8f0;
    border-color: #ff6b35;
}

.lit-share-copy:hover {
    background: #f0fff0;
    border-color: #28a745;
}

@media (max-width: 600px) {
    .lit-direct-share-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .lit-share-btn {
        min-width: auto;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
}

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

@media (max-width: 768px) {
    .lit-share-section {
        padding: 20px 15px;
        margin-top: 25px;
    }
    
    .lit-share-section h4 {
        font-size: 1.1em;
    }
    
    .lit-share-section p {
        font-size: 0.9em;
    }
}

/* ==========================================================================
   ACCESSIBILITY & MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .lit-vote-btn,
    .lit-scenario,
    .lit-answer-selected,
    .lit-final-evaluation,
    .lit-share-section {
        transition: none;
        animation: none;
    }
    
    .lit-vote-btn:hover {
        transform: none;
    }
}
