@import "tailwindcss";

@theme {
  --color-primary-50: #f0f9ff;
  --color-primary-100: #e0f2fe;
  --color-primary-200: #bae6fd;
  --color-primary-300: #7dd3fc;
  --color-primary-400: #38bdf8;
  --color-primary-500: #0ea5e9;
  --color-primary-600: #0284c7;
  --color-primary-700: #0369a1;
  --color-primary-800: #075985;
  --color-primary-900: #0c4a6e;
}

:root {
  
  --color-background: #0f172a;
  --color-surface: #1e293b;
  --color-surface-glass: rgba(30, 41, 59, 0.7);
  --color-primary: #8b5cf6;
  --color-primary-hover: #7c3aed;
  --color-secondary: #06b6d4;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-error: #ef4444;
  --p-tabs-tablist-background: #0f172a;
}

body {
  margin: 0;
  background-color: #0f172a;
  color: #f8fafc;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  font-size: 0.875rem;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.08), transparent 25%);
}

#app {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Glassmorphism utility */
.glass-panel {
  background: var(--color-surface-glass) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* =========================================
   GLOBAL PRIMEVUE COMPONENT OVERRIDES
   ========================================= */

/* --- Buttons --- */
.p-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.75rem;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  text-decoration: none;
}

.p-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.p-button:active {
  transform: translateY(0);
}

/* --- SelectButton (Segmented Control) --- */
/* Контейнер */
.p-selectbutton {
  display: flex;
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 4px;
  gap: 0;
}

/* Кнопки внутри */
.p-selectbutton .p-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important; /* Убираем фон по умолчанию */
  border: none !important;            /* Убираем рамки по умолчанию */
  color: #94a3b8;                     /* Цвет неактивного текста */
  padding: 0.6rem 0.5rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  margin: 0;
  box-shadow: none !important;
}

/* Активная кнопка */
.p-selectbutton .p-button.p-highlight {
  background: rgba(139, 92, 246, 0.2) !important;
  color: #a78bfa !important;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.15) !important;
}

/* Ховер на неактивной кнопке */
.p-selectbutton .p-button:not(.p-highlight):hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #f1f5f9 !important;
}

/* Фокус */
.p-selectbutton .p-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.5) !important;
  z-index: 1;
}

/* --- FileUpload --- */
.p-fileupload {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.p-fileupload-buttonbar {
  display: flex;
  gap: 0.75rem;
  background: transparent;
  border: none;
  padding: 0;
}

.p-fileupload-content {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.p-fileupload-content:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.02);
}

/* --- Tabs --- */
.p-tabs {
  background: transparent;
}

.p-tablist {
  background: transparent;
  border: none;
}

.p-tablist-tab-list {
  display: flex;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.4);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: fit-content;
}

.p-tab {
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none !important;
  background: transparent !important;
}

.p-tab-active {
  background: rgba(139, 92, 246, 0.1) !important;
  color: #a78bfa !important;
}

.p-tab-active-bar {
  display: none !important;
}

/* --- Textarea / Inputs --- */
.p-textarea,
.p-inputtext {
  width: 100%;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 0.5rem !important;
  color: white !important;
  font-size: 0.8125rem !important;
  transition: all 0.3s ease !important;
}

.p-textarea:focus,
.p-inputtext:focus {
  outline: none !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1) !important;
}

/* --- ProgressSpinner --- */
.p-progress-spinner-circle {
  stroke: #8b5cf6 !important;
}

/* --- Dialog --- */
.p-dialog {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.5);
}

.p-dialog-header {
    background: transparent !important;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
}

.p-dialog-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.p-dialog-content {
    background: transparent !important;
    padding: 1.5rem;
    color: #f8fafc;
}

.p-dialog-header-icon {
    color: #94a3b8 !important;
}
.p-dialog-header-icon:hover {
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
}
