/* ============================================
   THE SOFTEN SOUL - FORM STYLES
   Stylesheet for Contact and Intake Forms
   ============================================ */

/* ============================================
   CSS VARIABLES - Customize these colors
   ============================================ */
:root {
  /* Brand Colors - Update these to match your website */
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  
  /* Feedback Colors */
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  
  /* Neutral Colors */
  --background: #ffffff;
  --surface: #f9fafb;
  --border: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

@media (min-width: 768px) {
  .container {
    padding: var(--spacing-2xl) var(--spacing-lg);
  }
}

/* ============================================
   HEADER
   ============================================ */
.form-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.form-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.form-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .form-header h1 {
    font-size: 2.5rem;
  }
}

/* ============================================
   FORM CARD
   ============================================ */
.form-card {
  background: var(--background);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .form-card {
    padding: var(--spacing-2xl);
  }
}

/* ============================================
   FORM SECTIONS
   ============================================ */
.form-section {
  margin-bottom: var(--spacing-xl);
}

.form-section:last-of-type {
  margin-bottom: var(--spacing-lg);
}

.form-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border);
}

/* ============================================
   FORM GROUPS
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   LABELS
   ============================================ */
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.required {
  color: var(--error-color);
}

.optional {
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
}

/* ============================================
   INPUT FIELDS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
select:hover,
textarea:hover {
  border-color: var(--text-muted);
}

/* Placeholder styling */
::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/* Textarea specific */
textarea {
  resize: vertical;
  min-height: 120px;
}

/* Select dropdown */
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

/* Character counter */
.char-count {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: var(--spacing-xs);
}

/* ============================================
   CHECKBOX & CONSENT
   ============================================ */
.form-consent {
  margin: var(--spacing-xl) 0;
  padding: var(--spacing-md);
  background-color: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-loading {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* ============================================
   SPINNER
   ============================================ */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ============================================
   FORM MESSAGES (Success/Error)
   ============================================ */
.form-message {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
}

.form-message.success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.form-message.error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* ============================================
   ADDITIONAL INFO SECTIONS
   ============================================ */
.contact-info,
.privacy-note {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg);
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.contact-info h3,
.privacy-note p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.contact-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
}

.contact-info a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.contact-info a:hover {
  text-decoration: underline;
}

.privacy-note {
  border-left: 4px solid var(--primary-color);
}

/* ============================================
   HONEYPOT (Spam Prevention)
   ============================================ */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 640px) {
  .form-header h1 {
    font-size: 1.75rem;
  }
  
  .form-header p {
    font-size: 1rem;
  }
  
  .form-card {
    padding: var(--spacing-lg);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Screen reader only text */
.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;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */
.success-next-steps {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 2px solid #10b981;
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  text-align: center;
  margin-top: var(--spacing-xl);
}

.success-next-steps h3 {
  color: #065f46;
  font-size: 1.75rem;
  margin-bottom: var(--spacing-md);
}

.success-next-steps p {
  color: #047857;
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.success-next-steps p:last-child {
  margin-bottom: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  body {
    background: white;
  }
  
  .form-card {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  button {
    display: none;
  }
}

