/* Excel-style tabs container

    styles/components/tabs-excel.css

Mostly used for tab for Question-Answer AG Grid (Phase 3 RFP etc.),
but one or two styles are also used in the Import Wizard Read Only Grid.

*/
.excel-tabs-container {
    display: flex;
    align-items: center;
    background-color: #f1f1f1;
    height: 36px;
    width: 100%;
    position: sticky;
    overflow: visible;
  }
  
  /* Grid tabs container - positioned via flexbox, not sticky */
  .grid-tabs-container {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--border-strong);
    height: 36px;
    position: static;
    background: var(--surface-default);
    z-index: 20;
    width: 100%;
    margin-top: 0;
  }
  
  /* Scroller for tabs */
  .grid-tabs-scroller {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    flex: 1;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    height: 100%;
  }
  
  /* Hide scrollbar for Chrome, Safari and Opera */
  .grid-tabs-scroller::-webkit-scrollbar {
    display: none;
  }

  .tab-loading-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 5px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: tab-spin 1s linear infinite;
}

@keyframes tab-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
  
  /* Tabs wrapper */
  .excel-tabs-wrapper {
    display: inline-flex;
    height: 100%;
  }

  .excel-tab-container {
    position: relative;
    min-width: 100px; 
    max-width: 180px; 
    overflow: hidden; /* Ensure nothing escapes container */
  }
  
  /* Individual tab styling */
  .excel-tab {
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 12px;
    min-width: 90px;
    max-width: 170px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: left;
    background-color: var(--surface-alt);
    border-right: 1px solid var(--border-subtle);
    color: var(--text-secondary);
  }
  
  /* Active tab styling */
  .excel-tab.active {
    background-color: var(--surface-default);
    color: var(--text-primary);
    border-bottom: none;
    font-weight: 500;
    height: calc(100% + 1px); /* Extend slightly to cover top border */
  }
  
  /* Hover effect for tabs */
  .excel-tab:hover:not(.active) {
    background-color: var(--interactive-hover);
  }

  .excel-tab-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #f0f0f0;
    color: #333;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 10px;
    z-index: 2;
    text-align: center;
  }

  .excel-tab-loading {
      opacity: 0.7;
  }
  
  /* Scroll buttons */
  .scroll-btn {
    width: 24px;
    height: 24px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: opacity 0.2s;
  }
  
  .scroll-btn:hover {
    color: #333;
  }
  
  .scroll-btn:focus {
    outline: none;
  }
  
  .scroll-btn--left {
    margin-right: 2px;
  }
  
  .scroll-btn--right {
    margin-left: 2px;
  }
  
  /* Add button styling */
  .tab-add-button {
    width: 24px;
    height: 24px;
    margin-left: 2px;
    border: none;
    border-radius: 3px;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background-color 0.2s;
  }
  
  .tab-add-button:hover {
    background-color: #ddd;
    color: #333;
  }