/**
 * TabbedContentView - CSS Styles
 * 
 * This file contains the styles for the TabbedContentView component.
 * It provides a clean, modern, and draggable tab interface.
 */

/* CSS Variables */
:root {
  --tcv-border-color: rgba(40, 235, 207, 0.3);
  --tcv-active-color: #28ebcf;
  --tcv-hover-bg: rgba(40, 235, 207, 0.05);
  --tcv-active-bg: rgba(40, 235, 207, 0.1);
  --tcv-text-color: #aaa;
  --tcv-hover-text-color: #ffffff;
  --tcv-nested-border-color: rgba(255, 255, 255, 0.15);
  --tcv-container-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --tcv-container-bg: transparent;
  --tcv-disabled-color: #555;
  --tcv-pill-bg: rgba(40, 235, 207, 0.1);
}

/* --- Tab Navigation Wrapper --- */
.tcv-tabs-nav-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  background: var(--tcv-container-bg);
  padding: 0;
  margin-top: 10px;
}

/* --- Main Tab Navigation (The wrap container) --- */
.tcv-tabs-nav {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  gap: 8px;
  flex: 1;
  min-width: 0;
  border-bottom: 2px solid var(--tcv-border-color);
}

/* Main Tab Buttons */
.tcv-tab-button {
  background: none;
  border: none;
  color: var(--tcv-text-color);
  padding: 12px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  transition: color 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* --- Tab Content --- */
.tcv-tabs-content { 
  position: relative; 
  width: 100%;
  box-sizing: border-box;
}
.tcv-tab-panel {
  display: none;
  padding: 0px;
  animation: fadeIn 0.5s ease;
  width: 100%;
}
.tcv-tab-panel.active { display: block; }

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* --- MODERN NESTED TABS --- */

/* Container for nested tabs to make them stand out */
.nested-tabs-container {
  background: rgba(40, 235, 207, 0.03);
  border: 2px solid rgba(40, 235, 207, 0.2);
  border-radius: 12px;
  padding: 25px;
  margin-top: 15px;
  box-shadow: 0 4px 12px rgba(40, 235, 207, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}

/* Override calc-module-container margin reset for nested-tabs-container */
.calc-module-container .nested-tabs-container {
  margin-top: 15px !important;
}

.calc-tab-panel .nested-tabs {
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  max-width: none;
}

/* Style the nav wrapper for nested tabs */
.calc-tab-panel .nested-tabs .tcv-tabs-nav-wrapper {
  padding: 0;
  margin: 0 0 20px 0;
  border-bottom: none;
}

/* The wrappable area for nested tabs */
.calc-tab-panel .nested-tabs .tcv-tabs-nav {
  padding: 0;
  gap: 8px; 
  border-bottom: none; 
  flex-wrap: wrap;
}


/* The sliding pill indicator */
.calc-tab-panel .nested-tabs .tcv-active-tab-indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--tcv-pill-bg);
  border: none;
  border-radius: 6px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

/* The buttons for nested tabs */
.calc-tab-panel .nested-tabs .tcv-tab-button {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  border-radius: 6px;
  /* FIX: Remove the browser's default focus outline */
  outline: none;
  transition: all 0.3s ease;
}

/* Hover effect for inactive buttons */
.calc-tab-panel .nested-tabs .tcv-tab-button:not(.active):hover {
  background-color: var(--tcv-hover-bg);
  color: var(--tcv-hover-text-color);
}

/* Active button style */
.calc-tab-panel .nested-tabs .tcv-tab-button.active {
  color: var(--tcv-active-color);
  font-weight: 600;
}

/* --- Tab Content Results Container (Separate from tabs) --- */
.tab-content-results-container {
  margin-top: 25px;
  width: 100%;
}

/* Override calc-module-container margin reset for proper spacing */
.calc-module-container .tab-content-results-container {
  margin-top: 15px !important;
}

.tab-content-section {
  width: 100%;
  box-sizing: border-box;
}

.tab-content-section.additional-info-section {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  background-color: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
  padding: 20px 0 0 0;
  margin-top: 0;
}

/* --- Responsive Styles for Nested Tabs --- */
@media (max-width: 768px) {
  .nested-tabs-container {
    padding: 20px;
    margin-top: 12px;
  }
  .calc-tab-panel .nested-tabs .tcv-tab-button {
    font-size: 12px;
    padding: 10px 16px;
    margin: 0 2px;
  }
  .tab-content-results-container {
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .nested-tabs-container {
    padding: 15px;
    margin-top: 10px;
    border-radius: 8px;
  }
  .calc-tab-panel .nested-tabs .tcv-tabs-nav-wrapper {
    margin-bottom: 15px;
  }
  .calc-tab-panel .nested-tabs .tcv-tab-button {
    font-size: 11px;
    padding: 8px 12px;
    margin: 0 1px;
  }
  .tab-content-results-container {
    margin-top: 15px;
  }
}

/* --- Tab Content Separator --- */
/* .calc-module-container .tab-content-separator {
/*   height: 20px;
/*   width: 100%;
/*   margin: 0 0 15px 0 !important;
/* }
