/* MAX — Написать в чат без добавления контакта */
/* Дизайн в стиле MAX: минимализм, белый фон, чистые цвета */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #ffffff;
  --surface: #f9fafb;
  --text: #000000;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --surface: #1f2937;
    --text: #ffffff;
    --text-secondary: #9ca3af;
    --border: #374151;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  font-size: 56px;
  margin-bottom: 8px;
}

.logo-text {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 4px;
}

h1 {
  text-align: center;
  color: var(--text);
  font-size: 26px;
  margin-bottom: 32px;
  line-height: 1.3;
  font-weight: 600;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.phone-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-weight: 600;
  pointer-events: none;
  z-index: 10;
}

.phone-input {
  width: 100%;
  padding: 16px 16px 16px 56px;
  font-size: 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.2s ease;
}

.phone-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.checkbox-group:hover {
  background: var(--surface);
}

.checkbox-group input {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-group label {
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.info-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 24px;
  line-height: 1.5;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  body {
    padding: 10px;
    align-items: flex-start;
    min-height: auto;
    padding-top: 40px;
  }

  .container {
    padding: 32px 24px;
    margin-bottom: 40px;
  }

  h1 {
    font-size: 22px;
    line-height: 1.3;
  }

  .logo-icon {
    font-size: 48px;
  }

  .logo-text {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
    align-items: flex-start;
  }

  .container {
    padding: 24px 16px;
    border-radius: 12px;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .logo-icon {
    font-size: 40px;
  }

  .logo-text {
    font-size: 28px;
  }

  .phone-input {
    font-size: 16px;
    padding: 14px 14px 14px 50px;
  }

  .btn-primary {
    font-size: 16px;
    padding: 14px;
  }

  .info-text {
    font-size: 13px;
    margin-top: 16px;
  }
}

@media (max-width: 360px) {
  body {
    padding: 0;
  }

  .container {
    padding: 20px 12px;
    border-radius: 8px;
  }

  h1 {
    font-size: 18px;
  }

  .logo-text {
    font-size: 24px;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  body {
    background: white;
  }

  .container {
    box-shadow: none;
    padding: 0;
  }

  .btn-primary,
  .checkbox-group {
    display: none;
  }
}

/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Loading state */
.btn-primary.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* Error state for input */
.phone-input.error {
  border-color: #ef4444;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Success state */
.phone-input.success {
  border-color: #10b981;
}
