/* ClassMate Frontend Styles */

.classmate-schedule {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.schedule-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.schedule-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.class-schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.class-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.class-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.class-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.class-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
}

.class-level {
    background: #e8f4f8;
    color: #2980b9;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.class-details {
    margin-bottom: 15px;
}

.class-time {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
}

.class-info p {
    margin: 5px 0;
    color: #666;
}

.class-availability {
    margin: 10px 0;
}

.spots-available {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.class-actions {
    text-align: center;
}

.book-class-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    width: 100%;
}

.book-class-btn:hover {
    background: #218838;
}

.btn-disabled {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: not-allowed;
    width: 100%;
}

/* Packages */
.classmate-packages {
    max-width: 1200px;
    margin: 0 auto;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.package-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.package-card:hover {
    border-color: #007cba;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,124,186,0.1);
}

.package-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.package-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.package-details {
    margin-bottom: 20px;
}

.package-price {
    font-size: 2em;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 10px;
}

.package-credits {
    font-size: 1.1em;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 5px;
}

.package-validity {
    color: #666;
    font-size: 0.9em;
}

.purchase-package-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: background 0.3s ease;
    width: 100%;
}

.purchase-package-btn:hover {
    background: #005a87;
}

/* Class List */
.classmate-class-list {
    max-width: 800px;
    margin: 0 auto;
}

.class-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.class-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.class-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.class-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.class-meta span {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #495057;
}

/* Student Portal */
.classmate-portal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.portal-header {
    background: #007cba;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.portal-content {
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 30px;
}

.portal-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.portal-nav a {
    padding: 10px 20px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.portal-nav a:hover, .portal-nav a.active {
    background: #007cba;
    color: white;
}

/* Forms */
.classmate-form {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

.form-submit {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    width: 100%;
    transition: background 0.3s ease;
}

.form-submit:hover {
    background: #005a87;
}

/* Responsive Design */
@media (max-width: 768px) {
    .class-schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .portal-nav {
        flex-direction: column;
    }
    
    .class-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Instructor Schedule */
.classmate-instructor-schedule {
    max-width: 800px;
    margin: 0 auto;
}

.instructor-classes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.instructor-class-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    gap: 20px;
}

.class-time {
    background: #007cba;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
}

.class-details h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.class-details span {
    margin-right: 15px;
    color: #666;
    font-size: 0.9em;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.class-item {
    animation: fadeIn 0.5s ease-out;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}