/* TSP Details Page Styling */

/* Compact Hero Section */
.hero-section-professional {
  position: relative;
}

/* Breadcrumb Navigation */
.breadcrumb {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(40, 167, 69, 0.1);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: #28a745;
  font-weight: bold;
}

.course-name-display {
  font-size: 1.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* TSP Summary Card */
.tsp-summary-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid rgba(40, 167, 69, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(15px);
}

.summary-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.summary-stat:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(5px);
}

.summary-stat .stat-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.summary-stat .stat-info {
  flex-grow: 1;
}

.summary-stat .stat-number {
  font-size: 1.5rem;
  line-height: 1.2;
}

.summary-stat .stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.8;
}

/* TSP Search Container */
.tsp-search-container {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-radius: 15px;
  padding: 1.25rem;
  border: 1px solid rgba(40, 167, 69, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
}

.search-input-group {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 0.5rem;
}

.search-icon-tsp {
  position: absolute;
  left: 1rem;
  z-index: 3;
  font-size: 1rem;
}

.tsp-search-input {
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 2px solid rgba(40, 167, 69, 0.2);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  flex-grow: 1;
}

.tsp-search-input:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
  background: rgba(255, 255, 255, 1);
}

.tsp-search-btn {
  margin-left: 0.75rem;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.search-info {
  text-align: center;
}

/* TSP Cards */
.tsp-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-radius: 18px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(15px);
  animation: tspCardFadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.tsp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.tsp-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 1) 100%);
}

/* TSP Card Header */
.tsp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 1.25rem 0 1.25rem;
  position: relative;
  z-index: 2;
}

.tsp-icon-wrapper {
  width: 55px;
  height: 55px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
}

.tsp-card:hover .tsp-icon-wrapper {
  transform: scale(1.1) rotate(-5deg);
}

.tsp-status-badge .badge {
  border-radius: 10px;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

/* TSP Card Body */
.tsp-card-body {
  padding: 1rem 1.25rem 1.25rem 1.25rem;
  position: relative;
  z-index: 2;
}

.tsp-name {
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: #2d3748;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8rem;
}

.tsp-location {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.75rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 10px;
  border-left: 3px solid var(--bs-success);
}

/* TSP Statistics Grid */
.tsp-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.tsp-stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.tsp-stat:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tsp-stat-number {
  font-size: 1.3rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  font-weight: 800;
}

.tsp-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* TSP Progress Section */
.tsp-progress-section {
  margin-bottom: 1.25rem;
}

.tsp-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.tsp-progress-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.tsp-progress-percentage {
  font-size: 1rem;
  font-weight: 800;
}

.tsp-progress {
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.tsp-progress-bar {
  height: 100%;
  border-radius: 8px;
  transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.tsp-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: tspProgressShimmer 2.5s infinite;
}

@keyframes tspProgressShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* TSP Contact Info */
.tsp-contact-info {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 1rem;
  margin-bottom: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
}

.contact-text {
  word-break: break-all;
}

/* TSP Action Section */
.tsp-action-section {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 1rem;
}

.action-button-container .btn {
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-button-container .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* TSP Card Decoration */
.tsp-card-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.tsp-card:hover .tsp-card-decoration {
  height: 5px;
  opacity: 1;
}

/* TSP Card Color Variants */
.tsp-card-success:hover {
  border-color: rgba(40, 167, 69, 0.3);
}

.tsp-card-primary:hover {
  border-color: rgba(0, 123, 255, 0.3);
}

.tsp-card-warning:hover {
  border-color: rgba(255, 193, 7, 0.3);
}

.tsp-card-info:hover {
  border-color: rgba(23, 162, 184, 0.3);
}

.tsp-card-secondary:hover {
  border-color: rgba(108, 117, 125, 0.3);
}

/* Animations */
@keyframes tspCardFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .tsp-card-body {
    padding: 1rem 1.1rem 1.1rem 1.1rem;
  }
  
  .tsp-name {
    font-size: 1rem;
  }
  
  .tsp-icon-wrapper {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .tsp-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  
  .tsp-stat {
    padding: 0.5rem 0.25rem;
  }
  
  .tsp-stat-number {
    font-size: 1.1rem;
  }
  
  .tsp-card-header {
    padding: 1rem 1rem 0 1rem;
  }
  
  .tsp-card-body {
    padding: 0.75rem 1rem 1rem 1rem;
  }
  
  .course-name-display {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .tsp-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .tsp-stat {
    padding: 0.5rem;
  }
  
  .tsp-name {
    font-size: 0.95rem;
  }
  
  .summary-stats {
    gap: 0.75rem;
  }
  
  .summary-stat {
    padding: 0.5rem;
  }
  
  .summary-stat .stat-number {
    font-size: 1.3rem;
  }
}

/* Loading States */
.tsp-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-spinner {
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-radius: 20px;
  border: 1px solid rgba(40, 167, 69, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(15px);
}

.loading-spinner .spinner-border {
  border-width: 0.3rem;
}

.loading-spinner h5 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.loading-spinner p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.loading-spinner .progress {
  border-radius: 10px;
  background: rgba(40, 167, 69, 0.1);
}

.loading-spinner .progress-bar {
  border-radius: 10px;
}

/* Toast Notifications */
.toast-container {
  z-index: 9999 !important;
}

.toast {
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

.toast .toast-body {
  font-weight: 500;
  font-size: 0.9rem;
}

/* API Status Indicators */
.api-status-indicator {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.api-status-loading {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.9) 0%, rgba(255, 235, 59, 0.9) 100%);
  color: #856404;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.api-status-success {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.9) 0%, rgba(76, 175, 80, 0.9) 100%);
  color: white;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.api-status-error {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.9) 0%, rgba(244, 67, 54, 0.9) 100%);
  color: white;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Print Styles */
@media print {
  .tsp-card {
    background: white !important;
    border: 2px solid #000 !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 1rem;
  }
  
  .tsp-icon-wrapper {
    background: #000 !important;
    color: white !important;
  }
  
  .tsp-status-badge .badge {
    background: #000 !important;
    color: white !important;
    border: 1px solid #000;
  }
  
  .breadcrumb {
    background: white !important;
    border: 1px solid #000 !important;
  }
}
