/* NHS One-Page Website - Responsive Styles */

/* Mobile First - Base styles are already mobile-optimized in styles.css and components.css */

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
  /* Container adjustments */
  .container {
    margin: 0 auto;
    padding: 0 20px; /* Restore larger padding on desktop */
  }
  
  :root {
    --grid-margin: 20px; /* Restore larger margin on desktop */
  }
  
  /* Header improvements */
  .header {
    padding: 4rem 0;
  }
  
  .header__title {
    font-size: var(--font-size-h1-desktop);
    letter-spacing: var(--letter-spacing-h1);
  }
  
  /* Form step content */
  .form-step__content {
    max-width: 700px;
  }
  
  .form-step__title {
    font-size: var(--font-size-h2-desktop);
    letter-spacing: var(--letter-spacing-h2);
  }
  
  /* Form groups in two columns for some fields */
  .form-group--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  
  /* Option buttons in rows */
  .form-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  /* Navigation buttons */
  .form-navigation {
    justify-content: center;
    gap: 2rem;
  }
  
  .btn {
    min-width: 150px;
  }
  
  /* Registration banner */
  .registration-banner {
    padding: 20px 40px;
  }
  
  .registration-banner__content {
    padding: 0 var(--grid-margin);
  }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
  /* Enhanced spacing */
  .header {
    padding: 5rem 0;
  }
  
  .main {
    padding: 3rem 0;
  }
  
  /* Form improvements */
  .form-step__content {
    max-width: 800px;
  }
  
  .form-group {
    margin-bottom: 2rem;
  }
  
  /* Larger form fields */
  .form-field {
    padding: 16px 20px;
    font-size: 18px;
  }
  
  .option-button {
    padding: 16px 24px;
    font-size: 18px;
  }
  
  /* Button improvements */
  .btn {
    padding: 16px 32px;
    font-size: 18px;
    min-width: 180px;
  }
  
  /* Progress indicator */
  .progress__bar {
    height: 12px;
  }
  
  /* Registration banner */
  .registration-banner {
    padding: 24px 40px;
  }
  
  .registration-banner__text {
    font-size: 18px;
  }
  
  .registration-banner__action {
    font-size: 20px;
  }
}

/* Large Desktop Styles (1200px and up) */
@media (min-width: 1200px) {
  /* Maximum content width */
  .form-step__content {
    max-width: 900px;
  }
  
  /* Enhanced section numbers */
  .section-number {
    font-size: 140px;
    left: 40px;
  }
  
  /* Larger spacing */
  .header {
    padding: 6rem 0;
  }
  
  .main {
    padding: 4rem 0;
  }
}

/* Extra Large Screens (1400px and up) */
@media (min-width: 1400px) {
  .section-number {
    font-size: 160px;
    left: 60px;
  }
  
  .container {
    max-width: 1400px;
  }
}

/* Landscape Mobile Devices */
@media (max-width: 767px) and (orientation: landscape) {
  .header {
    padding: 1rem 0;
  }
  
  .header__title {
    font-size: 24px;
  }
  
  .header__subtitle {
    font-size: 16px;
  }
  
  .main {
    padding: 1rem 0;
  }
  
  .form-step__title {
    font-size: 20px;
    margin-bottom: 0.5rem;
  }
  
  .form-step__description {
    margin-bottom: 1rem;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .registration-banner {
    padding: 12px 16px;
  }
}

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
  :root {
    --grid-margin: 10px;
  }
  
  .header__title {
    font-size: 24px;
    line-height: 1.3;
  }
  
  .header__subtitle {
    font-size: 16px;
  }
  
  .form-step__title {
    font-size: 20px;
  }
  
  .form-field,
  .option-button {
    padding: 10px 14px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .btn {
    padding: 14px 20px;
    font-size: 16px;
    min-width: 100px;
  }
  
  .registration-banner {
    padding: 12px 16px;
  }
  
  .registration-banner__text {
    font-size: 14px;
  }
  
  .registration-banner__action {
    font-size: 16px;
  }
  
  .translation-selector {
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* Very Small Devices (below 320px) */
@media (max-width: 319px) {
  :root {
    --grid-margin: 10px;
  }
  
  .header__title {
    font-size: 20px;
  }
  
  .form-step__title {
    font-size: 18px;
  }
  
  .form-field,
  .option-button,
  .btn {
    font-size: 14px;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp borders and text */
  .form-field,
  .option-button,
  .btn,
  .checkbox-custom {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .form-field,
  .option-button,
  .btn,
  .checkbox-label {
    min-height: 48px;
  }
  
  .translation-selector {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .option-button:hover,
  .btn:hover,
  .registration-banner:hover {
    background-color: initial;
    border-color: initial;
  }
  
  /* Enhanced focus for touch */
  .form-field:focus,
  .option-button:focus-within,
  .btn:focus {
    outline-width: 3px;
  }
}

/* Print Styles */
@media print {
  /* Hide interactive elements */
  .registration-banner,
  .section-number,
  .form-navigation,
  .translation-selector {
    display: none !important;
  }
  
  /* Show all form steps */
  .form-step {
    display: block !important;
    page-break-inside: avoid;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
  }
  
  /* Adjust colors for print */
  body {
    background: white !important;
    color: black !important;
  }
  
  .form-field--valid,
  .form-field--invalid,
  .option-button--selected {
    background: white !important;
    color: black !important;
    border: 2px solid black !important;
  }
  
  /* Simplify layout */
  .container {
    max-width: none;
    margin: 0;
    padding: 0;
    display: block;
  }
  
  .header,
  .main {
    padding: 1rem 0;
  }
  
  /* Print-friendly typography */
  .header__title {
    font-size: 24pt;
  }
  
  .form-step__title {
    font-size: 18pt;
  }
  
  .form-label {
    font-size: 12pt;
    font-weight: bold;
  }
  
  .form-field {
    border: 1px solid black;
    padding: 0.5rem;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .section-number,
  .form-step,
  .progress__fill {
    transition: none !important;
    animation: none !important;
  }
  
  .section-number--entering,
  .section-number--exiting {
    transform: translateY(-50%) !important;
    opacity: 1 !important;
  }
}

/* Accessibility - High Contrast */
@media (prefers-contrast: high) {
  :root {
    --color-background: #ffffff;
    --color-gray-default: #cccccc;
    --color-green-approval: #008000;
    --color-blue-banner: #0000ff;
    --color-black-selection: #000000;
    --color-white-option: #ffffff;
    --color-red-reject: #ff0000;
  }
  
  .form-field,
  .option-button,
  .btn {
    border-width: 3px !important;
  }
  
  .form-field:focus,
  .option-button:focus-within,
  .btn:focus {
    outline-width: 4px !important;
  }
}

 