/**
 * AUTOMOTO.AI - Contact Page Styles
 * Contact form, methods, success state
 */

/* ============================================
   Liquid Background
   ============================================ */
.liquid-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.liquid-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, #764ba2 100%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #764ba2 0%, var(--md-sys-color-secondary, #BEC6DC) 100%);
  bottom: -100px;
  left: -100px;
  animation-delay: -7s;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary-container) 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

.shape-4,
.shape-5 {
  display: none;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 40px) scale(1.02); }
}

/* ============================================
   Hero Override for Contact
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(80px + var(--space-2xl)) var(--space-xl) var(--space-3xl);
}

.hero-content {
  width: 100%;
  max-width: 600px;
}

/* ============================================
   Contact Card
   ============================================ */
.contact-card {
  background: rgba(30, 32, 36, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl, 28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.light-theme .contact-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Contact Header
   ============================================ */
.contact-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.contact-icon {
  width: 72px;
  height: 72px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
}

.contact-icon .material-symbols-rounded {
  font-size: 36px;
  color: #0e1117;
}

.light-theme .contact-icon .material-symbols-rounded {
  color: #ffffff;
}

.contact-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-subtitle {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1rem;
}

/* ============================================
   Contact Methods
   ============================================ */
.contact-methods {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.contact-method {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--md-sys-color-surface-container);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.contact-method:hover {
  background: var(--md-sys-color-surface-container-high);
  transform: translateY(-2px);
  border-color: var(--md-sys-color-primary);
}

.contact-method .material-symbols-rounded {
  color: var(--md-sys-color-primary);
  font-size: 24px;
  flex-shrink: 0;
}

.contact-method-info {
  min-width: 0;
  flex: 1;
}

.contact-method-label {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
}

.contact-method-value {
  font-weight: 500;
  word-break: break-all;
  font-size: 0.875rem;
}

/* ============================================
   Divider
   ============================================ */
.divider {
  text-align: center;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 100px);
  height: 1px;
  background: var(--md-sys-color-outline-variant);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.divider span {
  display: inline-block;
  background: var(--md-sys-color-surface-container);
  padding: 0 var(--space-md);
  position: relative;
}

.light-theme .divider span {
  background: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Contact Form
   ============================================ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--md-sys-color-on-surface);
}

.form-label-optional {
  color: var(--md-sys-color-on-surface-variant);
  font-weight: normal;
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  background: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--radius-md);
  color: var(--md-sys-color-on-surface);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
}

.form-input::placeholder {
  color: var(--md-sys-color-outline);
}

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

/* ============================================
   Turnstile (CAPTCHA)
   ============================================ */
.turnstile-container {
  margin-bottom: var(--space-lg);
  min-height: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.turnstile-container:empty::after {
  content: 'Завантаження капчі...';
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
}

/* ============================================
   Form Actions
   ============================================ */
.form-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

/* ============================================
   Success State
   ============================================ */
.success-message {
  display: none;
  text-align: center;
  padding: var(--space-xl);
}

.success-message.show {
  display: block;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--md-sys-color-success, #7DD67D);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
}

.success-icon .material-symbols-rounded {
  font-size: 40px;
  color: #003921;
}

.success-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-text {
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--space-xl);
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
  from { transform: translateY(20px); }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .hero {
    padding-top: calc(100px + var(--space-2xl));
  }
}

@media (max-width: 480px) {
  .hero {
    padding: calc(70px + var(--space-lg)) var(--space-md) var(--space-lg);
  }
  
  .contact-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg, 24px);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
    min-width: unset;
  }

  .turnstile-container {
    overflow: hidden;
  }

  .cf-turnstile {
    transform: scale(0.85);
    transform-origin: left center;
  }
  
  .contact-methods {
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .contact-card {
    padding: var(--space-md);
  }

  .contact-title {
    font-size: 1.25rem;
  }

  .form-input {
    padding: var(--space-sm) var(--space-md);
  }
}
