/* File: assets/css/tabs.css
 * Purpose: Base (STRUCTURAL) styling for 12D Tabs widget
 * Notes:
 * - Keep this file structural + spacing resets only.
 * - Visual design should come from Elementor Style controls + CSS variables.
 */

:root {
  /* Safe defaults (can be overridden by widget controls or theme) */
  --d12-tabs-border: rgba(0, 0, 0, 0.15);
  --d12-tabs-bg: #ffffff;

  --d12-tabs-tab-bg: rgba(0, 0, 0, 0.04);
  --d12-tabs-tab-bg-hover: rgba(0, 0, 0, 0.07);
  --d12-tabs-tab-bg-active: rgba(0, 0, 0, 0.12);

  --d12-tabs-text: inherit;

  --d12-tabs-radius: 10px;

  /* Spacing controls (widget sets these; these are fallbacks) */
  --d12-tabs-gap: 6px;
  --d12-tabs-tablist-margin-bottom: 12px;
}

/* Wrapper */
.d12-tabs {
  width: 100%;
}

/* =========================================================
   Tab list (the bar with tabs)
   ========================================================= */
.d12-tabs__tablist {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;

  /* IMPORTANT: gap must be authoritative so "0" is truly 0 */
  gap: var(--d12-tabs-gap, 6px);
  row-gap: var(--d12-tabs-gap, 6px);
  column-gap: var(--d12-tabs-gap, 6px);

  margin: 0 0 var(--d12-tabs-tablist-margin-bottom, 12px) 0;
  padding: 0;
  list-style: none;
}

/* =========================================================
   Spacing reset so gap can truly be 0
   (kills theme/browser margins and any adjacent-button spacing)
   ========================================================= */
.d12-tabs__tab {
  box-sizing: border-box;
  margin: 0 !important;
}

.d12-tabs__tab + .d12-tabs__tab {
  margin-left: 0 !important;
}

/* Individual tab button (base structural defaults) */
.d12-tabs__tab {
  appearance: none;
  border: 1px solid var(--d12-tabs-border);
  background: var(--d12-tabs-tab-bg);
  color: var(--d12-tabs-text);

  padding: 10px 14px;
  border-radius: 999px;

  cursor: pointer;
  font-weight: 600;
  line-height: 1.1;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.d12-tabs__tab:hover {
  background: var(--d12-tabs-tab-bg-hover);
  transform: none;
}

.d12-tabs__tab[aria-selected="true"] {
  background: var(--d12-tabs-tab-bg-active);
}

/* =========================================================
   Panels wrapper (THIS is the visible “frame”)
   ========================================================= */
.d12-tabs__panels {
  border: 1px solid var(--d12-tabs-border);
  border-radius: var(--d12-tabs-radius);
  background: var(--d12-tabs-bg);
  overflow: hidden;
}

/* Panels: keep them neutral; styling lives on the wrapper */
.d12-tabs__panel {
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.d12-tabs__panel[hidden] {
  display: none !important;
}

/* Optional: image inserted via the widget's Image control */
.d12-tabs__custom-image {
  display: block;
  max-width: 100%;
  height: auto;
}

/* End of file tabs.css */