/* Modern Material Design Tab Buttons */

/* Tab Container */
.tab-container {
  background: white;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.tab-buttons-wrapper {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-buttons-wrapper::-webkit-scrollbar {
  height: 4px;
}

.tab-buttons-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.tab-buttons-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

/* Modern Tab Button */
.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  outline: none;
  user-select: none;
}

.tab-btn i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

/* Hover State */
.tab-btn:hover:not(.active) {
  color: #475569;
  background: rgba(100, 116, 139, 0.08);
  transform: translateY(-1px);
}

.tab-btn:hover i {
  transform: scale(1.1);
}

/* Active State - Material Design Elevated */
.tab-btn.active {
  color: #4F46E5;
  background: white;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.tab-btn.active i {
  color: #4F46E5;
}

/* Active State - Bottom Indicator */
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 3px;
  background: linear-gradient(90deg, #4F46E5 0%, #6366F1 100%);
  border-radius: 3px 3px 0 0;
}

/* Focus State for Accessibility */
.tab-btn:focus-visible {
  outline: 2px solid #4F46E5;
  outline-offset: 2px;
}

/* Pressed/Active Click State */
.tab-btn:active {
  transform: scale(0.98);
}

/* Badge/Counter on Tab */
.tab-btn .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: #94a3b8;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.tab-btn.active .tab-badge {
  background: #4F46E5;
}

/* Disabled State */
.tab-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Alternative Style - Pill Tabs */
.tab-buttons-wrapper.pill-style {
  background: transparent;
  border-bottom: none;
  gap: 8px;
  padding: 0;
}

.tab-buttons-wrapper.pill-style .tab-btn {
  border-radius: 20px;
  padding: 8px 18px;
}

.tab-buttons-wrapper.pill-style .tab-btn.active {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.tab-buttons-wrapper.pill-style .tab-btn.active i {
  color: white;
}

.tab-buttons-wrapper.pill-style .tab-btn.active::after {
  display: none;
}

/* Alternative Style - Underline Tabs */
.tab-buttons-wrapper.underline-style {
  background: white;
  border-bottom: 2px solid #e9ecef;
  gap: 0;
  padding: 0 8px;
}

.tab-buttons-wrapper.underline-style .tab-btn {
  border-radius: 0;
  padding: 12px 20px;
  position: relative;
}

.tab-buttons-wrapper.underline-style .tab-btn.active {
  background: transparent;
  box-shadow: none;
  color: #4F46E5;
}

.tab-buttons-wrapper.underline-style .tab-btn.active::after {
  width: 100%;
  height: 2px;
  bottom: -2px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tab-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  .tab-btn i {
    font-size: 14px;
  }
  
  .tab-buttons-wrapper {
    padding: 6px;
  }
}

/* Animation for Tab Content */
.tab-content {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading State */
.tab-btn.loading {
  pointer-events: none;
  opacity: 0.6;
}

.tab-btn.loading::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #4F46E5;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Icon-only tabs */
.tab-btn.icon-only {
  padding: 10px;
  min-width: 44px;
  justify-content: center;
}

.tab-btn.icon-only span:not(.tab-badge) {
  display: none;
}

/* Vertical Tabs */
.tab-buttons-wrapper.vertical {
  flex-direction: column;
  padding: 8px;
  border-bottom: none;
  border-right: 1px solid #e9ecef;
}

.tab-buttons-wrapper.vertical .tab-btn {
  justify-content: flex-start;
  width: 100%;
}

.tab-buttons-wrapper.vertical .tab-btn.active::after {
  width: 3px;
  height: 60%;
  left: auto;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 3px 0 0 3px;
}
