/**
 * E-Learning Quiz System - Shortcodes CSS
 * Styles for e-learning shortcodes (loan calculator removed)
 * Greek language support with UTF-8
 */

@charset "UTF-8";

/* Greek font stack for better readability */
:lang(el) .embedded-lesson,
:lang(el-GR) .embedded-lesson,
:lang(el) .embedded-quiz,
:lang(el-GR) .embedded-quiz {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* === EMBEDDED LESSON/QUIZ STYLES === */
.embedded-lesson,
.embedded-quiz {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.embedded-lesson:hover,
.embedded-quiz:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.lesson-header,
.quiz-header {
    margin-bottom: 16px;
}

.lesson-title,
.quiz-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.lesson-title a,
.quiz-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lesson-title a:hover,
.quiz-title a:hover {
    color: #667eea;
}

.quiz-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
}

.quiz-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lesson-progress-indicator {
    margin-top: 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.lesson-excerpt,
.quiz-description {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
}

.lesson-actions,
.quiz-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.lesson-btn,
.quiz-btn,
.quiz-start-btn,
.lesson-link-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.lesson-btn,
.quiz-start-btn {
    background: #667eea;
    color: white;
}

.lesson-btn:hover,
.quiz-start-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.quiz-btn,
.lesson-link-btn {
    background: white;
    color: #667eea;
    border-color: #667eea;
}

.quiz-btn:hover,
.lesson-link-btn:hover {
    background: #667eea;
    color: white;
}

.lesson-btn.loading,
.quiz-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Quiz Stats Summary */
.quiz-stats-summary {
    background: #f9fafb;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.stats-mini {
    display: flex;
    justify-content: space-around;
    gap: 16px;
    font-size: 14px;
}

.stats-mini span {
    color: #4b5563;
}

/* === LESSON FEED STYLES === */
.elearning-lesson-feed {
    margin: 30px 0;
}

/* Grid Layout with proper columns */
.elearning-lesson-feed.layout-grid {
    width: 100%;
}

.elearning-lesson-feed .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.elearning-lesson-feed .lesson-feed-column {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
}

/* Ensure equal height cards */
.lesson-feed-item {
    height: 100%;
}

.lesson-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.lesson-card-image {
    position: relative;
    overflow: hidden;
    padding-top: 60%; /* 5:3 Aspect Ratio */
}

.lesson-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lesson-card:hover .lesson-card-image img {
    transform: scale(1.05);
}

.lesson-completed-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #22c55e;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.lesson-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lesson-card-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
}

.lesson-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lesson-card-title a:hover {
    color: var(--wd-primary-color, #3b82f6);
}

.lesson-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
}

.lesson-meta i {
    margin-right: 5px;
}

.lesson-excerpt {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* Greek text adjustments for excerpts */
:lang(el) .lesson-excerpt,
:lang(el-GR) .lesson-excerpt,
:lang(el) .quiz-description,
:lang(el-GR) .quiz-description {
    line-height: 1.7;
}

.lesson-progress-bar {
    margin-bottom: 20px;
}

.lesson-progress-bar .progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.lesson-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    transition: width 0.5s ease;
}

.lesson-progress-bar .progress-text {
    font-size: 12px;
    color: #6b7280;
    display: block;
    text-align: right;
}

.lesson-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.lesson-card-actions .button {
    flex: 1;
    text-align: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lesson-card-actions .lesson-btn {
    background: var(--wd-primary-color, #3b82f6);
    color: white;
}

.lesson-card-actions .lesson-btn:hover {
    background: var(--wd-primary-color-hover, #2563eb);
    color: white;
}

.lesson-card-actions .quiz-btn {
    background: white;
    color: var(--wd-primary-color, #3b82f6);
    border: 2px solid var(--wd-primary-color, #3b82f6);
}

.lesson-card-actions .quiz-btn:hover {
    background: var(--wd-primary-color, #3b82f6);
    color: white;
}

/* List layout */
.elearning-lesson-feed.layout-list .lesson-feed-item {
    margin-bottom: 20px;
}

.elearning-lesson-feed.layout-list .lesson-card {
    flex-direction: row;
}

.elearning-lesson-feed.layout-list .lesson-card-image {
    width: 300px;
    padding-top: 0;
    height: auto;
}

.elearning-lesson-feed.layout-list .lesson-card-content {
    flex: 1;
}

/* Bootstrap-style column classes */
.col-12 {
    width: 100%;
}

@media (min-width: 576px) {
    .col-sm-6 {
        width: 50%;
    }
}

@media (min-width: 768px) {
    .col-md-4 {
        width: 33.333333%;
    }
    .col-md-6 {
        width: 50%;
    }
}

@media (min-width: 992px) {
    .col-lg-2 {
        width: 16.666667%;
    }
    .col-lg-3 {
        width: 25%;
    }
    .col-lg-4 {
        width: 33.333333%;
    }
    .col-lg-6 {
        width: 50%;
    }
}

/* Pagination */
.elearning-pagination {
    margin-top: 40px;
    text-align: center;
}

.elearning-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 10px;
}

.elearning-pagination li {
    display: inline-block;
}

.elearning-pagination a,
.elearning-pagination span {
    display: block;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
}

.elearning-pagination a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.elearning-pagination .current {
    background: var(--wd-primary-color, #3b82f6);
    color: white;
    border-color: var(--wd-primary-color, #3b82f6);
}

/* WoodMart compatibility - spacing */
.wd-spacing-20 > div {
    padding-left: 10px;
    padding-right: 10px;
}

.wd-spacing-20 {
    margin-left: -10px;
    margin-right: -10px;
}

/* Ensure proper box sizing */
.elearning-lesson-feed * {
    box-sizing: border-box;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .lesson-card-content {
        padding: 20px;
    }
    
    .lesson-card-actions {
        flex-direction: column;
    }
    
    .elearning-lesson-feed.layout-list .lesson-card {
        flex-direction: column;
    }
    
    .elearning-lesson-feed.layout-list .lesson-card-image {
        width: 100%;
        padding-top: 60%;
    }
}

/* Clear floats */
.elearning-lesson-feed .row::after {
    content: "";
    display: table;
    clear: both;
}

/* === QUIZ FEED STYLES === */
.elearning-quiz-feed {
    margin: 30px 0;
}

/* Grid Layout */
.elearning-quiz-feed-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -10px !important;
    margin-right: -10px !important;
}

.elearning-quiz-feed .quiz-grid-item {
    padding: 0 10px !important;
    margin-bottom: 20px !important;
}

/* Quiz Card */
.quiz-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

/* Locked state */
.quiz-feed-item.locked .quiz-card {
    opacity: 0.8;
}

.quiz-feed-item.locked .quiz-card:hover {
    transform: none;
}

/* Quiz Image */
.quiz-card-image {
    position: relative;
    overflow: hidden;
    padding-top: 60%;
}

.quiz-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.quiz-card:hover .quiz-card-image img {
    transform: scale(1.05);
}

/* Badges */
.quiz-passed-badge,
.quiz-locked-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.quiz-passed-badge {
    background: #fbbf24;
    color: #92400e;
}

.quiz-locked-badge {
    background: #6b7280;
    color: white;
}

/* Quiz Content */
.quiz-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quiz-card-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
}

.quiz-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.quiz-card-title a:hover {
    color: var(--wd-primary-color, #3b82f6);
}

/* Quiz Meta */
.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
}

.quiz-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quiz-meta i {
    font-size: 12px;
}

/* Quiz Excerpt */
.quiz-excerpt {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Quiz Stats */
.quiz-user-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 14px;
}

.quiz-user-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quiz-user-stats .best-score {
    color: #fbbf24;
}

/* Locked Notice */
.quiz-locked-notice {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Quiz Actions */
.quiz-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.quiz-card-actions .button {
    flex: 1;
    text-align: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quiz-card-actions .quiz-btn {
    background: var(--wd-primary-color, #3b82f6);
    color: white;
}

.quiz-card-actions .quiz-btn:hover {
    background: var(--wd-primary-color-hover, #2563eb);
    color: white;
}

.quiz-card-actions .lesson-btn,
.quiz-card-actions .lesson-link-btn {
    background: white;
    color: var(--wd-primary-color, #3b82f6);
    border: 2px solid var(--wd-primary-color, #3b82f6);
}

.quiz-card-actions .lesson-btn:hover,
.quiz-card-actions .lesson-link-btn:hover {
    background: var(--wd-primary-color, #3b82f6);
    color: white;
}

/* List Layout */
.elearning-quiz-feed.layout-list .quiz-feed-item {
    margin-bottom: 20px;
}

.elearning-quiz-feed.layout-list .quiz-card {
    flex-direction: row;
}

.elearning-quiz-feed.layout-list .quiz-card-image {
    width: 300px;
    padding-top: 0;
    height: 200px;
}

.elearning-quiz-feed.layout-list .quiz-card-content {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-card-content {
        padding: 20px;
    }
    
    .quiz-meta {
        font-size: 12px;
    }
    
    .quiz-card-actions {
        flex-direction: column;
    }
    
    .elearning-quiz-feed.layout-list .quiz-card {
        flex-direction: column;
    }
    
    .elearning-quiz-feed.layout-list .quiz-card-image {
        width: 100%;
        padding-top: 60%;
        height: auto;
    }
}

/* === QUIZ STATISTICS WIDGET === */
.quiz-statistics {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
}

.quiz-statistics h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 6px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

/* Greek - no uppercase for stat labels */
:lang(el) .stat-label,
:lang(el-GR) .stat-label {
    text-transform: none;
    letter-spacing: normal;
    font-size: 13px;
}

/* Detailed Stats */
.detailed-stats {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row .stat-label {
    color: #4b5563;
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    color: #1f2937;
}

/* === USER PROGRESS WIDGET === */
.user-progress-widget {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
}

.user-progress-widget h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.progress-section {
    margin-bottom: 24px;
}

.progress-section:last-child {
    margin-bottom: 0;
}

.progress-section h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Greek - no uppercase for section headers */
:lang(el) .progress-section h5,
:lang(el-GR) .progress-section h5 {
    text-transform: none;
    letter-spacing: normal;
    font-size: 15px;
}

.progress-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.progress-item:hover {
    background: #f3f4f6;
}

.progress-item.passed {
    border-left: 4px solid #10b981;
}

.progress-item.failed {
    border-left: 4px solid #ef4444;
}

.progress-item.completed {
    border-left: 4px solid #10b981;
}

.progress-item.in-progress {
    border-left: 4px solid #f59e0b;
}

.item-title {
    font-weight: 500;
    color: #1f2937;
    flex: 1;
}

.item-status,
.item-progress {
    font-size: 14px;
    color: #6b7280;
}

/* === ERROR AND NOTICE STYLES === */
.elearning-error,
.elearning-notice {
    padding: 16px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

.elearning-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.elearning-notice {
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .embedded-lesson,
    .embedded-quiz,
    .quiz-statistics,
    .user-progress-widget {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .quiz-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* === PRINT STYLES === */
@media print {
    .lesson-btn,
    .quiz-btn {
        display: none;
    }
}

/* === ACCESSIBILITY === */
.embedded-lesson *:focus,
.embedded-quiz *:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .embedded-lesson,
    .embedded-quiz {
        border: 2px solid #1f2937;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}