/**
 * AEB LMS Frontend Styles
 */

/* Common */
.aeb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.aeb-btn-primary {
    background: #2563eb;
    color: #fff;
}

.aeb-btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.aeb-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.aeb-btn-secondary:hover {
    background: #e5e7eb;
}

.aeb-btn-block {
    display: flex;
    width: 100%;
}

.aeb-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.aeb-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.aeb-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.aeb-progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 4px;
    transition: width 0.3s;
}

.aeb-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.aeb-badge-free {
    background: #d1fae5;
    color: #065f46;
}

/* Courses Grid */
.aeb-courses-grid {
    display: grid;
    gap: 24px;
}

.aeb-columns-2 { grid-template-columns: repeat(2, 1fr); }
.aeb-columns-3 { grid-template-columns: repeat(3, 1fr); }
.aeb-columns-4 { grid-template-columns: repeat(4, 1fr); }

.aeb-course-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s, transform 0.2s;
}

.aeb-course-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.aeb-course-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.aeb-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aeb-course-thumbnail .aeb-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.aeb-no-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100%;
    height: 100%;
}

.aeb-course-content {
    padding: 16px;
}

.aeb-course-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.aeb-course-content h3 a {
    color: #111827;
    text-decoration: none;
}

.aeb-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #6b7280;
    font-size: 14px;
}

.aeb-course-footer {
    padding: 0 16px 16px;
}

/* Single Course */
.aeb-single-course-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.aeb-course-header {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-bottom: 40px;
}

.aeb-breadcrumb {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
}

.aeb-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.aeb-course-title {
    font-size: 32px;
    margin: 0 0 16px;
}

.aeb-course-excerpt {
    color: #4b5563;
    font-size: 18px;
    margin-bottom: 20px;
}

.aeb-course-thumbnail img {
    width: 100%;
    border-radius: 12px;
}

.aeb-enrolled-progress {
    margin-top: 20px;
}

.aeb-progress-text {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
}

.aeb-course-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.aeb-course-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.aeb-course-section h2 {
    margin: 0 0 20px;
    font-size: 22px;
}

/* Curriculum */
.aeb-curriculum-section {
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.aeb-section-header {
    padding: 16px;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aeb-section-header h3 {
    margin: 0;
    font-size: 16px;
}

.aeb-section-count {
    color: #6b7280;
    font-size: 14px;
}

.aeb-curriculum-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid #e5e7eb;
}

.aeb-curriculum-item.completed {
    background: #f0fdf4;
}

.aeb-item-icon svg {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.aeb-item-content {
    flex: 1;
}

.aeb-item-content a {
    color: #111827;
    text-decoration: none;
}

.aeb-item-content a:hover {
    color: #2563eb;
}

.aeb-item-locked {
    color: #9ca3af;
}

.aeb-item-status svg {
    width: 20px;
    height: 20px;
}

.aeb-item-status .completed-icon {
    color: #059669;
}

.aeb-item-status .locked-icon {
    color: #9ca3af;
}

/* Sidebar */
.aeb-enrollment-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
}

.aeb-enrolled-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
}

.aeb-enrolled-badge svg {
    width: 20px;
    height: 20px;
}

.aeb-course-price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.aeb-course-includes {
    margin-top: 24px;
}

.aeb-course-includes h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #6b7280;
}

.aeb-course-includes ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aeb-course-includes li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
}

.aeb-course-includes svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

/* Dashboard */
.aeb-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.aeb-dashboard-header {
    margin-bottom: 30px;
}

.aeb-user-welcome {
    display: flex;
    align-items: center;
    gap: 16px;
}

.aeb-user-welcome img {
    border-radius: 50%;
}

.aeb-user-welcome h2 {
    margin: 0;
}

.aeb-user-welcome p {
    margin: 4px 0 0;
    color: #6b7280;
}

.aeb-dashboard-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.aeb-dashboard-nav a {
    padding: 10px 20px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
}

.aeb-dashboard-nav a:hover,
.aeb-dashboard-nav a.active {
    background: #f3f4f6;
    color: #111827;
}

.aeb-overview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.aeb-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.aeb-stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #2563eb;
}

.aeb-stat-label {
    color: #6b7280;
    font-size: 14px;
}

.aeb-continue-courses {
    display: grid;
    gap: 16px;
}

.aeb-continue-card {
    display: flex;
    gap: 16px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.aeb-continue-thumbnail {
    width: 120px;
    flex-shrink: 0;
}

.aeb-continue-thumbnail img {
    width: 100%;
    border-radius: 8px;
}

.aeb-continue-content {
    flex: 1;
}

.aeb-continue-content h4 {
    margin: 0 0 10px;
}

.aeb-empty-state {
    text-align: center;
    padding: 40px;
    background: #f9fafb;
    border-radius: 12px;
}

/* Certificate Verify */
.aeb-certificate-verify {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.aeb-verify-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.aeb-verify-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.aeb-verify-result {
    padding: 24px;
    border-radius: 12px;
}

.aeb-verify-valid {
    background: #d1fae5;
}

.aeb-verify-invalid {
    background: #fee2e2;
}

.aeb-verify-result h3 {
    margin: 0 0 16px;
}

.aeb-verify-result table {
    width: 100%;
}

.aeb-verify-result th,
.aeb-verify-result td {
    padding: 8px;
    text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
    .aeb-columns-2,
    .aeb-columns-3,
    .aeb-columns-4 {
        grid-template-columns: 1fr;
    }

    .aeb-course-header {
        grid-template-columns: 1fr;
    }

    .aeb-course-layout {
        grid-template-columns: 1fr;
    }

    .aeb-overview-stats {
        grid-template-columns: 1fr;
    }

    .aeb-continue-card {
        flex-direction: column;
    }

    .aeb-continue-thumbnail {
        width: 100%;
    }
}
