/* ── Framer Pro Specification: Liquid Glass Tabs ── */

.lgt-root {
  position: relative;
  display: inline-flex;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.lgt-control {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px;
  gap: 2px;
  border-radius: 999px;
  outline: none;
  touch-action: pan-y;
  background: rgba(255, 251, 247, 0.42);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9),
              inset 0 -1px 1px rgba(255, 255, 255, 0.6),
              0 8px 24px rgba(11, 16, 32, 0.12);
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

html[data-theme="dark"] .lgt-control {
  background: rgba(19, 28, 51, 0.68);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15),
              inset 0 -1px 1px rgba(0, 0, 0, 0.4),
              0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Glass Caustic Bloom beneath the Lens */
.lgt-caustic {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 999px;
  pointer-events: none;
  filter: blur(8px);
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.15) 55%, transparent 75%);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1;
  will-change: transform, width, opacity;
}

html[data-theme="dark"] .lgt-caustic {
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 209, 102, 0.45), rgba(255, 209, 102, 0.08) 55%, transparent 75%);
}

/* Sliding Liquid Glass Lens */
.lgt-lens {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12),
              0 1px 2px rgba(0, 0, 0, 0.08),
              inset 0 1px 1px rgba(255, 255, 255, 0.95),
              inset 0 -1px 1px rgba(255, 255, 255, 0.45);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.25) 45%, rgba(255, 255, 255, 0.45));
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  transform-origin: center center;
  will-change: transform, width;
}

html[data-theme="dark"] .lgt-lens {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.14));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45),
              inset 0 1px 1px rgba(255, 255, 255, 0.35),
              inset 0 -1px 1px rgba(0, 0, 0, 0.3);
}

/* Specular Reflection Flare & Travel Sheen */
.lgt-reflection {
  position: absolute;
  inset: -40% -50%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.05) 36%, rgba(255, 255, 255, 0.5) 46%, rgba(255, 255, 255, 0.75) 49%, rgba(255, 255, 255, 0.15) 54%, transparent 62%);
  will-change: transform;
}

.lgt-travel {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, 0.55) 50%, transparent 75%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Rim Light */
.lgt-rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  background: conic-gradient(from 180deg at 50% 50%, rgba(255, 255, 255, 0.9) 0deg, rgba(255, 255, 255, 0.45) 40deg, transparent 70deg, transparent 150deg, rgba(255, 255, 255, 0.85) 195deg, rgba(255, 255, 255, 0.4) 230deg, transparent 270deg, rgba(255, 255, 255, 0.9) 360deg);
}

/* Individual Tab Items */
.lgt-tab {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  transition: color 0.25s ease, transform 0.15s ease;
}

.lgt-tab[data-active="true"] {
  color: var(--ink);
  font-weight: 600;
}

html[data-theme="dark"] .lgt-tab {
  color: #9AA7C7;
}

html[data-theme="dark"] .lgt-tab[data-active="true"] {
  color: #ffffff;
}

.lgt-tab:hover,
.lgt-control a:hover,
.lgt-control button:hover {
  background: transparent !important;
  color: var(--ink);
}

html[data-theme="dark"] .lgt-tab:hover,
html[data-theme="dark"] .lgt-control a:hover,
html[data-theme="dark"] .lgt-control button:hover {
  background: transparent !important;
  color: #ffffff;
}

.lgt-tab:active {
  transform: scale(0.96);
}

.lgt-tab:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

/* Manila Folder Drawer Tab Integration */
.folder-nav-tabs.lgt-folder-tabs {
  padding: 3px;
  gap: 4px;
  background: rgba(255, 250, 244, 0.7);
  border-radius: 999px;
}

html[data-theme="dark"] .folder-nav-tabs.lgt-folder-tabs {
  background: rgba(19, 28, 51, 0.8);
}
