/* Sticky Table Enhancements for Shipments */

/* Full width table wrapper that breaks out of container */
.shipments-table-wrapper-container {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0 1rem;
}

.shipments-table-wrapper {
  position: relative;
  width: 100%;
  height: 80vh; /* Set a fixed height for scrolling */
  overflow: auto;
  border: 1px solid rgba(var(--bc) / 0.2);
  border-radius: 0.5rem;
}

/* Sticky header */
.shipments-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: oklch(var(--b2));
  border-bottom: 2px solid rgba(var(--bc) / 0.1);
}

/* Sticky first column (leftmost) */
.shipments-table tbody td:first-child,
.shipments-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
  background-color: oklch(var(--b1));
}

/* Higher z-index for intersection of sticky header and first column */
.shipments-table thead th:first-child {
  z-index: 30;
  background-color: oklch(var(--b2));
}

/* Sticky last column (rightmost) */
.shipments-table tbody td:last-child,
.shipments-table thead th:last-child {
  position: sticky;
  right: 0;
  z-index: 10;
  background-color: oklch(var(--b1));
}

/* Higher z-index for intersection of sticky header and last column */
.shipments-table thead th:last-child {
  z-index: 30;
  background-color: oklch(var(--b2));
}

/* Modern gradient borders for sticky elements - fade effect */

/* Gradient shadows for sticky elements */
.shipments-table thead {
  box-shadow: 0 2px 8px -2px rgba(var(--bc) / 0.15);
}

.shipments-table tbody td:first-child,
.shipments-table thead th:first-child {
  box-shadow: 2px 0 8px -2px rgba(var(--bc) / 0.15);
}

.shipments-table tbody td:last-child,
.shipments-table thead th:last-child {
  box-shadow: -2px 0 8px -2px rgba(var(--bc) / 0.15);
}

/* Enhanced gradient fade effects using pseudo-elements */
.shipments-table-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(to left, 
    hsl(var(--b1)) 0%, 
    transparent 100%);
  pointer-events: none;
  z-index: 5;
}

.shipments-table-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(to right, 
    hsl(var(--b1)) 0%, 
    transparent 100%);
  pointer-events: none;
  z-index: 5;
}

/* Make all td elements non-transparent for hiding effect */
.shipments-table tbody td {
  background-color: oklch(var(--b1));
  position: relative;
}

.shipments-table tbody tr:hover:not(.group-header) td {
  background-color: oklch(var(--p) / 0.06);
}

/* Ensure sticky columns maintain their background on hover */
.shipments-table tbody tr:hover:not(.group-header) td:first-child,
.shipments-table tbody tr:hover:not(.group-header) td:last-child {
  background-color: oklch(var(--b1)) !important;
}

/* Special handling for group headers - position absolute for sticky effect with colspan */
.shipments-table tbody tr.group-header {
  position: relative; /* Create positioning context */
}

.shipments-table tbody tr.group-header td {
  background-color: oklch(var(--b2));
  position: sticky;
  left: 0;
  z-index: 15;
  box-shadow: 2px 0 8px -2px rgba(var(--bc) / 0.15);
}

/* Ensure smooth scrolling and better performance */
.shipments-table-wrapper {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Enhanced visual separation */
.shipments-table {
  border-collapse: separate;
  border-spacing: 0;
}

.shipments-table th,
.shipments-table td {
  border-right: 1px solid rgba(var(--bc) / 0.1);
  border-bottom: 1px solid rgba(var(--bc) / 0.1);
}

.shipments-table th:last-child,
.shipments-table td:last-child {
  border-right: none;
}

/* Loading state for better UX */
.shipments-table-wrapper.loading {
  opacity: 0.7;
  pointer-events: none;
}

.shipments-table-wrapper.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(var(--bc) / 0.2);
  border-top: 2px solid hsl(var(--p));
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 100;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .shipments-table-wrapper {
    height: 80vh;
  }
  
  .shipments-table th,
  .shipments-table td {
    min-width: 120px;
    font-size: 0.875rem;
  }
}

/* Accessibility improvements */
.shipments-table:focus-within th,
.shipments-table:focus-within td {
  outline: 2px solid hsl(var(--p));
  outline-offset: -2px;
}

/* Enhanced hover effects */
.shipments-table tbody tr:hover {
  box-shadow: 0 2px 8px rgba(var(--bc) / 0.1);
}

/* Improve text readability in sticky elements */
.shipments-table thead th,
.shipments-table tbody td:first-child,
.shipments-table tbody td:last-child {
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(var(--bc) / 0.1);
}

/* Action Button Styling - Larger emojis for better visibility */
.action-button {
  @apply btn btn-ghost btn-sm min-h-10 h-10 w-10 p-0;
  font-size: 1.125rem; /* 18px - makes emojis larger */
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
  background-color: transparent; /* Ensure button background doesn't interfere */
}

.action-button:hover {
  @apply bg-base-200 scale-150;
  transform: scale(1.1);
}

.action-button:active {
  @apply scale-95;
  transform: scale(0.95);
}

.action-button i {
  --tw-text-opacity: 1;
  color: var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity, 1))) !important;
}

.badge-primary {
  color: var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)));
}

.badge-success {
  --tw-border-opacity: 1;
  border-color: var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)));
  --tw-bg-opacity: 1;
  background-color: var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)));
  --tw-text-opacity: 1;
  color: var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)));
}

.badge-error {
  --tw-border-opacity: 1;
  border-color: var(--fallback-er,oklch(var(--er)/0.3));
  --tw-bg-opacity: 1;
  background-color: var(--fallback-er,oklch(var(--er)/0.3));
  --tw-text-opacity: 1;
  color: var(--fallback-g,oklch(var(--g)/var(--tw-text-opacity)));
}

.badge-error-content {
  --tw-border-opacity: 1;
  border-color: var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));
  --tw-bg-opacity: 1;
  background-color: var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));
  --tw-text-opacity: 1;
  color: var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)));
}

.badge-warning {
  --tw-border-opacity: 1;
  border-color: var(--fallback-wa,oklch(var(--wa)/var(--tw-border-opacity)));
  --tw-bg-opacity: 1;
  background-color: var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));
  --tw-text-opacity: 1;
  color: var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)));
}

/* ========== SIDEBAR LAYOUT STYLES ========== */

/* Sidebar Container */
.sidebar-container {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 16rem;
  background-color: oklch(var(--b2));
  border-right: 1px solid rgba(var(--bc) / 0.1);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed {
  width: 4rem !important;
}

/* Sidebar Header */
.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(var(--bc) / 0.1);
  position: relative;
  transition: all 0.3s ease;
}

.sidebar-collapsed .sidebar-header {
  padding: 1.5rem 0.75rem;
  text-align: center;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.sidebar-collapsed .sidebar-logo {
  justify-content: center;
}

.sidebar-logo img {
  height: 2rem;
  width: auto;
  flex-shrink: 0;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.sidebar-collapsed .sidebar-logo-text {
  display: none;
}

.sidebar-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: oklch(var(--bc));
}

.sidebar-subtitle {
  font-size: 0.75rem;
  color: oklch(var(--bc) / 0.6);
  line-height: 1.2;
}

/* Collapse Button */
.sidebar-collapse-btn {
  position: absolute;
  top: 1.5rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background-color: transparent;
  border: none;
  color: oklch(var(--bc) / 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-collapse-btn:hover {
  background-color: oklch(var(--b3));
  color: oklch(var(--bc));
}

.sidebar-collapsed .sidebar-collapse-btn {
  position: static;
  margin: 0 auto;
  margin-top: 1rem;
}

/* Sidebar Header Group Hover Effect */
.sidebar-header-group:hover .sidebar-collapse-arrow {
  opacity: 1 !important;
}

/* Navigation Menu */
.sidebar-nav {
  padding: 1rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-menu-item {
  margin: 0;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: oklch(var(--bc) / 0.8);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-collapsed .sidebar-menu-link {
  justify-content: center;
  padding: 0.75rem;
  gap: 0;
}

.sidebar-menu-link:hover {
  background-color: oklch(var(--b3));
  color: oklch(var(--bc));
}

.sidebar-menu-link.active {
  background-color: hsl(var(--p));
  color: hsl(var(--pc));
}

.sidebar-menu-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.sidebar-menu-text {
  transition: all 0.3s ease;
}

.sidebar-collapsed .sidebar-menu-text {
  display: none;
}

/* Menu Sections */
.sidebar-menu-title {
  padding: 0.75rem 1rem 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: oklch(var(--bc) / 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

.sidebar-collapsed .sidebar-menu-title {
  display: none;
}

.sidebar-divider {
  height: 1px;
  background-color: rgba(var(--bc) / 0.1);
  margin: 0.75rem 1rem;
}

.sidebar-collapsed .sidebar-divider {
  margin: 0.75rem 0.5rem;
}

/* Dropdown/Collapsible Menu Items */
.sidebar-dropdown {
  position: relative;
}

.sidebar-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: oklch(var(--bc) / 0.8);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  transition: all 0.2s ease;
}

.sidebar-collapsed .sidebar-dropdown-toggle {
  justify-content: center;
  padding: 0.75rem;
}

.sidebar-dropdown-toggle:hover {
  background-color: oklch(var(--b3));
  color: oklch(var(--bc));
}

.sidebar-dropdown-arrow {
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.sidebar-collapsed .sidebar-dropdown-arrow {
  display: none;
}

.sidebar-dropdown.open .sidebar-dropdown-arrow {
  transform: rotate(180deg);
}

.sidebar-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 2.5rem;
}

.sidebar-collapsed .sidebar-dropdown-content {
  display: none;
}

.sidebar-dropdown.open .sidebar-dropdown-content {
  max-height: 20rem;
}

.sidebar-dropdown-item {
  margin: 0.25rem 0;
}

.sidebar-dropdown-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: oklch(var(--bc) / 0.7);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
}

.sidebar-dropdown-link:hover {
  background-color: oklch(var(--b3));
  color: oklch(var(--bc));
}

/* User Profile Section */
.sidebar-user {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  border-top: 1px solid rgba(var(--bc) / 0.1);
  background-color: oklch(var(--b2));
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-collapsed .sidebar-user-info {
  justify-content: center;
}

.sidebar-user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background-color: hsl(var(--p));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--pc));
  font-weight: 600;
  font-size: 0.875rem;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-details {
  flex: 1;
  min-width: 0;
  transition: all 0.3s ease;
}

.sidebar-collapsed .sidebar-user-details {
  display: none;
}

.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: oklch(var(--bc));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.75rem;
  color: oklch(var(--bc) / 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-menu {
  position: relative;
}

.sidebar-user-menu-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background-color: transparent;
  border: none;
  color: oklch(var(--bc) / 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-collapsed .sidebar-user-menu-btn {
  display: none;
}

.sidebar-user-menu-btn:hover {
  background-color: oklch(var(--b3));
  color: oklch(var(--bc));
}

/* Main Content Area Adjustments */
.main-content-wrapper {
  margin-left: 16rem;
  min-height: 90vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed + .main-content-wrapper {
  margin-left: 4rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .sidebar-container {
    transform: translateX(-100%);
  }
  
  .sidebar-container.mobile-open {
    transform: translateX(0);
  }
  
  .main-content-wrapper {
    margin-left: 0;
  }
  
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* Page Header Improvements - Compact title section */
.page-header .flex.items-start {
  min-height: 100%;
  align-items: center;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: oklch(var(--bc));
  margin: 0;
  padding: 0;
}

.page-subtitle {
  font-size: 0.75rem;
  color: oklch(var(--bc) / 0.6);
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

/* Compact Header Action Bar */
.page-header .flex-1 {
  margin-right: 2rem;
}

/* Search Input Improvements */
.page-header input[type="text"] {
  font-size: 0.875rem;
  height: 2.75rem;
  padding-right: 3rem;
}

/* Perfect circular buttons - minimal override to ensure proper aspect ratio */
.btn-circle {
  aspect-ratio: 1 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-sm.btn-circle {
  width: 2.25rem !important;
  height: 2.25rem !important;
  min-height: 2.25rem !important;
  min-width: 2.25rem !important;
}

.btn-xs.btn-circle {
  width: 1.75rem !important;
  height: 1.75rem !important;
  min-height: 1.75rem !important;
  min-width: 1.75rem !important;
}

/* Search button specific positioning and hover fix */
.page-header .relative .btn-circle {
  right: 0.25rem;
}

.page-header .relative .btn-circle:hover {
  transform: none !important;
  translate: none !important;
  box-shadow: none !important;
  transition: none !important;
}

/* Icon sizing for perfect circles */
.btn-circle svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  stroke-width: 2.5;
}

.btn-sm.btn-circle svg {
  width: 1rem !important;
  height: 1rem !important;
  stroke-width: 3;
}

/* Force white icons on primary buttons */
.btn-primary.btn-circle svg {
  color: white !important;
  stroke: white !important;
}

/* Make regular buttons more round - they need the same treatment */
.btn-circle:not(.btn-sm):not(.btn-xs) {
  width: 2.75rem !important;
  height: 2.75rem !important;
  min-height: 2.75rem !important;
  min-width: 2.75rem !important;
}

/* Ensure buttons don't distort on hover - prevent drop effect */
.btn-circle:hover {
  transform: none !important;
  translate: none !important;
  box-shadow: none !important;
}

/* Action button container spacing */
.page-header .flex.items-center.gap-2 {
  gap: 0.75rem;
}

/* Saved Views styling to match main menu items exactly */
#sidebarSavedViews li a {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: oklch(var(--bc) / 0.8) !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  position: relative !important;
}

#sidebarSavedViews li a:hover {
  background-color: oklch(var(--b3)) !important;
  color: oklch(var(--bc)) !important;
}

#sidebarSavedViews li a svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  flex-shrink: 0 !important;
}

/* Small circular delete button for saved views */
#sidebarSavedViews li a button.btn-circle {
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-height: 1.25rem !important;
  min-width: 1.25rem !important;
  padding: 0 !important;
  border-radius: 50% !important;
  aspect-ratio: 1 !important;
}

#sidebarSavedViews li a button.btn-circle svg {
  width: 0.75rem !important;
  height: 0.75rem !important;
}

/* Tooltip improvements for compact buttons */
.tooltip:before,
.tooltip:after {
  z-index: 1050 !important;
}

/* Smart edge detection for tooltips */
.tooltip[data-tip-edge]:before {
  left: auto !important;
  right: 0 !important;
  transform: none !important;
}

/* Custom HTML tooltip styles */
.custom-html-tooltip {
  position: fixed !important;
  z-index: 9999 !important;
  background-color: rgb(17, 24, 39) !important;
  color: white !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  max-width: 24rem !important;
  word-break: break-words !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease-in-out !important;
}

/* Ensure custom tooltips are not affected by other styles */
.custom-html-tooltip * {
  color: inherit !important;
}

.dropdown .dropdown-content {
  z-index: 1000 !important;
}

/* Clickable tooltip styles */
.clickable-tooltip {
  cursor: pointer !important;
  transition: all 0.2s ease-in-out !important;
  position: relative !important;
}

.clickable-tooltip:hover {
  background-color: rgba(59, 130, 246, 0.1) !important;
  border-radius: 4px !important;
  padding: 2px 4px !important;
  margin: -2px -4px !important;
}

.clickable-tooltip:active {
  background-color: rgba(59, 130, 246, 0.2) !important;
  transform: scale(0.98) !important;
}

/* Add a subtle indicator that the element is clickable */
.clickable-tooltip::after {
  content: '📋';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
}

.clickable-tooltip:hover::after {
  opacity: 0.7;
}

/* Ensure drawer sidebar has highest z-index */
.drawer-side {
  z-index: 99999 !important;
}

.drawer-side .drawer-overlay {
  z-index: 99998 !important;
}

.drawer-side aside {
  z-index: 99999 !important;
}

/* Ensure dropdown menus in sidebar also have high z-index */
.drawer-side .dropdown .dropdown-content {
  z-index: 100000 !important;
}

/* Navigation Menu Hover States Fix */
/* Improve hover state for active navigation items to ensure text visibility */
.drawer-side .menu li a.bg-primary:hover {
  background-color: hsl(var(--p) / 0.8) !important;
  color: hsl(var(--pc)) !important;
}

/* Ensure non-active items have proper hover contrast */
.drawer-side .menu li a:not(.bg-primary):hover {
  background-color: oklch(var(--b3)) !important;
  color: oklch(var(--bc)) !important;
}

/* Improve text visibility on all navigation items */
.drawer-side .menu li a {
  transition: all 0.2s ease-in-out !important;
}

/* Ensure icons maintain proper color on hover for active items */
.drawer-side .menu li a.bg-primary:hover i {
  color: hsl(var(--pc)) !important;
}

/* Search Input Expansion on Focus */
.search-input {
  transition: width 0.3s ease-in-out;
  width: 16rem; /* w-64 = 16rem */
}

.search-input:focus {
  width: 32rem; /* 2x larger than w-64 */
  outline: none;
  border-color: hsl(var(--p));
  box-shadow: 0 0 0 3px hsl(var(--p) / 0.1);
}

/* Ensure search button stays positioned correctly during expansion */
.page-header .relative .btn-circle {
  transition: right 0.3s ease-in-out;
}

.search-input:focus + .btn-circle {
  right: 0.25rem;
}

.hidden {
  display: none !important;
}

/* Fix for Chinese text in tabs - prevent vertical stacking */
.tab {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: nowrap !important;
  line-height: normal !important;
}

/* Ensure tab labels display horizontally */
.tab::before {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

/* Additional fixes for Chinese text in tab content */
.tab-content {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

/* Ensure all text in tabs displays horizontally */
.tabs * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}