/* PAP Frontend Styles */

/* General Styles */
.pap-schulungen,
.pap-quiz-liste,
.pap-quiz-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Intro Sections */
.pap-schulungen-intro,
.pap-quiz-liste-intro,
.pap-quiz-intro {
    text-align: center;
    margin-bottom: 40px;
}

.pap-schulungen-intro h2,
.pap-quiz-liste-intro h2,
.pap-quiz-intro h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.pap-schulungen-intro p,
.pap-quiz-liste-intro p {
    font-size: 18px;
    color: #7f8c8d;
}

/* Badges */
.pap-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pap-badge-easy {
    background: #28a745;
    color: white;
}

.pap-badge-medium {
    background: #ffc107;
    color: #000;
}

.pap-badge-hard {
    background: #dc3545;
    color: white;
}

/* Category Section */
.pap-category-section {
    margin-bottom: 50px;
}

.pap-category-title {
    font-size: 24px;
    color: #34495e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

/* Materials Grid */
.pap-materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.pap-material-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pap-material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.pap-material-header h4 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0 0 12px 0;
}

.pap-material-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.pap-time {
    color: #7f8c8d;
    font-size: 14px;
}

.pap-material-description {
    color: #5a6c7d;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.pap-material-footer {
    display: flex;
    justify-content: flex-end;
}

/* Quiz Grid */
.pap-quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.pap-quiz-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pap-quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.pap-quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.pap-quiz-header h4 {
    font-size: 22px;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.pap-quiz-description {
    color: #5a6c7d;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.pap-quiz-meta {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.pap-quiz-meta-item {
    padding: 8px 0;
    color: #495057;
    font-size: 14px;
}

.pap-quiz-meta-item strong {
    color: #212529;
}

.pap-quiz-footer {
    display: flex;
    justify-content: center;
}

/* Buttons */
.pap-button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.pap-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pap-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.pap-button-secondary {
    background: #6c757d;
    color: white;
}

.pap-button-secondary:hover {
    background: #5a6268;
    color: white;
}

.pap-button-success {
    background: #28a745;
    color: white;
}

.pap-button-success:hover {
    background: #218838;
    color: white;
}

.pap-button-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Modal */
.pap-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pap-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.pap-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e1e8ed;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pap-modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.pap-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.pap-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pap-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.pap-material-info {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.pap-material-content {
    line-height: 1.9;
    color: #2c3e50;
    font-size: 17px;
}

.pap-material-content h2 {
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 600;
}

.pap-material-content h3 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.pap-material-content p {
    margin-bottom: 15px;
    font-size: 17px;
    line-height: 1.8;
}

.pap-material-content ul,
.pap-material-content ol {
    padding-left: 30px;
    margin: 15px 0;
}

.pap-material-content li {
    margin: 10px 0;
    font-size: 17px;
    line-height: 1.7;
}

.pap-material-content strong {
    font-weight: 600;
    color: #1a1a1a;
}

/* Quiz Container */
.pap-quiz-info-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.pap-quiz-info-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pap-quiz-start-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Quiz Progress */
.pap-quiz-progress {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pap-quiz-progress-bar {
    flex: 1;
    min-width: 200px;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.pap-quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

.pap-quiz-progress-text,
.pap-quiz-timer {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

/* Question Container */
.pap-question-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pap-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.pap-question-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
}

.pap-question-points {
    background: #667eea;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.pap-question-text {
    font-size: 18px;
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 500;
}

/* Answer Options */
.pap-answer-options {
    margin-bottom: 30px;
}

.pap-answer-option {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.pap-answer-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.pap-answer-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.pap-answer-option input[type="radio"]:checked ~ .pap-option-text {
    font-weight: 600;
    color: #667eea;
}

.pap-answer-option input[type="radio"]:checked ~ .pap-option-indicator {
    background: #667eea;
    border-color: #667eea;
}

.pap-answer-option input[type="radio"]:checked ~ .pap-option-indicator::after {
    opacity: 1;
}

.pap-answer-option.correct {
    border-color: #28a745;
    background: #d4edda;
}

.pap-answer-option.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
}

.pap-option-text {
    flex: 1;
    padding-left: 35px;
    font-size: 16px;
    color: #495057;
    line-height: 1.5;
}

.pap-option-indicator {
    position: absolute;
    left: 20px;
    width: 20px;
    height: 20px;
    border: 2px solid #ced4da;
    border-radius: 50%;
    background: white;
    transition: all 0.3s;
}

.pap-option-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Question Explanation */
.pap-question-explanation {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #2196f3;
}

.pap-question-explanation h4 {
    margin: 0 0 10px 0;
    color: #1976d2;
}

.pap-question-explanation p {
    margin: 0;
    color: #0d47a1;
    line-height: 1.6;
}

/* Question Navigation */
.pap-question-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

/* Quiz Result */
#pap-quiz-result {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pap-result-score {
    font-size: 72px;
    font-weight: 700;
    margin: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pap-result-message {
    font-size: 24px;
    margin-bottom: 20px;
}

.pap-result-details {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: left;
}

.pap-result-item {
    padding: 12px 0;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
}

.pap-result-item:last-child {
    border-bottom: none;
}

.pap-result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Notices */
.pap-notice {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.pap-notice-info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.pap-notice-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.pap-notice-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* Material Confirmation */
.pap-material-confirmation {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 8px;
    text-align: center;
}

.pap-confirmation-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.pap-confirmation-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #667eea;
}

.pap-confirm-button {
    margin-top: 15px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
    pointer-events: none;
}

.pap-confirm-button.enabled {
    opacity: 1;
    pointer-events: all;
}

.pap-confirm-button.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .pap-materials-grid,
    .pap-quiz-grid {
        grid-template-columns: 1fr;
    }

    .pap-quiz-info-box {
        grid-template-columns: 1fr;
    }

    .pap-quiz-progress {
        flex-direction: column;
    }

    .pap-quiz-start-buttons,
    .pap-question-navigation,
    .pap-result-actions {
        flex-direction: column;
    }

    .pap-button {
        width: 100%;
    }
}
