.unbrn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--transition-curve), background-color 0.2s var(--transition-curve), border-color 0.2s var(--transition-curve), opacity 0.2s var(--transition-curve);
  padding: 0.5rem 1rem;
  outline: none;
  line-height: 1;
  border-radius: var(--radius);
  white-space: nowrap;
}

.unbrn-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.unbrn-btn span,
.unbrn-btn svg {
  display: block;
}

.unbrn-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.unbrn-btn-filled {
  background-color: var(--accent-color);
  color: var(--accent-text);
  border-color: var(--accent-color);
}

.unbrn-btn-filled:hover:not(:disabled) {
  opacity: 0.9;
}

.unbrn-btn-outlined {
  background-color: color-mix(in srgb, var(--bg-secondary) 8%, transparent);
  color: var(--accent-color);
  border-color: color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.unbrn-btn-outlined:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent-color) 40%, transparent);
  color: var(--accent-color);
}

.unbrn-btn-duo {
  background-color: color-mix(in srgb, var(--accent-color) 5%, transparent);
  color: var(--accent-color);
  border-color: color-mix(in srgb, var(--accent-color) 5%, transparent);
}

.unbrn-btn-duo:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--accent-color) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.unbrn-btn-ghost {
  background-color: transparent;
  color: var(--text-main);
  border-color: transparent;
}

.unbrn-btn-ghost:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--border-color) 25%, transparent);
  color: var(--text-main);
}

.unbrn-btn-ghost:focus-visible:not(:disabled) {
  background-color: color-mix(in srgb, var(--border-color) 35%, transparent);
  border-color: color-mix(in srgb, var(--border-color) 60%, transparent);
}

.unbrn-btn-sm {
  height: var(--height-sm);
  padding: 0 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.unbrn-btn-default {
  height: var(--height-default);
  padding: 0 1.25rem;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
}

.unbrn-btn-lg {
  height: var(--height-lg);
  padding: 0 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.unbrn-btn-icon-only {
  aspect-ratio: 1 / 1;
}

.unbrn-btn-sm.unbrn-btn-icon-only {
  padding: 0.25rem;
}

.unbrn-btn-default.unbrn-btn-icon-only {
  padding: 0.5rem;
}

.unbrn-btn-lg.unbrn-btn-icon-only {
  padding: 0.75rem;
}

.unbrn-btn-opacity-25 {
  opacity: 0.25;
}

.unbrn-btn-opacity-50 {
  opacity: 0.5;
}

.unbrn-btn-opacity-100 {
  opacity: 1;
}

.unbrn-btn-icon-left {
  margin-right: 0.5rem;
}

.unbrn-btn-icon-right {
  margin-left: 0.5rem;
}

.unbrn-btn-loading-icon {
  animation: unbrn-spin 1s linear infinite;
}

@keyframes unbrn-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.unbrn-btn-full-width {
  width: 100%;
  display: flex;
  justify-content: center;
}

.unbrn-btn-group {
  display: inline-flex;
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.unbrn-btn-group .unbrn-btn {
  margin: 0;
  border-radius: 0 !important;
  box-shadow: none;
}

.unbrn-btn-group .unbrn-btn:first-child {
  border-top-left-radius: var(--radius) !important;
  border-bottom-left-radius: var(--radius) !important;
}

.unbrn-btn-group .unbrn-btn:last-child {
  border-top-right-radius: var(--radius) !important;
  border-bottom-right-radius: var(--radius) !important;
}

.unbrn-btn-group .unbrn-btn:not(:first-child) {
  margin-left: -1px;
}

.unbrn-btn-group .unbrn-btn-filled:not(:last-child) {
  border-right-color: color-mix(in srgb, var(--accent-text) 30%, transparent);
}

.unbrn-btn-group .unbrn-btn-filled:not(:first-child) {
  border-left-color: color-mix(in srgb, var(--accent-text) 30%, transparent);
}

.unbrn-btn-group-split {
  display: inline-flex;
  gap: 6px;
  border-radius: var(--radius);
  width: fit-content;
  position: relative;
}

.unbrn-btn-group-split .unbrn-btn {
  margin: 0;
  border-radius: var(--radius-xs) !important;
  box-shadow: none;
}

.unbrn-btn-group-split .unbrn-btn:first-child {
  border-top-left-radius: var(--radius) !important;
  border-bottom-left-radius: var(--radius) !important;
}

.unbrn-btn-group-split .unbrn-btn:last-child {
  border-top-right-radius: var(--radius) !important;
  border-bottom-right-radius: var(--radius) !important;
}

/* Tabs Button Group */
.unbrn-btn-group-tabs {
  position: relative;
  padding: 3px;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.unbrn-btn-group-dragging {
  cursor: grabbing !important;
}

.unbrn-btn-group-dragging .unbrn-btn {
  cursor: grabbing !important;
}

.unbrn-btn-group-dragging .unbrn-btn-group-indicator {
  transition: none !important;
}

.unbrn-btn-group-tabs .unbrn-btn {
  background-color: transparent !important;
  border-color: transparent !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  border-radius: var(--radius-md) !important;
  transition: all 0.2s var(--transition-curve);
  position: relative;
  z-index: 1;
}

.unbrn-btn-group-tabs .unbrn-btn:hover {
  opacity: 1 !important;
}

.unbrn-btn-group-tabs .unbrn-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: color-mix(in srgb, var(--bg-secondary) 40%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: inherit;
  z-index: -1;
  transition: opacity 0.28s var(--transition-curve);
  opacity: 0;
  pointer-events: none;
}

.unbrn-btn-group-tabs .unbrn-btn:not(.unbrn-btn-active)::before {
  opacity: 1;
}

.unbrn-btn-group-dragging .unbrn-btn:not(.unbrn-btn-active)::before {
  opacity: 0;
}

/* Filled Tabs Variant (Default) */
.unbrn-btn-group-tabs-filled {
  background-color: transparent;
  border: 1px solid transparent;
}

.unbrn-btn-group-tabs-filled .unbrn-btn-group-indicator {
  background-color: var(--accent-color);
  box-shadow: none;
  border: none;
}

.unbrn-btn-group-tabs-filled .unbrn-btn.unbrn-btn-active {
  color: var(--accent-text) !important;
}

.unbrn-btn-group-tabs-filled .unbrn-btn:not(.unbrn-btn-active):hover:not(:disabled) {
  color: var(--text-main) !important;
}

/* Outlined Tabs Variant */
.unbrn-btn-group-tabs-outlined {
  background-color: transparent;
  border: 1px solid transparent;
}

.unbrn-btn-group-tabs-outlined .unbrn-btn-group-indicator {
  background-color: color-mix(in srgb, var(--accent-color) 10%, transparent);
  border: 1px solid var(--accent-color);
  box-shadow: none;
}

.unbrn-btn-group-tabs-outlined .unbrn-btn.unbrn-btn-active {
  color: var(--accent-color) !important;
}

.unbrn-btn-group-tabs-outlined .unbrn-btn:not(.unbrn-btn-active):hover:not(:disabled) {
  color: var(--text-main) !important;
}

/* Duo Tabs Variant */
.unbrn-btn-group-tabs-duo {
  background-color: transparent;
  border: 1px solid transparent;
}

.unbrn-btn-group-tabs-duo .unbrn-btn-group-indicator {
  background-color: color-mix(in srgb, var(--accent-color) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-color) 25%, transparent);
  box-shadow: none;
}

.unbrn-btn-group-tabs-duo .unbrn-btn.unbrn-btn-active {
  color: var(--accent-color) !important;
}

.unbrn-btn-group-tabs-duo .unbrn-btn:not(.unbrn-btn-active):hover:not(:disabled) {
  color: var(--text-main) !important;
}

.unbrn-btn-group-split.unbrn-btn-group-tabs {
  gap: 3px;
}

.unbrn-btn-group-indicator {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--radius-md);
  box-sizing: border-box;
  transition: left 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    top 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.2s ease;
}