/**
 * Product-Course Integration Styles
 * Styles for displaying course information on WooCommerce product pages
 */

/* Course Product Layout */
.course-product-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.course-summary {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .course-summary {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Course Content */
.course-summary-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.course-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.2;
}

.course-categories {
    margin-bottom: 15px;
}

.course-category {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 8px;
    margin-bottom: 5px;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-rating-stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 1.2rem;
}

.star.filled {
    color: #ffc107;
}

.course-rating-text {
    color: #666;
    font-size: 0.9rem;
}

/* Course Description */
.course-description {
    margin-bottom: 30px;
}

.course-description h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.course-description p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

/* Course Curriculum Styles */
.course-curriculum {
    margin-bottom: 30px;
}

.course-curriculum h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.curriculum-sections {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.curriculum-section {
    border-bottom: 1px solid #e0e0e0;
}

.curriculum-section:last-child {
    border-bottom: none;
}

.section-header {
    background: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.section-header:hover {
    background: #e9ecef;
}

.section-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wrapper-section-title {
    flex: 1;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.section-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.section-toggle {
    color: #666;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.section-toggle .lp-icon-caret-up {
    display: none;
}

.curriculum-section.expanded .section-toggle .lp-icon-caret-down {
    display: none;
}

.curriculum-section.expanded .section-toggle .lp-icon-caret-up {
    display: inline;
}

.section-content {
    display: none;
    padding: 0;
}

.curriculum-section.expanded .section-content {
    display: block;
}

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

.course-item {
    border-bottom: 1px solid #f0f0f0;
}

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

.section-item-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.section-item-link:hover {
    background: #f8f9fa;
    color: #007cba;
}

.course-item-info {
    flex: 1;
}

.item-name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.course-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-meta {
    font-size: 12px;
    color: #666;
    display: inline-flex;
    align-items: center;
}

.item-meta.item-type {
    font-size: 16px;
}

.item-meta.course-item-preview {
    color: #28a745;
    font-size: 14px;
}

.item-meta.duration {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

/* Item type specific styles */
.course-item.item-lp_lesson .section-item-link {
    border-left: 3px solid #007cba;
}

.course-item.item-lp_quiz .section-item-link {
    border-left: 3px solid #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-header {
        padding: 12px 15px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .section-item-link {
        padding: 10px 15px;
    }
    
    .course-item-meta {
        gap: 6px;
    }
}

/* Course Instructor Styles */
.course-instructor {
    margin-bottom: 30px;
}

.course-instructor h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.instructor-info {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.instructor-avatar {
    flex-shrink: 0;
}

.instructor-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.instructor-details {
    flex: 1;
}

.instructor-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.instructor-name a {
    color: #333;
    text-decoration: none;
}

.instructor-name a:hover {
    color: #007cba;
}

.instructor-bio {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.instructor-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 14px;
    color: #666;
}

.stat-item strong {
    color: #333;
    font-weight: 600;
}

/* Course Reviews Styles */
.course-reviews {
    margin-bottom: 30px;
}

.course-reviews h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.course-rating-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.rating-average {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-number {
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    font-size: 18px;
    color: #ddd;
}

.rating-stars i.filled {
    color: #ffc107;
}

.rating-stars i.half-filled {
    color: #ffc107;
}

.rating-count {
    font-size: 14px;
    color: #666;
}

.course-featured-review {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.featured-review__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.featured-review__stars {
    display: flex;
    gap: 2px;
    margin-bottom: 15px;
}

.featured-review__stars i {
    font-size: 16px;
    color: #ffc107;
}

.featured-review__content {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.featured-review__content p {
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .instructor-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .instructor-stats {
        justify-content: center;
    }
    
    .rating-average {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Course Sidebar */
.course-summary-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.course-image {
    margin-bottom: 25px;
}

.course-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Course Meta */
.course-meta {
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.meta-label {
    font-weight: 600;
    color: #333;
}

.meta-value {
    color: #666;
}

/* Course Purchase */
.course-purchase {
    text-align: center;
}

.course-price {
    margin-bottom: 20px;
}

.course-price .price {
    font-size: 2rem;
    font-weight: 700;
    color: #e74c3c;
}

.course-purchase-button {
    margin-bottom: 15px;
}

.course-purchase-button .single_add_to_cart_button {
    width: 100%;
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.course-purchase-button .single_add_to_cart_button:hover {
    background: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .course-product-layout {
        padding: 15px;
    }
    
    .course-summary-content,
    .course-summary-sidebar {
        padding: 20px;
    }
    
    .course-title {
        font-size: 2rem;
    }
    
    .instructor-info {
        flex-direction: column;
        text-align: center;
    }
    
    .course-review {
        flex-direction: column;
        gap: 10px;
    }
    
    .review-author {
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .course-summary-content,
    .course-summary-sidebar {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .course-title,
    .course-instructor h3,
    .course-curriculum h3,
    .course-reviews h3,
    .course-description h3 {
        color: #ecf0f1;
    }
    
    .section-title {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .section-item:hover {
        background-color: #34495e;
    }
}