/* 
 * EchoeSeed Text Capsule - Mobile Styles
 * Specifically optimized for smaller screens
 */

@media (max-width: 768px) {
  /* General Adjustments */
  html {
    font-size: 15px;
  }
  
  body {
    -webkit-text-size-adjust: 100%;
  }
  
  /* Container Adjustments */
  .echoe-seed-container {
    padding: var(--echoeback-spacing-sm);
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  
  /* Typography Adjustments */
  h1, h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  /* Form Layouts */
  .echoe-seed-form-row {
    flex-direction: column;
    margin: 0;
  }
  
  .echoe-seed-form-row .echoe-seed-form-group {
    flex: 1 0 100%;
    margin: 0 0 var(--echoeback-spacing-md);
  }
  
  .echoe-seed-form-actions {
    flex-direction: column;
    gap: var(--echoeback-spacing-sm);
  }
  
  .echoe-seed-form-actions .echoe-seed-button {
    width: 100%;
    margin-bottom: var(--echoeback-spacing-xs);
  }
  
  /* Stepper Adjustments */
  .echoe-seed-stepper {
    padding: 0 var(--echoeback-spacing-xs);
  }
  
  .echoe-seed-stepper .echoe-seed-step-label {
    display: none; /* Hide step labels on mobile */
  }
  
  .echoe-seed-stepper .echoe-seed-step-circle {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }
  
  /* Text Editor Adjustments */
  .echoe-seed-text-editor {
    margin-bottom: var(--echoeback-spacing-md);
  }
  
  .echoe-seed-editor-toolbar {
    flex-wrap: wrap;
    justify-content: space-around;
  }
  
  .echoe-seed-editor-button {
    padding: var(--echoeback-spacing-xs);
    margin: 2px;
    font-size: 1rem;
  }
  
  .echoe-seed-editor-content {
    min-height: 200px;
    padding: var(--echoeback-spacing-sm);
  }
  
  /* Review Screen Adjustments */
  .echoe-seed-review-grid {
    grid-template-columns: 100px 1fr;
    gap: var(--echoeback-spacing-xs);
  }
  
  .echoe-seed-review-message {
    max-height: 200px;
  }
  
  /* Calendar Adjustments */
  .echoe-seed-calendar-grid {
    gap: 3px;
  }
  
  .echoe-seed-calendar-day {
    padding: 5px;
    font-size: 0.8rem;
  }
  
  /* Button Adjustments */
  .echoe-seed-button {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    height: auto;
    min-height: 44px; /* Maintain touch size */
  }
  
  /* Mobile-First Touch Targets */
  .echoe-seed-checkbox input[type="checkbox"],
  .echoe-seed-rating-scale input[type="radio"] + label,
  .echoe-seed-button,
  .echoe-seed-calendar-day,
  .echoe-seed-editor-button {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Modal Adjustments */
  .echoe-seed-modal-content {
    width: 95%;
    max-width: 95%;
    max-height: 80vh;
    padding: var(--echoeback-spacing-sm);
  }
  
  .echoe-seed-modal-close {
    font-size: 24px;
    padding: 10px;
  }
  
  /* Thank You Page Adjustments */
  .echoe-seed-thankyou {
    padding: var(--echoeback-spacing-md) var(--echoeback-spacing-sm);
  }
  
  .echoe-seed-feedback-form {
    padding: var(--echoeback-spacing-md);
  }
  
  /* Fix Input Zooming on iOS */
  input[type="text"],
  input[type="email"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px; /* Prevent iOS zoom */
  }
  
  /* iOS Specific Fixes */
  @supports (-webkit-touch-callout: none) {
    input, select, textarea {
      font-size: 16px; /* Prevent zoom on focus */
    }
    
    /* Fix date input appearance */
    input[type="date"] {
      -webkit-appearance: none;
      appearance: none;
      height: auto;
      min-height: 44px;
    }
    
    /* Fix scroll bounce */
    html, body {
      position: fixed;
      width: 100%;
      height: 100%;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
    }
  }
  
  /* Full Width Elements */
  .echoe-seed-review,
  .echoe-seed-date-picker,
  .echoe-seed-text-editor,
  .echoe-seed-price-info {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Stacked Layout for Mobile */
  .echoe-seed-rating-scale {
    flex-direction: row;
    justify-content: space-between;
  }
  
  /* Improve Readability */
  .echoe-seed-review-value,
  .echoe-seed-price-display,
  .echoe-seed-thankyou-message p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

/* Extra Small Devices */
@media (max-width: 576px) {
  html {
    font-size: 14px;
  }
  
  /* Further Compact UI */
  .echoe-seed-step-circle {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
  }
  
  /* Full Width Buttons */
  .echoe-seed-button {
    width: 100%;
    justify-content: center;
    padding: 0.5rem 1rem;
  }
  
  /* Simplified Toolbar */
  .echoe-seed-editor-toolbar {
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Optimize Calendar */
  .echoe-seed-calendar-header {
    flex-direction: column;
    gap: var(--echoeback-spacing-xs);
    align-items: center;
  }
  
  .echoe-seed-calendar-title {
    font-size: 1rem;
    text-align: center;
  }
  
  /* Simplify Rating Scale */
  .echoe-seed-rating-labels {
    display: none;
  }
  
  .echoe-seed-rating-scale input[type="radio"] + label {
    width: 40px;
    height: 40px;
  }
}

/* Landscape Mode Adjustments */
@media (max-height: 480px) and (orientation: landscape) {
  .echoe-seed-stepper {
    margin-bottom: var(--echoeback-spacing-sm);
  }
  
  .echoe-seed-editor-content {
    min-height: 150px;
  }
  
  .echoe-seed-modal-content {
    max-height: 90vh;
  }
  
  .echoe-seed-review-message {
    max-height: 100px;
  }
  
  .echoe-seed-form-actions {
    margin-top: var(--echoeback-spacing-sm);
  }
}

/* Improve Mobile Performance */
@media (max-width: 768px) {
  /* Hardware acceleration */
  .echoe-seed-container,
  .echoe-seed-button,
  .echoe-seed-text-editor,
  .echoe-seed-modal-content {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  
  /* Reduce animations for better performance */
  .echoe-seed-animation-reduce {
    animation-duration: 0.2s !important;
    transition-duration: 0.2s !important;
  }
} 