/**
 * Gads Tabs - Custom styles
 * 
 * @package Flatsome Child
 */

/* ==========================================================================
   Tab Container
   ========================================================================== */

.gads_tabs {
  width: 100%;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.gads_tabs > .nav {
  gap: 40px;
  width: max-content;
  margin: 0 auto;
  flex-wrap: wrap;
}

.gads_tabs > .nav.nav-line-bottom:not(.nav-vertical) {
  border-bottom: 1px solid #7a7e7f;
  width: auto;
}

.gads_tabs > .nav.nav-vertical {
  margin-bottom: 0;
  width: auto;
}

.gads_tabs > .nav.nav-vertical > li + li {
  border-top: 0;
}

/* ==========================================================================
   Tab Items
   ========================================================================== */

.gads_tabs > .nav > .tab {
  display: flex;
  margin: 0;
}

.gads_tabs > .nav > .tab > a {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  text-align: left;
  border: none;
  overflow: hidden;
  position: relative;
  padding: 12px 10px;
  font-size: 15px;
  color: black;
  transition: color 0.3s ease;
}

.gads_tabs > .nav > .tab.active > a {
  border: none;
  box-shadow: none;
}

.gads_tabs > .nav.nav-vertical > .tab > a {
  border-top: none;
  text-align: left;
}

/* ==========================================================================
   Tab Icons - Image Switching
   ========================================================================== */

.gads_tabs > .nav > .tab > a > img {
  width: 28px;
  height: 28px;
  margin: 0 10px 0 0;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

/* Default state: show first icon, hide second */
.gads_tabs > .nav > .tab > a > img:first-of-type {
  display: block;
}

.gads_tabs > .nav > .tab > a > img:last-of-type:not(:first-of-type) {
  display: none;
}

/* Active state: hide first icon, show second */
.gads_tabs > .nav > .tab.active > a > img:first-of-type:not(:only-of-type) {
  display: none;
}

.gads_tabs > .nav > .tab.active > a > img:last-of-type {
  display: block;
}

/* ==========================================================================
   Tab Title (H3)
   ========================================================================== */

.gads_tabs > .nav > .tab h3 {
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
  font-size: 15px;
  color: black;
  text-align: left;
  margin: 0;
  transition: color 0.3s ease;
}

.gads_tabs > .nav > .tab.active h3 {
  color: var(--primary-color);
}

/* ==========================================================================
   Tab Panels
   ========================================================================== */

.gads_tabs > .tab-panels {
  width: 100%;
}

.gads_tabs > .nav-vertical + .tab-panels {
  border-left: none;
}

.gads_tabs .tab-panels > .panel {
  animation: fadeIn 0.3s ease;
}

.gads_tabs .tab-panels > .panel .row .col {
  padding: 0 5px 5px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */

@media only screen and (max-width: 64em) {
  .gads_tabs > .nav {
    gap: 20px;
  }
  
  .gads_tabs > .nav > .tab > a > img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */

@media only screen and (max-width: 48em) {
  .gads_tabs > .nav {
    gap: 10px;
    width: 100%;
    justify-content: center;
  }
  
  .gads_tabs > .nav > .tab > a {
    padding: 10px 8px;
    font-size: 14px;
  }
  
  .gads_tabs > .nav > .tab > a > img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 6px;
  }
  
  .gads_tabs > .nav > .tab h3 {
    font-size: 14px;
  }
  
  /* Stack tabs vertically on very small screens */
  .gads_tabs > .nav:not(.nav-vertical) {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .gads_tabs > .nav:not(.nav-vertical)::-webkit-scrollbar {
    display: none;
  }
}

/* ==========================================================================
   Responsive - Small Mobile
   ========================================================================== */

@media only screen and (max-width: 30em) {
  .gads_tabs > .nav {
    gap: 5px;
  }
  
  .gads_tabs > .nav > .tab > a {
    padding: 8px 6px;
    flex-direction: column;
    text-align: center;
  }
  
  .gads_tabs > .nav > .tab > a > img {
    margin: 0 0 5px 0;
  }
  
  .gads_tabs > .nav > .tab h3 {
    font-size: 12px;
  }
}
