/**
 * Course Bundle Template Styles
 * 
 * @package Toluschool
 * @version 1.0.0
 */

/* Bundle Template Custom Styles */
:root {
    --primary-color: #3f51b5;
    --text-dark: #000;
    --text-light: #fff;
}

.stm-lms-wrapper {
    background: var(--text-light);
    min-height: 100vh;
    padding: 40px 0;
}

.container {
    position: relative;
}

.row {
    flex-wrap: wrap;
    align-items: flex-start;
}

.stm-lms-bundle-header {
    background: var(--text-light);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stm_lms_bundle__title {
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.stm_lms_bundle__image {
    text-align: center;
    margin: 20px 0;
}

.stm_lms_bundle__image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stm_lms_bundle__instructors {
    margin: 30px 0;
    padding: 20px;
    background: var(--primary-color);
    border-radius: 10px;
    color: var(--text-light);
}

.stm_lms_bundle__instructors h4 {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instructors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.instructor-item {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
}

.instructor-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.instructor-item:hover a{
    color: #fff;
}

.instructor-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-color);
}

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

.instructor-name {
    font-weight: 600;
}

.stm_lms_bundle__content {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.stm_lms_bundle__courses {
    background: var(--text-light);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stm_lms_bundle__courses h3 {
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.course-item {
    background: #f1f3f4;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.course-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.course-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.course-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-image img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.course-item:hover .course-image img {
    transform: scale(1.05);
}

.course-info {
    padding: 20px;
}

.course-title {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.course-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-meta > div {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.course-meta i {
    color: var(--primary-color);
    width: 16px;
}

.course-price {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Course Price Display Styles */
.course-price .price-display {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.course-price .sale-price {
    color: #d63638 !important;
    font-weight: 700;
    font-size: 16px;
}

.course-price .regular-price {
    color: #999 !important;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 400;
}

.course-price .current-price {
    color: var(--primary-color) !important;
    font-weight: 600;
    font-size: 16px;
}

.stm-lms-bundle__sidebar {
    background: var(--text-light);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    z-index: 10;
    scroll-behavior: smooth;
    align-self: flex-start;
}

.stm-lms-bundle__sidebar::-webkit-scrollbar {
    width: 6px;
}

.stm-lms-bundle__sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.stm-lms-bundle__sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.stm-lms-bundle__sidebar::-webkit-scrollbar-thumb:hover {
    background: #2c3e8a;
}

/* Ensure sticky positioning works properly */
@media (min-width: 768px) {
    .stm-lms-bundle__sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
        will-change: transform;
    }
}

/* Fallback for browsers that don't support sticky */
@supports not (position: sticky) {
    .stm-lms-bundle__sidebar {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 300px;
        max-width: calc(100vw - 40px);
    }
}

.bundle-pricing {
    margin-bottom: 30px;
    text-align: center;
}

.bundle-pricing h4 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.price-display {
    margin: 20px 0;
}

.current-price, .sale-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.regular-price {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
    display: block;
    margin-top: 5px;
}

.price-comparison {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.individual-price, .savings {
    display: block;
    margin: 5px 0;
    font-size: 0.9rem;
}

.savings {
    color: var(--primary-color);
    font-weight: 600;
}

.bundle-info {
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    color: var(--text-dark);
}

.info-item i {
    color: var(--primary-color);
    width: 20px;
}

.info-item.admin-only {
    background: #fff3cd;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ffeaa7;
}

.bundle-purchase {
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(63, 81, 181, 0.3);
    color: #fff;
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.3);
    color: #fff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .stm-lms-wrapper {
        padding: 20px 0;
    }
    
    .stm_lms_bundle__title {
        font-size: 2rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .instructors-list {
        flex-direction: column;
    }
    
    /* Mobile sidebar reordering - move sidebar to top */
    .row {
        display: flex;
        flex-direction: column;
    }
    
    .col-md-8 {
        order: 2;
    }
    
    .col-md-4 {
        order: 1;
    }
    
    .stm-lms-bundle__sidebar {
        position: static;
        margin-bottom: 30px;
        margin-top: 0;
        max-height: none;
        overflow-y: visible;
    }
    
    .btn-primary {
        position: sticky;
        bottom: 20px;
        z-index: 100;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    }
}

/* Success Message */
.bundle-success-message {
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}