/**
 * @file
 * Tab styles for CAGP theme - Drupal 11 compatible
 * Maintains Drupal 7 appearance for user familiarity
 */

/* ============================================
   CAGP Tab System - Primary & Secondary Tabs
   ============================================ */

/* Tab container with specific CAGP ID */
#cagp-tabs {
  margin: 0 0 20px 0;
  border-bottom: 1px solid #d3d7d9;
  clear: both;
}

/* Primary tab styles */
#cagp-tabs ul.primary {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

#cagp-tabs ul.primary li {
  float: left;
  margin: 0 5px 0 0;
  position: relative;
  background: none;
  border: 1px solid #d3d7d9;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}

#cagp-tabs ul.primary li a {
  display: block;
  padding: 8px 15px;
  text-decoration: none;
  color: #253980;
  background: #f0f0f0;
  border-radius: 4px 4px 0 0;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: all 0.3s ease;
  line-height: 1.4;
}

#cagp-tabs ul.primary li a:hover {
  background: #e8e8e8;
  color: #253980;
  text-decoration: none;
}

#cagp-tabs ul.primary li.active,
#cagp-tabs ul.primary li.is-active {
  border-bottom: 1px solid #ffffff;
  margin-bottom: -1px;
  z-index: 2;
}

#cagp-tabs ul.primary li.active a,
#cagp-tabs ul.primary li.is-active a,
#cagp-tabs ul.primary li a.active,
#cagp-tabs ul.primary li a.is-active {
  background-color: #ffffff;
  border-bottom: 1px solid #ffffff;
  color: #253980;
  font-weight: bold;
}

/* Secondary tab styles */
#cagp-tabs ul.secondary {
  margin: 10px 0 20px 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid #d3d7d9;
  clear: both;
}

#cagp-tabs ul.secondary li {
  float: left;
  margin: 0;
  padding-left: 10px;
  border-right: 1px solid #d3d7d9;
}

#cagp-tabs ul.secondary li:first-child {
  padding-left: 0;
}

#cagp-tabs ul.secondary li:last-child {
  border-right: none;
}

#cagp-tabs ul.secondary li a {
  display: block;
  padding: 5px 10px;
  text-decoration: none;
  color: #253980;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: none;
  transition: color 0.3s ease;
  line-height: 1.4;
}

#cagp-tabs ul.secondary li a:hover {
  color: #fb6100;
  text-decoration: underline;
}

#cagp-tabs ul.secondary li.active a,
#cagp-tabs ul.secondary li.is-active a,
#cagp-tabs ul.secondary li a.active,
#cagp-tabs ul.secondary li a.is-active {
  color: #fb6100;
  font-weight: bold;
  text-decoration: underline;
}

/* Clear floats after tabs */
#cagp-tabs:after {
  content: "";
  display: table;
  clear: both;
}

/* Drupal 11 specific tab classes - maintain same styling */
#cagp-tabs .tabs__tab {
  float: left;
  margin: 0 5px 0 0;
  position: relative;
  background: none;
  border: 1px solid #d3d7d9;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}

#cagp-tabs .tabs__link {
  display: block;
  padding: 8px 15px;
  text-decoration: none;
  color: #253980;
  background: #f0f0f0;
  border-radius: 4px 4px 0 0;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: all 0.3s ease;
  line-height: 1.4;
}

#cagp-tabs .tabs__link:hover {
  background: #e8e8e8;
  color: #253980;
  text-decoration: none;
}

#cagp-tabs .tabs__tab.is-active .tabs__link,
#cagp-tabs .tabs__link.is-active {
  background-color: #ffffff;
  border-bottom: 1px solid #ffffff;
  font-weight: bold;
  color: #253980;
}

/* Responsive adjustments for mobile */
@media (max-width: 600px) {
  #cagp-tabs ul.primary li,
  #cagp-tabs .tabs__tab {
    float: none;
    margin: 0 0 5px 0;
    width: 100%;
  }

  #cagp-tabs ul.primary li a,
  #cagp-tabs .tabs__link {
    border-radius: 4px;
    border: 1px solid #d3d7d9;
  }

  #cagp-tabs ul.secondary li {
    float: none;
    margin: 0;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid #d3d7d9;
  }

  #cagp-tabs ul.secondary li:last-child {
    border-bottom: none;
  }
}

/* Integration with CAGP content area */
.left-part #cagp-tabs {
  margin: 0 0 20px 0;
}

.left-part #cagp-tabs ul.primary li a {
  font-family: clearsans-medium, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Ensure tabs display above content */
#cagp-tabs {
  position: relative;
  z-index: 1;
}