/* Hocmate Course Outline Widget Default Styles */
.hocmate-course-widget {
    font-family: 'Be Vietnam Pro', sans-serif;
    color: #1A103C;
}
.hocmate-course-widget * {
    box-sizing: border-box;
}

/* Header */
.fco-course-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #F3F4F6;
}
.fco-course-logo img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.fco-course-title {
    font-size: 2.25rem;
    margin: 0 0 1rem;
    font-weight: 700;
    line-height: 1.3;
}
.fco-course-description {
    font-size: 1.05rem;
    margin: 1.5rem 0;
    line-height: 1.6;
    color: #4B5563;
}
.fco-course-stats {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.fco-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #6B7280;
}
.fco-stat strong {
    color: #1A103C;
    font-size: 1.1rem;
}
.fco-stat svg {
    color: #6C3AED;
}
.fco-course-instructor {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}
.fco-course-instructor img {
    border-radius: 50%;
}

/* Curriculum */
.fco-curriculum-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}
.fco-section {
    margin-bottom: 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.fco-section-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #F9FAFB;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}
.fco-section-header:hover {
    background: #F3F4F6;
}
.fco-section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}
.fco-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: #6C3AED;
}
.fco-section-header[aria-expanded="false"] .fco-chevron {
    transform: rotate(-90deg);
}
.fco-section-title {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}
.fco-section-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    color: #6B7280;
}

.fco-lessons-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    max-height: 2500px;
    transition: max-height 0.3s ease-in-out;
}
.fco-section-header[aria-expanded="false"] + .fco-lessons-list {
    max-height: 0;
}
.fco-lesson-item {
    border-top: 1px solid #E5E7EB;
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.fco-lesson-item::before,
.fco-lesson-item::after,
.fco-lesson-item::marker {
    content: none !important;
    display: none !important;
}
.fco-lesson-link, .fco-lesson-locked {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #fff;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
    border: none;
    cursor: pointer;
    text-align: left;
}
.fco-lesson-link:hover {
    background: #F9FAFB;
}
.fco-lesson-locked {
    cursor: not-allowed;
    opacity: 0.8;
}
.fco-lesson-locked:hover {
    background: #FEF3C7;
}
.fco-lesson-thumbnail {
    flex-shrink: 0;
    width: 140px;
    height: 78px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #E5E7EB;
    position: relative;
    overflow: hidden;
}
.fco-lesson-locked .fco-lesson-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.4);
}

/* Lesson Title and Tags Layout */
.fco-lesson-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}
.fco-lesson-title-area {
    display: block;
}
.fco-lesson-title {
    color: #1A103C;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fco-lesson-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.fco-lesson-duration {
    color: #4B5563;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}
.fco-lesson-duration svg {
    color: #2563EB; /* Match user icon color */
    width: 14px;
    height: 14px;
}
.fco-lesson-tags {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Badges */
.fco-badge {
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.fco-badge-free {
    background: linear-gradient(135deg, #FACC15 0%, #EAB308 100%);
    color: #1A103C;
}
.fco-badge-premium {
    background: transparent;
    border: 1px solid #E5E7EB;
    color: #4B5563;
}
.fco-badge-premium svg {
    color: #FACC15;
    width: 14px;
    height: 14px;
}

/* Modal */
.fco-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fco-modal[hidden] {
    display: none !important;
}
.fco-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 16, 60, 0.7);
    backdrop-filter: blur(5px);
}
.fco-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: fcoSlidin 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes fcoSlidin {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.fco-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.fco-modal-close:hover {
    color: #1A103C;
}
.fco-modal-icon-large {
    color: #6C3AED;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}
.fco-modal-icon-large svg {
    width: 64px;
    height: 64px;
}
.fco-modal-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1A103C;
    font-weight: 700;
}
.fco-modal-text {
    color: #4B5563;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.fco-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-direction: column;
}

.fco-btn-enroll, .fco-btn-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}
.fco-btn-enroll {
    background: #6C3AED;
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 58, 237, 0.3);
}
.fco-btn-enroll:hover {
    background: #5A2DC6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 58, 237, 0.4);
    color: #fff;
}
.fco-btn-secondary {
    background: #F3F4F6;
    color: #1A103C;
}
.fco-btn-secondary:hover {
    background: #E5E7EB;
}

/* Mobile Responsiveness (Crucial Fix) */
@media (max-width: 768px) {
    .fco-course-title {
        font-size: 1.75rem;
    }
    .fco-course-stats {
        gap: 1rem;
        flex-direction: column;
    }
    .fco-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    .fco-section-title-wrapper {
        width: 100%;
    }
    .fco-section-meta {
        width: 100%;
        justify-content: flex-start;
        padding-left: 1.75rem;
    }
    .fco-lesson-link, .fco-lesson-locked {
        padding: 1rem;
    }
    .fco-lesson-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .fco-lesson-tags {
        /* Move tags below the title on mobile */
        align-self: flex-start;
    }
}
