/**
 * CreatorLMS Personnalised Frontend Styles
 */

/* Wrapper Styles */
.crlms-personnalise-wrapper {
    width: 100%;
}

.crlms-personnalise-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.crlms-personnalise-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #666;
}

/* Course Grid Styles */
.crlms-personnalise-courses {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.crlms-personnalise-courses.list-layout {
    grid-template-columns: 1fr;
}

/* Course Card Styles */
.crlms-personnalise-course-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.crlms-personnalise-course-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.crlms-personnalise-course-card .course-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.crlms-personnalise-course-card .course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.crlms-personnalise-course-card:hover .course-image img {
    transform: scale(1.05);
}

/* Badge Styles */
.crlms-personnalise-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.crlms-personnalise-course-card .course-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.crlms-personnalise-course-card .course-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.crlms-personnalise-course-card .course-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.crlms-personnalise-course-card .course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #888;
}

.crlms-personnalise-course-card .course-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.crlms-personnalise-course-card .course-meta-item i {
    font-size: 14px;
}

/* Price Styles */
.crlms-personnalise-course-card .course-price {
    font-size: 20px;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.crlms-personnalise-course-card .course-price .regular-price {
    text-decoration: line-through;
    color: #ccc;
    margin-right: 10px;
    font-weight: 400;
}

/* Button Styles */
.crlms-personnalise-button {
    background: #ff6b6b;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.crlms-personnalise-button:hover {
    background: #e55555;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Checkout Widget Styles */
.crlms-personnalise-checkout-wrapper {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.crlms-personnalise-checkout-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

.crlms-personnalise-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cart Items Styles */
.crlms-personnalise-cart-items {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.crlms-personnalise-cart-items h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* Order Summary Styles */
.crlms-personnalise-order-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.crlms-personnalise-order-summary h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table tr {
    border-bottom: 1px solid #eee;
}

.summary-table td {
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
}

.summary-table .total-row {
    border-bottom: none;
    font-weight: 700;
    padding-top: 15px;
    padding-bottom: 0;
}

/* Coupon Field Styles */
.crlms-personnalise-coupon-field {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.coupon-field {
    display: flex;
    gap: 10px;
}

.coupon-field label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

.coupon-field input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.apply-coupon {
    background: #333;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-coupon:hover {
    background: #555;
}

/* Billing Form Styles */
.crlms-personnalise-billing-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.billing-form h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Payment Methods Styles */
.crlms-personnalise-payment-methods {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.payment-methods h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.method-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.method-option input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.method-option label {
    cursor: pointer;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* Checkout Button Styles */
.crlms-personnalise-checkout-button {
    background: #ff6b6b;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.crlms-personnalise-checkout-button:hover {
    background: #e55555;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.crlms-personnalise-checkout-button:active {
    transform: scale(0.98);
}

/* Animation Styles */
.with-animations .crlms-personnalise-course-card {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
}

.with-animations .crlms-personnalise-course-card:nth-child(1) { animation-delay: 0.1s; }
.with-animations .crlms-personnalise-course-card:nth-child(2) { animation-delay: 0.2s; }
.with-animations .crlms-personnalise-course-card:nth-child(3) { animation-delay: 0.3s; }
.with-animations .crlms-personnalise-course-card:nth-child(4) { animation-delay: 0.4s; }
.with-animations .crlms-personnalise-course-card:nth-child(5) { animation-delay: 0.5s; }
.with-animations .crlms-personnalise-course-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .crlms-personnalise-courses {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .crlms-personnalise-courses {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .crlms-personnalise-course-card .course-image {
        height: 150px;
    }
    
    .crlms-personnalise-checkout-wrapper {
        padding: 20px;
    }
    
    .coupon-field {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .crlms-personnalise-courses {
        grid-template-columns: 1fr;
    }
    
    .crlms-personnalise-title {
        font-size: 24px;
    }
    
    .crlms-personnalise-course-card .course-content {
        padding: 15px;
    }
    
    .summary-table td {
        flex-direction: column;
    }
}
