/**
 * Skills Course Enrollment Styles
 */

.skills-course-enrollment-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Course Listing */
.course-listing {
    margin-bottom: 40px;
}

.course-listing h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

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

/* Course Card */
.course-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.course-image {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
}

.course-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-info h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
}

.course-info .description {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #48bb78;
    color: white;
    width: 100%;
    margin-top: 15px;
}

.btn-success:hover {
    background: #38a169;
}

.btn-info {
    background: #3182ce;
    color: white;
}

.btn-info:hover {
    background: #2c5aa0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

/* Course Details */
.course-details {
    margin-top: 20px;
}

.course-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.course-detail-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.course-header-info h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.course-header-info .price {
    font-size: 20px;
    color: #667eea;
}

.course-description {
    margin-bottom: 30px;
}

.course-description h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.course-description p {
    color: #666;
    line-height: 1.6;
}

/* Instances */
.course-instances h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.instances-list {
    display: grid;
    gap: 20px;
}

.instance-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.instance-card:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.instance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.instance-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.seats-available {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.detail-row .label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.detail-row .value {
    color: #333;
    text-align: right;
    flex-grow: 1;
}

.detail-row a {
    color: #667eea;
    text-decoration: none;
}

.detail-row a:hover {
    text-decoration: underline;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    padding: 40px 20px;
}

.login-prompt h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.login-prompt p {
    color: #666;
    margin-bottom: 25px;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.login-buttons .btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
    text-align: center;
}

/* Role Selection Modal */
.role-selection-content {
    max-width: 700px;
}

.role-selection-container {
    text-align: center;
}

.role-selection-container h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.role-selection-container>p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.role-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.role-card {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.role-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.role-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.role-card h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.role-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.role-card .btn {
    width: 100%;
}

/* Seat Selection Modal */
.seat-selection-content {
    max-width: 500px;
}

.seat-selection-container {
    text-align: center;
}

.seat-selection-container h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.seat-selection-container>p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.seat-input-group {
    margin: 30px 0;
}

.seat-input-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.seat-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.seat-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    font-size: 20px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.seat-btn:hover {
    background: #667eea;
    color: white;
}

#seat-count {
    width: 80px;
    height: 45px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-weight: bold;
}

.seat-info {
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.seat-info p {
    color: #333;
    font-size: 16px;
    margin: 0;
}

.seat-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.seat-actions .btn {
    flex: 1;
    max-width: 200px;
}

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

.no-courses,
.no-instances {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

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

    .course-header {
        flex-direction: column;
    }

    .course-detail-image {
        width: 100%;
        height: auto;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }

    .instance-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .seats-available {
        margin-top: 10px;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-row .label {
        margin-bottom: 5px;
    }
}