/* Project Days Manager - Frontend Styles */

/* Teacher Dashboard Styles */
.pdm-teacher-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pdm-teacher-dashboard h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.pdm-teacher-dashboard h3 {
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
}

.pdm-class-info {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.pdm-class-info h3 {
    margin-top: 0;
    color: #2c3e50;
}

.pdm-download-section {
    margin-top: 15px;
}

.pdm-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.pdm-form-row .pdm-form-group {
    flex: 1;
}

.pdm-button {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.1s;
}

.pdm-button:hover {
    transform: translateY(-1px);
}

.pdm-button-primary {
    background-color: #3498db;
    color: #fff;
}

.pdm-button-primary:hover {
    background-color: #2980b9;
}

.pdm-button-small {
    padding: 5px 12px;
    font-size: 13px;
    background-color: #e74c3c;
    color: #fff;
}

.pdm-button-small:hover {
    background-color: #c0392b;
}

.pdm-button .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

.pdm-add-student-form {
    background: #fff;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.pdm-students-list {
    background: #fff;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pdm-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.pdm-table thead {
    background-color: #34495e;
    color: #fff;
}

.pdm-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.pdm-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
}

.pdm-table tbody tr:hover {
    background-color: #f8f9fa;
}

.pdm-table td {
    padding: 12px;
}

.pdm-form-actions {
    margin-top: 20px;
}

.pdm-table-wishes td {
    font-size: 13px;
}

.pdm-table-wishes .has-wishes {
    background-color: #f0f9ff;
}

.pdm-table-wishes .no-wishes {
    background-color: #fff3cd;
}

.wish-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: #007bff;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-wish {
    color: #999;
    font-style: italic;
}

.pdm-wishes-summary {
    margin-top: 15px;
    padding: 15px;
    background-color: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.pdm-wishes-summary p {
    margin: 0;
    font-size: 14px;
}

@media (max-width: 768px) {
    .pdm-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .pdm-table {
        font-size: 12px;
    }
    
    .pdm-table th,
    .pdm-table td {
        padding: 8px;
    }
}


.pdm-login-form,
.pdm-project-selection,
.pdm-student-assignment {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pdm-login-form h3,
.pdm-project-selection h3,
.pdm-student-assignment h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.pdm-form-group {
    margin-bottom: 20px;
}

.pdm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.pdm-form-group input[type="text"],
.pdm-form-group input[type="password"],
.pdm-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.pdm-form-group input[type="text"]:focus,
.pdm-form-group input[type="password"]:focus,
.pdm-form-group select:focus {
    outline: none;
    border-color: #007bff;
}

.pdm-submit-btn {
    background-color: #007bff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.pdm-submit-btn:hover {
    background-color: #0056b3;
}

.pdm-logout-btn {
    background-color: #6c757d;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pdm-logout-btn:hover {
    background-color: #545b62;
}

.pdm-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.pdm-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.pdm-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.pdm-notice {
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid;
    border-radius: 5px;
}

.pdm-notice-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.pdm-notice-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.pdm-notice-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.pdm-notice-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.pdm-login-status {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdm-student-info {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.pdm-projects-info {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ddd;
}

.pdm-projects-info h4 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.pdm-project-item {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.pdm-project-item h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
}

.pdm-project-item p {
    margin: 10px 0;
    color: #666;
    line-height: 1.6;
}

.pdm-project-meta {
    font-size: 14px;
    color: #888;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.pdm-assignment-result {
    margin-top: 30px;
}

.pdm-assignment-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.pdm-assignment-box h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pdm-assignment-box h2 {
    margin: 0 0 20px 0;
    font-size: 36px;
    font-weight: bold;
}

.pdm-choice-info {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    margin: 20px 0;
    font-size: 16px;
}

.pdm-choice-info.pdm-choice-1 {
    background-color: rgba(40, 167, 69, 0.9);
}

.pdm-choice-info.pdm-choice-2 {
    background-color: rgba(255, 193, 7, 0.9);
}

.pdm-choice-info.pdm-choice-3 {
    background-color: rgba(253, 126, 20, 0.9);
}

.pdm-choice-info.pdm-choice-0 {
    background-color: rgba(220, 53, 69, 0.9);
}

.pdm-project-description {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
}

.pdm-project-description h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.pdm-project-description p {
    margin: 0;
    line-height: 1.8;
    font-size: 16px;
}

.pdm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: pdm-spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes pdm-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdm-login-form,
    .pdm-project-selection,
    .pdm-student-assignment {
        padding: 20px;
        margin: 10px;
    }
    
    .pdm-login-form h3,
    .pdm-project-selection h3,
    .pdm-student-assignment h3 {
        font-size: 20px;
    }
    
    .pdm-assignment-box {
        padding: 30px 20px;
    }
    
    .pdm-assignment-box h2 {
        font-size: 28px;
    }
    
    .pdm-login-status {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* ================================================================
   Zuordnungswahrscheinlichkeit – GNKW-Formel Farbkodierung
   Grün ≥70% · Gelb 40–69% · Orange 20–39% · Rot <20%
   ================================================================ */

/* Gesamtwahrscheinlichkeits-Box oben */
.pdm-prob-summary {
    margin: 0 0 20px 0;
    padding: 14px 20px;
    background: #f0f4ff;
    border: 1px solid #c5d3f5;
    border-radius: 8px;
}

.pdm-prob-summary-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.pdm-prob-summary-label {
    font-weight: 700;
    color: #2c3e50;
    font-size: 14px;
    white-space: nowrap;
}

.pdm-prob-summary-hint {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.pdm-prob-total-badge {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Wahrscheinlichkeits-Indikator unter jedem Dropdown */
.pdm-prob-indicator {
    margin-top: 6px;
    min-height: 0;
    transition: all 0.3s ease;
}

/* Basis-Badge (klein, unter Dropdown) */
.pdm-prob-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.pdm-prob-badge .pdm-prob-icon {
    font-size: 15px;
    line-height: 1;
}

.pdm-prob-badge .pdm-prob-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.pdm-prob-badge .pdm-prob-pct {
    font-size: 15px;
    font-weight: 800;
}

.pdm-prob-badge .pdm-prob-label {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Fortschrittsbalken */
.pdm-prob-bar-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}

.pdm-prob-bar-bg {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.pdm-prob-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Farbstufen */
.pdm-prob-high {
    background: #d4edda;
    color: #155724;
    border-color: #b8dfc4;
}
.pdm-prob-high .pdm-prob-bar-fill { background: #28a745; }

.pdm-prob-medium {
    background: #fff3cd;
    color: #856404;
    border-color: #fde58a;
}
.pdm-prob-medium .pdm-prob-bar-fill { background: #ffc107; }

.pdm-prob-low {
    background: #ffe8cc;
    color: #7a4100;
    border-color: #ffc87a;
}
.pdm-prob-low .pdm-prob-bar-fill { background: #fd7e14; }

.pdm-prob-very-low {
    background: #f8d7da;
    color: #721c24;
    border-color: #f1b0b7;
}
.pdm-prob-very-low .pdm-prob-bar-fill { background: #dc3545; }

/* Große Badge für Gesamtwahrscheinlichkeit */
.pdm-prob-total-badge.pdm-prob-high  { color: #155724; }
.pdm-prob-total-badge.pdm-prob-medium { color: #856404; }
.pdm-prob-total-badge.pdm-prob-low    { color: #7a4100; }
.pdm-prob-total-badge.pdm-prob-very-low { color: #721c24; }

/* Nachfrage-Anzeige in der Projektliste */
.pdm-project-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.pdm-project-meta-row .pdm-project-meta {
    margin: 0;
    border-top: none;
    padding-top: 0;
    flex: 0 0 auto;
}

.pdm-project-demand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.pdm-demand-label {
    font-weight: 600;
    color: #555;
    margin-right: 2px;
}

.pdm-demand-item {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.pdm-demand-1 {
    background: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

.pdm-demand-2 {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.pdm-demand-3 {
    background: #fce4ec;
    color: #880e4f;
    border: 1px solid #f8bbd0;
}

@media (max-width: 768px) {
    .pdm-prob-summary-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .pdm-project-meta-row {
        flex-direction: column;
        gap: 8px;
    }
}

/* Print Styles */
@media print {
    .pdm-submit-btn,
    .pdm-logout-btn,
    .pdm-projects-info {
        display: none !important;
    }
    
    .pdm-assignment-box {
        background: #f8f9fa;
        color: #333;
        border: 2px solid #007bff;
    }
    
    .pdm-choice-info {
        border: 2px solid #333;
    }
}