/* Tabs Component - Mobile First */

.tabs-container {
  border-bottom: 1px solid #B2B2B2;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
  border-bottom: 1px solid #B2B2B2;
  /* Mobile: Enable horizontal scrolling */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tabs::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.tabs::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 2px;
}

.tab {
  position: relative;
  margin-bottom: -1px;
}

.tab-button {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  /* Mobile: Smaller font and padding */
  padding: 4px 8px 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  color: #767676;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  border-radius: 4px 4px 0 0;
}

.tab:hover .tab-button,
.tab .tab-button:hover {
  color: #303030;
  background-color: rgba(221, 238, 255, 0.3);
  border-color: transparent;
}

.tab-button.active,
.tab .tab-button.active {
  color: #303030;
  background-color: #ddeeff;
  border-bottom: 1px solid #303030;
  border-top: none;
  border-left: none;
  border-right: none;
}

/* Mobile: Full-width container */
.tab-buttons-container {
  margin-left: -15px;
  margin-right: -15px;
  padding: 0 15px;
}

/* Tab Content */
.tabs-panels {
  min-height: 400px;
  padding: 1rem 0;
}

.tab-pane {
  animation: fadeIn 0.3s ease-in-out;
}

.tabs-panel-content {
  font-family: 'Inter', sans-serif;
}

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

.tab[role="tab"][aria-selected="true"] .tab-button {
  font-weight: 600;
}

/* Small devices and up (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .tab-buttons-container {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }
}

/* Medium devices and up (tablets, 768px and up) */
@media (min-width: 768px) {
  .tab-button {
    font-size: 16px;
    padding: 4px 12px 8px;
  }
}

/* Large devices and up (desktops, 992px and up) */
@media (min-width: 992px) {
  .tabs {
    overflow-x: visible;
    overflow-y: visible;
    -webkit-overflow-scrolling: auto;
    padding-bottom: 0;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }
}

/* Accessibility */
.tab-button:focus {
  outline: 2px solid #0087CC;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .tab-buttons-container {
    display: none;
  }

  .tab-pane {
    display: block !important;
    page-break-inside: avoid;
  }
}
