/* --- Main Container --- */
.pathmojo-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    max-width: 700px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative; /* Added for progress bar */
    padding-top: 40px; /* Added for progress bar */
}

/* --- Progress Bar --- */
.pathmojo-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    overflow: hidden;
}
.pathmojo-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #007bff;
    transition: width 0.4s ease;
}
.pathmojo-progress-text {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.9em;
    font-weight: bold;
    color: #555;
}

/* --- Welcome & Stats Screens --- */
#course-welcome-screen,
#course-stats-screen {
    text-align: center;
}
#course-welcome-screen h2,
#course-stats-screen h2 {
    margin-top: 0;
}
#course-stats-results {
    font-size: 1.2em;
    line-height: 1.8;
}
#course-stats-results p {
    margin: 5px 0;
}

/* --- Step Content --- */
#course-step-content {
    min-height: 150px;
    line-height: 1.6;
    margin-bottom: 20px;
}
.step-content {
    margin-bottom: 25px;
}
.step-content ul {
    list-style: disc;
    padding-left: 25px;
}

/* --- Quiz Area --- */
.step-quiz {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
}
.step-quiz h4 {
    margin-top: 0;
    font-size: 1.1em;
}
.quiz-options label {
    display: block;
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}
.quiz-options label:hover {
    background: #f4f4f4;
}
.quiz-options input {
    margin-right: 10px;
}
.quiz-feedback {
    margin-top: 15px;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
}
.feedback-correct {
    color: #155724;
    background-color: #d4edda;
    display: block;
    padding: 10px;
}
.feedback-incorrect {
    color: #721c24;
    background-color: #f8d7da;
    display: block;
    padding: 10px;
}

/* --- Action Step --- */
.quiz-action-step {
    background: #e6f7ff;
    border: 1px solid #b3e0ff;
    border-left-width: 5px;
    border-left-color: #007bff;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
}
.quiz-action-step p:first-child {
    margin-top: 0;
}
.quiz-action-step p:last-child {
    margin-bottom: 0;
}

/* --- Navigation --- */
#course-navigation {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}
#course-footer {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* --- Buttons --- */
.pathmojo-container button {
    display: inline-block;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s, opacity 0.3s;
}
.pathmojo-container button:disabled {
    cursor: not-allowed;
}
.btn-primary { background: #007bff; }
.btn-primary:hover { background: #0056b3; }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #5a6268; }
.btn-info { background: #17a2b8; }
.btn-info:hover { background: #138496; }
.btn-danger { background: #dc3545; }
.btn-danger:hover { background: #c82333; }
#check-answer-btn {
    margin-top: 15px;
}
#check-answer-btn:disabled {
    background: #aaa;
    opacity: 0.7;
}

/* --- Utility --- */
.hidden {
    display: none;
}
/* --- Module Finale Modal --- */
#pathmojo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

#pathmojo-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    z-index: 1001;
    overflow: hidden;
}

#pathmojo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
}

#pathmojo-modal-header h2 {
    margin: 0;
    font-size: 1.3em;
}

#modal-close-btn {
    font-size: 1.8em;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    line-height: 1;
}
#modal-close-btn:hover {
    color: #000;
}

#pathmojo-modal-content {
    padding: 20px;
    line-height: 1.6;
}

#modal-action-content {
    /* This is where the quiz_action content will go */
    margin-top: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-left-width: 5px;
    border-left-color: #28a745;
    padding: 15px;
    border-radius: 5px;
}

#pathmojo-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    background: #f9f9f9;
}
#pathmojo-modal-footer button {
    margin-top: 0;
}
/*
--- Student Stats Shortcode [pathmojo_my_stats] ---
*/
.pathmojo-student-stats {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 20px 25px;
    border-radius: 8px;
    margin: 20px 0;
}

.pathmojo-student-stats h3 {
    margin-top: 0;
}

.pathmojo-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.pathmojo-stats-table th,
.pathmojo-stats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.pathmojo-stats-table th {
    background-color: #f0f0f0;
}

.pathmojo-stats-table td {
    background-color: #fff;
}

.pathmojo-stats-table .pathmojo-score-correct {
    color: #008a20;
    font-weight: 600;
}
.pathmojo-stats-table .pathmojo-score-incorrect {
    color: #d63638;
}