/* ===== BUTTONS.CSS ===== */
/* Единый файл для всех стилей кнопок */

/* ----- БАЗОВЫЕ СТИЛИ КНОПОК ----- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  line-height: 1.2;
  white-space: nowrap;
}

/* Размеры кнопок */
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-full {
  width: 100%;
  display: block;
}

/* ----- ОСНОВНЫЕ ЦВЕТА КНОПОК ----- */

/* Primary - основной фиолетовый */
.btn-primary {
  background: linear-gradient(135deg, #7c6cff, #5b4fff);
  color: white;
  box-shadow: 0 4px 15px rgba(124, 108, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8a7cff, #6a5ae0);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 108, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(124, 108, 255, 0.3);
}

/* Secondary - прозрачная с обводкой */
.btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Outline вариант */
.btn-outline {
  background: transparent;
  color: #7c6cff;
  border: 2px solid #7c6cff;
}

.btn-outline:hover {
  background: #7c6cff;
  color: white;
}

/* Кнопка консультации (специальный стиль для шапки) */
.btn-consult {
  background: #7c6cff;
  color: white;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-consult:hover {
  background: #8a7cff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 108, 255, 0.3);
}

/* ----- КНОПКИ В КАЛЬКУЛЯТОРАХ ----- */
.btn-calc {
  width: 100%;
  padding: 12px;
  background: #7c6cff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
}

.btn-calc:hover {
  background: #6a5ae0;
  transform: translateY(-2px);
}

.btn-calc:active {
  transform: translateY(0);
}

/* ----- КНОПКИ В HERO СЕКЦИИ ----- */
.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
  padding: 14px 26px; /* Чуть больше в hero */
  font-size: 16px;
}

/* ----- СОСТОЯНИЯ КНОПОК ----- */
.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Анимация загрузки */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ----- МОБИЛЬНАЯ АДАПТАЦИЯ ----- */
@media (max-width: 768px) {
  .btn {
    padding: 10px 20px;
    font-size: 15px;
  }
  
  .btn-lg {
    padding: 14px 28px;
    font-size: 16px;
  }
  
  .btn-consult {
    padding: 7px 14px;
    font-size: 13px;
  }
  
  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 12px 16px; /* Больше область касания */
    font-size: 16px;
    width: 100%; /* На мобильных кнопки часто на всю ширину */
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }
  
  .btn-consult {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ----- ПОДДЕРЖКА СТАРЫХ БРАУЗЕРОВ ----- */
/* Для браузеров без поддержки градиентов */
@supports not (background: linear-gradient(135deg, #7c6cff, #5b4fff)) {
  .btn-primary {
    background: #7c6cff;
  }
  
  .btn-primary:hover {
    background: #6a5ae0;
  }
}

/* Для IE */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .btn-primary {
    background: #7c6cff;
    filter: none;
  }
}