/* ========================================
   OPENMINDED BOT — COMPONENTS
   ======================================== */

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.btn,
.btn-primary,
.btn-ghost,
.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}

.btn:active,
.btn-primary:active,
.btn-ghost:active,
.btn-text:active {
  transform: scale(0.98);
}

/* Primary */
.btn--primary,
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Secondary */
.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

/* Ghost */
.btn--ghost,
.btn-ghost,
.btn-text {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
  box-shadow: none;
}

.btn--ghost:hover,
.btn-ghost:hover,
.btn-text:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-2px);
}

/* Size modifiers */
.btn--lg,
.btn-primary.btn--lg,
.btn-ghost.btn--lg {
  padding: 16px 32px;
  font-size: var(--text-lg);
}

.btn--sm {
  padding: 10px 20px;
  font-size: var(--text-sm);
}

/* ----------------------------------------
   Cards
   ---------------------------------------- */
.card,
.pricing-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition-base),
              box-shadow var(--transition-base);
}

.card:hover,
.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card--featured,
.pricing-card--highlight {
  border: 2px solid var(--accent);
  position: relative;
}

.card--featured::before,
.pricing-card--highlight::before {
  content: "Рекомендуем";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--text-inverse);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 16px;
  border-radius: 100px;
}

/* Card content */
.pricing-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.pricing-card__price {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.pricing-card__price span {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pricing-card__features li {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

.pricing-card__features li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ----------------------------------------
   Tables
   ---------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table thead th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface);
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table tbody td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.table tbody tr:nth-child(even) {
  background: var(--surface);
}

.table tbody tr:hover {
  background: var(--surface-hover);
}

.table__check {
  color: var(--accent);
  font-weight: 600;
}

.table__cross {
  color: var(--text-muted);
}

/* ----------------------------------------
   Forms
   ---------------------------------------- */
.input,
.textarea,
.select {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.4;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235A5A66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 44px;
}

.label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input--error,
.textarea--error {
  border-color: var(--color-error);
}

.input--error:focus,
.textarea--error:focus {
  box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.1);
}

/* Checkbox & Radio */
.checkbox,
.radio {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--transition-fast),
              background-color var(--transition-fast);
}

.radio {
  border-radius: 50%;
}

.checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.radio:checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--bg);
}

/* ----------------------------------------
   Accordion
   ---------------------------------------- */
.accordion__item {
  border-bottom: 1px solid var(--border);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.accordion__trigger:hover {
  color: var(--accent);
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--transition-base),
              opacity var(--transition-base);
}

.accordion__item.is-open .accordion__content {
  max-height: 500px;
  opacity: 1;
}

.accordion__body {
  padding: 0 0 16px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ----------------------------------------
   Theme Toggle
   ---------------------------------------- */
.theme-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  gap: 2px;
}

.theme-toggle-option {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast),
              color var(--transition-fast);
}

.theme-toggle-option.active {
  background: var(--accent);
  color: var(--text-inverse);
}

.theme-toggle-option:hover:not(.active) {
  background: var(--surface-hover);
  color: var(--text);
}

/* ----------------------------------------
   Tabs
   ---------------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast),
              border-color var(--transition-fast);
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ----------------------------------------
   Glow Orb (decorative)
   ---------------------------------------- */
.glow-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 0, 127, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.glow-orb--cyan {
  background: radial-gradient(circle, rgba(0, 229, 255, 0.12) 0%, transparent 70%);
}

/* ----------------------------------------
   Skip Link
   ---------------------------------------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--text-inverse);
  padding: 8px 16px;
  z-index: 100;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ----------------------------------------
   Background Grid
   ---------------------------------------- */
.bg-grid {
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ----------------------------------------
   Card Gradient (legacy)
   ---------------------------------------- */
.card-gradient {
  position: relative;
  overflow: hidden;
}

.card-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--color-secondary));
  opacity: 0.1;
  z-index: 0;
}

.card-gradient > * {
  position: relative;
  z-index: 1;
}

/* ----------------------------------------
   Steps
   ---------------------------------------- */
.steps {
  position: relative;
}
