/* shadcn/ui-style components for vanilla HTML/CSS/JS */

/* Common styles */
:root {
  --background: #000000;
  --foreground: #ffffff;
  --primary: #8c02ff;
  --primary-foreground: #ffffff;
  --border: rgba(255, 255, 255, 0.1);
  --input: rgba(255, 255, 255, 0.05);
  --ring: #8c02ff;
  --radius: 0.5rem;
}

/* Select Component */
.shadcn-select {
  position: relative;
  width: 100%;
}

.shadcn-select-trigger {
  display: flex;
  height: 40px;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--input);
  padding: 0 14px;
  font-size: 14px;
  line-height: 1;
  color: var(--foreground);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.shadcn-select-trigger:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.shadcn-select-trigger:focus {
  box-shadow: 0 0 0 2px rgba(140, 2, 255, 0.3);
  border-color: var(--ring);
}

.shadcn-select-value {
  display: flex;
  align-items: center;
  height: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shadcn-select-icon {
  height: 16px;
  width: 16px;
  opacity: 0.7;
  transition: transform 0.2s;
}

.shadcn-select-trigger[aria-expanded="true"] .shadcn-select-icon {
  transform: rotate(180deg);
}

.shadcn-select-content {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: rgba(25, 25, 25, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 38px -10px rgba(0, 0, 0, 0.4), 0 10px 20px -15px rgba(0, 0, 0, 0.2);
  z-index: 50;
  display: none;
}

.shadcn-select-content.open {
  display: block;
  animation: fadeIn 0.1s ease-out;
}

.shadcn-select-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--foreground);
  user-select: none;
  cursor: pointer;
  outline: none;
}

.shadcn-select-item:hover {
  background-color: rgba(140, 2, 255, 0.1);
}

.shadcn-select-item[aria-selected="true"] {
  background-color: rgba(140, 2, 255, 0.1);
  font-weight: 500;
}

.shadcn-select-item[aria-selected="true"]::after {
  content: "✓";
  position: absolute;
  right: 14px;
  opacity: 0.7;
}

/* Switch Component */
.shadcn-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shadcn-switch-label {
  font-size: 14px;
  color: var(--foreground);
  user-select: none;
}

.shadcn-switch-description {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
  margin-left: 4px;
  display: block;
}

.shadcn-switch-root {
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  position: relative;
  border: 1px solid var(--border);
  transition: background-color 0.2s;
  cursor: pointer;
}

.shadcn-switch-root[data-state="checked"] {
  background-color: var(--primary);
}

.shadcn-switch-thumb {
  display: block;
  width: 18px;
  height: 18px;
  background-color: white;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
  transform: translateX(3px);
}

.shadcn-switch-root[data-state="checked"] .shadcn-switch-thumb {
  transform: translateX(22px);
}

.shadcn-switch-root:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.shadcn-switch-root[data-state="checked"]:hover {
  background-color: #7b00e0;
}

.shadcn-switch-root:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Tabs Component */
.shadcn-tabs {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.shadcn-tabs-list {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.shadcn-tabs-trigger {
  background: none;
  border: none;
  color: #aaa;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.shadcn-tabs-trigger:hover {
  color: var(--foreground);
}

.shadcn-tabs-trigger[data-state="active"] {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

/* Button Component */
.shadcn-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  height: 36px;
  padding: 0 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.shadcn-button-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shadcn-button-default {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
}

.shadcn-button-default:hover {
  background-color: #7b00e0;
}

.shadcn-button-destructive {
  background-color: #F44336;
  color: white;
  border: none;
}

.shadcn-button-destructive:hover {
  background-color: #d32f2f;
}

.shadcn-button-outline {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.shadcn-button-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--foreground);
}

.shadcn-button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.shadcn-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
