/* Common Component Styles */

/* Modern Course card styles - Image extends below container */
.course-card {
    position: relative;
    margin-bottom: 80px; /* Space for extended image */
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-8px);
}

.course-card:hover .course-img {
    transform: scaleY(0.75) scale(1.05);
}

.course-card:hover .course-content {
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.course-header {
    height: 320px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.course-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    transform: scaleY(0.75);
    transform-origin: top;
}

.course-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.1));
    z-index: 1;
}

.course-overlay {
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
    z-index: 2;
    color: white;
    text-align: right;
}

.course-overlay h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
    line-height: 1.2;
}

.course-overlay .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.course-overlay .price-overlay {
    position: absolute;
    bottom: -160px;
    left: 0;
    background: #17a2b8;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.course-content {
    background: white;
    border-radius: 15px;
    margin-top: -60px;
    margin-left: 15px;
    margin-right: 15px;
    padding: 25px 20px 20px 20px;
    position: relative;
    z-index: 3;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.course-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.course-title .check-icon {
    color: #28a745;
    font-size: 1.2rem;
}

.course-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    padding: 0;
    gap: 10px;
}

.stat-item {
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.stat-item .material-symbols-outlined {
    font-size: 1.1rem;
    margin-left: 4px;
    vertical-align: middle;
}

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

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #495057;
}

.feature-item .check-icon {
    color: #28a745;
    margin-left: 8px;
    font-size: 1.1rem;
}

.course-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.course-price .currency {
    font-size: 0.8em;
    color: #6c757d;
}

.course-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-outline-primary {
    background: transparent;
    color: #17a2b8;
    border: 2px solid #17a2b8;
}

.btn-outline-primary:hover {
    background: #17a2b8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23,162,184,0.3);
}

.btn-success-modern {
    background: #17a2b8;
    color: white;
    border: 2px solid #17a2b8;
}

.btn-success-modern:hover {
    background: #138496;
    border-color: #138496;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23,162,184,0.4);
}

.course-info-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #6c757d;
    gap: 8px;
}

.course-info-row .material-symbols-outlined {
    font-size: 1.1rem;
    margin-left: 4px;
}

.course-bottom-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.price-tag {
    background: #17a2b8;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(23,162,184,0.2);
}

.course-grade-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.95);
    color: #2c3e50;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 3;
}

.balance-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.expiry-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-align: center;
}

.expiry-info.expired {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.course-default-bg-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.course-default-bg-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.course-default-bg-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.course-default-bg-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.course-default-bg-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.course-default-bg-6 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.course-default-content {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.course-default-icon {
    opacity: 0.9;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

/* Mobile responsive adjustments for courses */
@media (max-width: 768px) {
    .course-card {
        margin-bottom: 60px;
        max-width: 100%;
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .course-header {
        height: 240px;
    }
    
    .course-content {
        margin-left: 10px;
        margin-right: 10px;
        padding: 20px 15px 15px 15px;
    }
    
    .course-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .course-overlay h3 {
        font-size: 1.4rem;
    }
    
    .course-overlay .subtitle {
        font-size: 1rem;
    }
    
    .course-overlay .price-overlay {
        bottom: -120px;
        padding: 6px 12px;
        font-size: 1rem;
    }
    
    .course-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .course-price {
        font-size: 1.2rem;
    }
    
    .balance-amount {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .course-card {
        margin-left: 5px;
        margin-right: 5px;
        margin-bottom: 50px;
    }
    
    .course-header {
        height: 220px;
    }
    
    .course-overlay {
        top: 20px;
        left: 20px;
        right: 20px;
    }
    
    .course-overlay h3 {
        font-size: 1.2rem;
    }
    
    .course-overlay .subtitle {
        font-size: 0.9rem;
    }
    
    .course-content {
        margin-left: 8px;
        margin-right: 8px;
        margin-top: -50px;
    }
}

/* Grade Badge Component */
.grade-badge {
    background-color: #6c757d;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Filter Section Component */
.filter-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Statistics Box Component */
.stat-box {
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

/* Bulk Actions Component */
.bulk-actions {
    margin-bottom: 20px;
}

/* Form Container Component */
.form-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Choice Container Component (for question editors) */
.choice-container {
    border: 1px solid #dee2e6;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    position: relative;
}

/* Preview Image Component */
.preview-image {
    max-height: 100px;
    margin-top: 10px;
}

/* Remove Choice Button */
.remove-choice {
    position: absolute;
    left: 15px;
    top: 15px;
}

/* Add Choice Button */
.add-choice-btn {
    margin-bottom: 20px;
}

/* Drop Area for File Uploads */
.drop-area {
    border: 2px dashed #ccc;
    transition: all 0.3s;
    cursor: pointer;
}

.drop-area:hover, 
.drop-area.border-primary {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

/* Private Badge */
.private-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

/* Document Components */
.doc-time {
    font-size: 0.9rem;
    color: #6c757d;
}

.doc-active {
    border-left: 5px solid #28a745;
}

.doc-inactive {
    border-left: 5px solid #dc3545;
    opacity: 0.9;
}

/* Profile Components */
.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.activity-item {
    border-left: 3px solid #667eea;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

/* Profile Page Components */
.profile-card {
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.profile-header {
    background: linear-gradient(145deg, #6a11cb, #2575fc);
    color: white;
    padding: 30px 0;
    text-align: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    margin-bottom: 15px;
}

.profile-details {
    padding: 30px;
}

.detail-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.detail-label {
    font-weight: bold;
    color: #555;
}

.detail-value {
    font-size: 1.1rem;
}

.stat-card.courses {
    background-color: #e3f2fd;
}

.stat-card.exams {
    background-color: #e8f5e9;
}

.file-icon {
    font-size: 48px;
}

/* Message Utility */
.message {
    margin-top: 20px;
}

/* Responsive Design for Components */
@media (max-width: 768px) {
    .filter-section .row > div {
        margin-bottom: 10px;
    }
    
    .bulk-actions {
        flex-direction: column;
    }
    
    .bulk-actions select {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    .form-container {
        padding: 20px;
    }
}
