/* Learning Dashboard Styles for JobHunter Web App */

/* Learning tab empty state */
.learning-empty-state {
    text-align: center;
    padding: 40px 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.learning-empty-state h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.learning-empty-state p {
    color: #7f8c8d;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* JSON Input section */
.learning-json-input {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.learning-json-input textarea {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background-color: #f5f5f5;
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

/* Dashboard container */
.learning-dashboard {
    display: none; /* Hidden by default until plan is loaded */
}

.learning-dashboard.active {
    display: block;
}

/* Dashboard header */
.learning-header {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.learning-plan-title {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.learning-plan-meta {
    color: #7f8c8d;
    font-size: 14px;
    margin: 10px 0;
}

.learning-header-actions {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

/* Progress indicator */
.learning-progress-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.learning-progress-stat {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.learning-stat-item {
    text-align: center;
}

.learning-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.learning-stat-label {
    font-size: 13px;
    color: #7f8c8d;
}

.learning-overall-progress {
    height: 10px;
    background-color: #ecf0f1;
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
}

.learning-progress-bar {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.5s ease;
}

/* Navigation tabs within learning dashboard */
.learning-nav {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    margin-bottom: -1px;
    overflow: hidden;
}

.learning-nav-item {
    padding: 12px 20px;
    cursor: pointer;
    background-color: #f8f9fa;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: #7f8c8d;
    transition: all 0.2s;
}

.learning-nav-item.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background-color: white;
}

.learning-nav-item:hover:not(.active) {
    background-color: #ecf0f1;
}

/* Content sections */
.learning-content {
    background-color: white;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.learning-section {
    display: none;
}

.learning-section.active {
    display: block;
}

/* Skill cards */
.learning-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    align-items: start;
    gap: 20px;
    margin-bottom: 30px;
}

/* Make skill cards more compact when there are many */
.learning-skills-grid.many-skills .skill-card {
    padding: 12px;
}

.learning-skills-grid.many-skills .skill-description {
    font-size: 13px;
    margin-bottom: 10px;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.skill-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-left: 4px solid #3498db;
    transition: all 0.2s;
}

.skill-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.skill-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.skill-progress {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #3498db;
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #3498db;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    opacity: 0;
}

.skill-progress.loading::after {
    opacity: 1;
}

.skill-description {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.skill-details-toggle {
    background: none;
    border: none;
    color: #3498db;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.skill-details {
    margin-top: 15px;
    display: none;
}

.skill-details.active {
    display: block;
}

/* Modules and resources */
.module-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.module-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.module-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.module-description {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.resources-list, .projects-list {
    margin-top: 10px;
}

.resource-item, .project-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.resource-item:last-child, .project-item:last-child {
    border-bottom: none;
}

.resource-checkbox, .project-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.resource-title, .project-title {
    font-size: 14px;
    color: #2c3e50;
    flex: 1;
}

.resource-item a {
    color: #3498db;
    text-decoration: none;
}

.resource-item a:hover {
    text-decoration: underline;
}

.resource-type {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    background-color: #e8f4fd;
    color: #3498db;
}

.resource-type.documentation {
    background-color: #e8f4fd;
    color: #3498db;
}

.resource-type.video {
    background-color: #fdebeb;
    color: #e74c3c;
}

.resource-type.course {
    background-color: #ebfaf5;
    color: #2ecc71;
}

.resource-type.article {
    background-color: #f4e6fd;
    color: #9b59b6;
}

.resource-item.completed .resource-title,
.project-item.completed .project-title {
    text-decoration: line-through;
    color: #95a5a6;
}

/* Timeline section */
.timeline-container {
    margin-top: 20px;
}

.timeline-week {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.timeline-week:last-child {
    border-bottom: none;
}

.timeline-week-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
    min-width: 60px;
}

.timeline-week-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.timeline-week.current .timeline-week-circle {
    background-color: #3498db;
    color: white;
}

.timeline-week.completed .timeline-week-circle {
    background-color: #2ecc71;
    color: white;
}

.timeline-week-label {
    font-size: 12px;
    color: #7f8c8d;
}

.timeline-week-content {
    flex: 1;
}

.timeline-week-focus {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.timeline-week-activities {
    margin-left: 20px;
    margin-top: 10px;
}

.timeline-activity {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.timeline-activity-checkbox {
    margin-right: 10px;
}

.timeline-activity-text {
    font-size: 14px;
    color: #2c3e50;
}

.timeline-week.completed .timeline-activity-text {
    text-decoration: line-through;
    color: #95a5a6;
}

.timeline-progress {
    margin-top: 10px;
    height: 5px;
    background-color: #ecf0f1;
    border-radius: 3px;
    overflow: hidden;
}

.timeline-progress-bar {
    height: 100%;
    background-color: #3498db;
    width: 0%;
}

/* Export plan section */
.export-plan-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.export-plan-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.export-plan-options {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .learning-skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    .learning-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .learning-header-actions {
        margin-top: 15px;
        width: 100%;
        justify-content: space-between;
    }
    
    .learning-progress-stat {
        flex-direction: column;
        gap: 15px;
    }
    
    .learning-nav {
        overflow-x: auto;
    }
    
    .timeline-week {
        flex-direction: column;
    }
    
    .timeline-week-number {
        flex-direction: row;
        margin-right: 0;
        margin-bottom: 10px;
        align-items: center;
    }
    
    .timeline-week-circle {
        margin-bottom: 0;
        margin-right: 10px;
    }
}

@media (max-width: 1024px) {
    .learning-skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

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