/**
 * ========================================================
 * Training Plan Dashboard Styles
 * ========================================================
 * Styles for both compact (drawer) and expanded (main)
 * training plan displays on the account dashboard
 * ========================================================
 */

/* ===== Compact Training Plan (Drawer) ===== */
.compact-training-plan {
  padding: 15px;
  font-size: 0.9em;
}

.skill-level-badge {
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-size: 0.95em;
}

.priority-areas-compact,
.next-courses-compact {
  margin-bottom: 20px;
}

.priority-areas-compact h4,
.next-courses-compact h4 {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #47607c;
  margin-bottom: 10px;
  font-weight: 600;
}

.priority-item {
  background: #f5f5f5;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 0.9em;
}

.priority-item strong {
  color: #333;
}

.course-item-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s;
  cursor: pointer;
}

.course-item-compact:hover {
  background: #ececec;
  transform: translateX(2px);
}

.course-number {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #47607c, #5a7a9c);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9em;
  flex-shrink: 0;
}

.course-info {
  flex: 1;
}

.course-info strong {
  display: block;
  color: #333;
  margin-bottom: 4px;
  font-size: 0.95em;
}

.course-info small {
  color: #666;
  font-size: 0.8em;
}

.view-full-plan-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #47607c, #5a7a9c);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95em;
}

.view-full-plan-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(71, 96, 124, 0.3);
}

/* ===== Empty State ===== */
.empty-state {
  padding: 40px 20px;
  text-align: center;
}

.empty-icon {
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-icon svg {
  stroke: #47607c;
}

.empty-state h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.3em;
}

.empty-state p {
  color: #666;
  margin-bottom: 25px;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.create-plan-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #47607c, #5a7a9c);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.05em;
}

.create-plan-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(71, 96, 124, 0.3);
}

/* ===== Expanded Training Plan (Main Dashboard) ===== */
.expanded-training-plan {
  padding: 0;
}

/* Plan Header */
.plan-header {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  color: #fff;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.plan-title-section h2 {
  margin: 0;
  font-size: 2.25em;
  color: #ddd;
  text-shadow: 1px 2px 1px #000;
}

.plan-subtitle {
  margin: 8px 0 0 0;
  opacity: 0.7;
  font-size: 0.95em;
  font-style: italic;
}

.plan-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  box-shadow: var(--box-shadow-header);
}

.action-btn.primary {
  background: var(--action-button-gradient);
  color: #fff;
  border: 1px groove #333;
}

.action-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px groove rgba(255, 255, 255, 0.3);
}

.action-btn:hover {
  transform: translateY(-2px);
}

.action-btn svg {
  flex-shrink: 0;
}

/* Skill Overview Grid */
.skill-overview-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  margin-bottom: 30px;
}

.skill-card {
  background: var(--card-gradient);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skill-card.primary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.skill-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.skill-details h3 {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 12px;
  font-weight: 600;
}

.skill-level-badge.large {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
}

.skill-description {
  color: #bbb;
  font-size: 0.9em;
  margin: 0;
}

.progress-stats {
  background:var(--card-gradient);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  color: #47607c;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: #666;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Training Sections */
.training-section {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
  margin-bottom: 25px;
}

.section-header h3 {
  font-size: 1.5em;
  color: #bbb;
  text-shadow: 1px 1px 1px #111;
  margin: 0 0 8px 0;
}

.section-header p {
  color: #ccc;
  margin: 0;
  font-size: 0.95em;
}

/* Priority Grid */
.priority-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.priority-card {
  background: linear-gradient(135deg, #fff, #f9f9f9);
  border-left: 4px groove #FF9800;
  border-radius: 8px;
  padding: 25px;
  transition: all 0.3s;
}

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

.priority-card.completed {
  opacity: 0.7;
  border-left-color: #4CAF50;
}

.priority-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.priority-number {
  width: 40px;
  height: 40px;
  background: #FF9800;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
  flex-shrink: 0;
}

.priority-header h4 {
  margin: 0;
  color: #333;
  font-size: 1.2em;
}

.priority-reason {
  color: #666;
  margin: 0 0 15px 0;
  line-height: 1.6;
}

.priority-recommendations {
  background: #fff;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px groove #e0e0e0;
}

.priority-recommendations h5 {
  margin: 0 0 10px 0;
  color: #47607c;
  font-size: 0.9em;
}

.priority-recommendations ul {
  margin: 0;
  padding-left: 20px;
}

.priority-recommendations li {
  margin-bottom: 6px;
  color: #555;
  line-height: 1.5;
}

/* Course Roadmap */
.courses-roadmap {
  display: grid;
  gap: 30px;
}

.course-card {
  background: var(--card-gradient);
  border: 2px groove #333;
  border-radius: 12px;
  padding: 25px;
  transition: all 0.3s;
}

.course-card:hover {
  border-color: #47607c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.course-card.completed {
  border-color: #4CAF50;
  background: linear-gradient(135deg, #4CAF5008, #4CAF5004);
}

.course-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.course-number-badge {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #47607c, #5a7a9c);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.3em;
}

.course-priority-badge {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 1px;
}

.course-content h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 1.3em;
}

.course-content p {
  margin: 0 0 15px 0;
  color: #666;
  line-height: 1.6;
}

.course-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  font-size: 0.9em;
}

.meta-item svg {
  flex-shrink: 0;
}

.course-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.enroll-btn,
.mark-complete-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95em;
  box-shadow: var(--box-shadow-header);
}

.enroll-btn {
  background: var(--action-button-gradient);
  color: #fff;
  border: 1px groove #333;
}

.mark-complete-btn {
  background: #dddddd;
  color: #333;
  border: 1px groove #bbb;
}

.mark-complete-btn.completed {
  background: #4CAF50;
  color: #fff;
  border-color: #4CAF50;
}

.mark-complete-btn:hover {
  transform: translateY(-2px);
}

/* Timeline */
.timeline-container {
  position: relative;
  padding-left: 40px;
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  top: 0;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background: #47607c;
  border: 3px groove #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #47607c;
}

.timeline-line {
  position: absolute;
  left: 7px;
  top: 16px;
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, #47607c, #5a7a9c);
}

.timeline-content {
  background: var(--card-gradient);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-date {
  font-size: 0.8em;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.timeline-content h5 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 1.1em;
}

.timeline-content p {
  margin: 0 0 8px 0;
  color: #666;
}

.timeline-content small {
  color: #888;
  font-size: 0.85em;
}

/* Tips Grid */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.tip-card {
  background: linear-gradient(135deg, #666, #888);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: start;
  gap: 15px;
}

.tip-icon {
  font-size: 2em;
  flex-shrink: 0;
}

.tip-card p {
  margin: 0;
  color: #333;
  line-height: 1.6;
}

/* Next Steps */
.next-steps-list {
  display: grid;
  gap: 15px;
}

.next-step-item {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: start;
}

.step-number {
  width: 40px;
  height: 40px;
  background: #7B1FA2;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 1.1em;
}

.step-content p {
  margin: 0 0 10px 0;
  color: #666;
  line-height: 1.6;
}

.step-link {
  color: #7B1FA2;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.step-link:hover {
  text-decoration: underline;
}

/* Progress Tracking */
.overall-progress {
  padding: 20px;
  background: transparent;
  border-radius: 8px;
}

.progress-bar-container {
  height: 40px;
  background: #bbb;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.5s ease;
  position: relative;
}

.progress-percentage {
  color: #fff;
  font-weight: bold;
  font-size: 0.9em;
}

.progress-message {
  text-align: center;
  color: #666;
  margin: 0;
  font-size: 0.95em;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .skill-overview-grid {
    grid-template-columns: 1fr;
  }
  
  .progress-stats {
    grid-template-columns: 1fr;
  }
  
  .plan-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .plan-actions {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
    justify-content: center;
  }
  
  .priority-grid {
    grid-template-columns: 1fr;
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .course-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .course-actions {
    flex-direction: column;
  }
  
  .enroll-btn,
  .mark-complete-btn {
    width: 100%;
  }
}

/* ===== Print Styles ===== */
@media print {
  .plan-actions,
  .action-btn,
  .view-full-plan-btn,
  .create-plan-btn,
  .mark-complete-btn,
  .enroll-btn {
    display: none !important;
  }
  
  .expanded-training-plan {
    box-shadow: none !important;
  }
  
  .training-section {
    page-break-inside: avoid;
    box-shadow: none !important;
  }
}

/* ===== Collapsible Sections ===== */
.preview-item {
  position: relative;
  transition: all 0.4s ease;
}

/* Preview blur effect - only top half visible with gradient fade */
.preview-blur {
  position: relative;
  max-height: 50%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.9) 40%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.9) 40%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Blur and desaturation that increases toward bottom */
.preview-blur::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(3px) saturate(0.3);
  -webkit-backdrop-filter: blur(3px) saturate(0.3);
  pointer-events: none;
  z-index: 1;
}

/* Revealed state - remove all effects */
.preview-item.revealed .preview-blur {
  max-height: none;
  overflow: visible;
  pointer-events: auto;
  user-select: auto;
  -webkit-mask-image: none;
  mask-image: none;
}

.preview-item.revealed .preview-blur::before {
  display: none;
}

.hidden-item {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.expand-section-btn {
  display: block;
  width: 100%;
  margin: 20px auto 0;
  padding: 12px 24px;
  background: linear-gradient(135deg, #47607c, #5a7a9c);
  color: #fff;
  border: 1px groove #333;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.expand-section-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(71, 96, 124, 0.4);
}

.expand-section-btn:active {
  transform: translateY(0);
}

.expand-section-btn svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.expand-section-btn.expanded svg {
  transform: rotate(180deg);
}

.expand-section-btn .expand-text,
.expand-section-btn .collapse-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
