/* --- unified-styles.css --- */

:root {
    /* Farben */
    --dida-primary: #007bff;
    --dida-primary-hover: #0056b3;

    /* Hintergrund dunkler für mehr Kontrast zur weissen Karte */
    --dida-bg: #e9ecef;

    --dida-card-bg: #ffffff;

    /* Rahmenfarbe deutlich dunkler gemacht für Sichtbarkeit */
    --dida-border: #adb5bd;

    --dida-text: #333;

    /* Instruction Bars */
    --dida-instruction-bar: #6f42c1;
    /* Lila (Karte) */
    --dida-instruction-bg: #e0d4fc;
    /* Helles Lila (Karte Hintergrund) */

    --exam-instruction-bar: #007bff;
    /* Blau (Global) */
    --exam-instruction-bg: #cce5ff;
    /* Helles Blau (Global Hintergrund) */

    /* Status Farben */
    --status-green: #28a745;
    --status-yellow: #ffc107;
    --status-red: #dc3545;
    --status-grey: #6c757d;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #e7e7e7;
    padding: 20px;
    color: var(--dida-text);
}

/* =========================================
   0. GLOBALE HEADER INSTRUCTION
   ========================================= */
.exam-instruction {
    display: block !important;
    /* Erzwingt Anzeige */
    background-color: var(--exam-instruction-bg);
    border: 1px solid #b8daff;
    border-left: 6px solid var(--exam-instruction-bar);
    color: #004085;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    font-size: 1.1em;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 900px;
}

.custom-container {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   1. HAUPT-WRAPPER (Die Karte)
   ========================================= */
.dida-component-wrapper {
    background-color: var(--dida-card-bg);

    /* Deutlicher Rahmen rundherum */
    border: 1px solid var(--dida-border);

    /* Stärkerer Schatten für "Karten-Effekt" */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);

    border-radius: 8px;
    margin-bottom: 40px;
    /* Genug Abstand zur nächsten Karte */
    overflow: hidden;
    /* Wichtig für abgerundete Ecken */
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   2. ARBEITSANWEISUNG KARTE (Header)
   ========================================= */
.dida-instruction {
    padding: 20px 25px;
    background-color: var(--dida-instruction-bg);
    border-bottom: 1px solid var(--dida-border);
    border-left: 6px solid var(--dida-instruction-bar);
    font-weight: 700;
    font-size: 1.2em;
    color: #333;
}

/* Fallback für ältere Komponenten */
.wc-instruction-display {
    padding: 20px 25px;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--dida-border);
    font-weight: 700;
    color: #555;
    font-size: 1.1em;
}

/* =========================================
   3. ÜBUNGSINHALT
   ========================================= */
.dida-exercise-content {
    padding: 30px;
    background-color: #fff;
    min-height: 150px;
    font-size: 1.1em;
    line-height: 1.6;
}

/* =========================================
   4. ACTION BAR (Feedback & Buttons)
   ========================================= */
.dida-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #f8f9fa;
    border-top: 1px solid var(--dida-border);
    min-height: 80px;
}

.dida-feedback-area {
    font-style: italic;
    color: #666;
    flex-grow: 1;
    padding-right: 20px;
}

.dida-controls {
    display: flex;
    gap: 15px;
}

/* Buttons */
.btn-dida-reset {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #666;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-dida-reset:hover {
    background-color: #f0f0f0;
    border-color: #999;
    color: #333;
}

.btn-dida-check {
    background-color: var(--dida-primary);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    transition: transform 0.1s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-dida-check:hover {
    background-color: var(--dida-primary-hover);
    transform: scale(1.05);
}

.btn-dida-check:active {
    transform: scale(0.95);
}

.btn-dida-check:disabled {
    background-color: var(--status-grey);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Feedback Messages */
.feedback-msg {
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    font-weight: 500;
}

.feedback-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.feedback-info {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* =========================================
   5. KOMPETENZ-FOOTER
   ========================================= */
.dida-competence-footer {
    background-color: #f1f3f5;
    padding: 12px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    color: #555;
    /* Damit es im Wrapper unten sauber abschliesst */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    margin-bottom: 20px;
}

.competence-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.green {
    background-color: var(--status-green);
    border: 1px solid #1e7e34;
}

.status-dot.yellow {
    background-color: var(--status-yellow);
    border: 1px solid #d39e00;
}

.status-dot.red {
    background-color: var(--status-red);
    border: 1px solid #bd2130;
}

.status-dot.grey {
    background-color: var(--status-grey);
    border: 1px solid #545b62;
}

/* NEU: Blau für "Eingereicht / Pending" */
.status-dot.blue {
    background-color: var(--dida-primary);
    /* #007bff */
    border: 1px solid var(--dida-primary-hover);
}

.btn-request-teacher-reset {
    background: #fff;
    border: 1px solid #ced4da;
    color: #6c757d;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-request-teacher-reset:hover {
    border-color: #adb5bd;
    color: #333;
    background-color: #e2e6ea;
}