/* TezTabs Component Styles - Modern Design */
.tez-tabs-container {
  display: flex;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  margin-bottom: 0;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden; /* Prevent underline or children from causing page-wide overflow */
  justify-content: flex-start; /* No gaps between tabs; JS will distribute remaining space via flex-grow */
}

.tez-tab-button {
  flex: 0 1 auto;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.02);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden; /* Enable ellipsis clipping inside buttons */
  margin-right: 0;
  backdrop-filter: blur(5px);
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0; /* Allow flex items to shrink below content width */
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Ensure tab text truncates nicely on small screens */
.tez-tab-button .tez-tab-button-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: inline-block;
}

.tez-tab-button:last-child {
  margin-right: 0;
}

.tez-tab-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tez-tab-button.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(231, 76, 60, 0.08));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.2);
  z-index: 2;
}

.tez-tab-button.active::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.05));
}

/* Refresh icon styles */
.tez-tab-refresh-icon {
  width: 18px;
  height: 18px;
  margin-left: 10px;
  opacity: 0.7;
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
  vertical-align: middle;
  flex-shrink: 0;
  display: none; /* Hidden by default, only shown when tab is active */
}

.tez-tab-button.active .tez-tab-refresh-icon {
  opacity: 1;
  filter: brightness(0) invert(1);
  display: inline-block; /* Show when tab is active */
}

.tez-tab-button:active .tez-tab-refresh-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* Animated underline indicator */
.tez-tabs-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--underline-left, 0);
  width: var(--underline-width, 33.333%);
  height: 3px;
  background: linear-gradient(90deg, #e74c3c, #ff6b6b);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

/* Instant underline positioning for clicks */
.tez-tabs-container.no-transition::after {
  transition: none;
}

/* Position the underline for different tab counts */
.tez-tabs-container[data-tab-count="2"] .tez-tab-button:nth-child(2).active ~ .tez-tabs-container::after,
.tez-tabs-container[data-tab-count="2"] .tez-tab-button:nth-child(2).active + .tez-tabs-container::after {
  transform: translateX(calc(100% + 4px));
}

.tez-tabs-container[data-tab-count="3"] .tez-tab-button:nth-child(2).active ~ .tez-tabs-container::after,
.tez-tabs-container[data-tab-count="3"] .tez-tab-button:nth-child(2).active + .tez-tabs-container::after {
  transform: translateX(calc(100% + 4px));
}

.tez-tabs-container[data-tab-count="3"] .tez-tab-button:nth-child(3).active ~ .tez-tabs-container::after,
.tez-tabs-container[data-tab-count="3"] .tez-tab-button:nth-child(3).active + .tez-tabs-container::after {
  transform: translateX(calc(200% + 8px));
}

/* Main container that holds both tabs and content - uses flexbox for full height */
.tez-tabs-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow-x: hidden; /* Never let tabs make the page wider than the viewport */
}

.tez-tabs-content-container {
  padding: 20px;
  position: relative;
  overflow: hidden;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  /* Ensure proper scrolling behavior */
  min-height: 0;
}

.tez-tabs-content-container::after {
  content: '';
  display: block;
  height: 0;
  clear: both;
}

.tez-tab-content {
  opacity: 0;
  transform: translateX(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
  position: absolute;
  width: 100%;
  min-height: 100%;
  overflow-y: auto;
  /* Enable scrolling for tab content */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  /* Ensure all child elements can trigger scrolling */
  pointer-events: auto;
}

/* Ensure all child elements within tab content can trigger scrolling */
.tez-tab-content * {
  pointer-events: auto;
  touch-action: pan-y;
}

.tez-tab-content.active {
  opacity: 1;
  transform: translateX(0);
  display: block;
  position: absolute;
  min-height: 100%;
}

.tez-tab-content.slide-out-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  position: absolute;
  min-height: 100%;
}

.tez-tab-content.slide-out-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  position: absolute;
  min-height: 100%;
}

.tez-tab-content.slide-in-left {
  opacity: 1;
  transform: translateX(-50px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  position: absolute;
  min-height: 100%;
}

.tez-tab-content.slide-in-right {
  opacity: 1;
  transform: translateX(50px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  position: absolute;
  min-height: 100%;
}

/* Content entrance animation */
.tez-tab-content.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(231, 76, 60, 0.03), transparent);
  animation: contentGlow 0.6s ease-out;
  pointer-events: none;
}

/* Keyframe animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes contentGlow {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .tez-tab-button {
    padding: 12px 8px;
    font-size: 13px;
    letter-spacing: 0.3px;
  }
  
  .tez-tabs-content-container {
    padding: 15px;
  }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
  .tez-tabs-container {
    background: rgba(0, 0, 0, 0.3);
  }
  
  .tez-tab-button {
    background: rgba(0, 0, 0, 0.2);
  }
  
  .tez-tab-button.active {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(231, 76, 60, 0.1));
  }
} 