/* Mobile-Friendly Responsive CSS for Ace Recovery */

/* Prevent horizontal scrolling */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* Make images responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Fix FrontPage tables */
table {
  max-width: 100%;
  border-collapse: collapse;
}

/* Mobile styles - applies to screens 768px and smaller */
@media (max-width: 768px) {
  
  /* Increase base font size for readability on mobile */
  body {
    font-size: 16px !important;
    line-height: 1.6 !important;
    padding: 10px !important;
  }
  
  /* Force tables to be responsive */
  table {
    width: 100% !important;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Make table cells stack on mobile */
  table td {
    display: block;
    width: 100% !important;
    text-align: left !important;
    padding: 10px !important;
  }
  
  /* Remove fixed widths */
  table[width],
  td[width],
  img[width] {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Stack centered content */
  [align="center"] {
    text-align: center !important;
  }
  
  /* Make text links easier to tap on mobile */
  a {
    padding: 8px 0;
    display: inline-block;
    min-height: 44px;
    line-height: 1.4;
  }
  
  /* Style phone numbers for mobile */
  a[href^="tel"] {
    color: #0066cc !important;
    text-decoration: none !important;
    font-weight: bold !important;
    display: block;
    padding: 12px;
    background: #f0f0f0;
    border-radius: 5px;
    margin: 10px 0;
  }
  
  /* Make headings responsive */
  h1 {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }
  
  h2 {
    font-size: 20px !important;
    line-height: 1.3 !important;
  }
  
  h3 {
    font-size: 18px !important;
  }
  
  /* Fix any FrontPage style overrides */
  .style1, .style2, .style3, .style4, .style5, 
  .style6, .style7, .style8, .style9, .style10,
  .style11, .style12, .style13 {
    font-size: inherit !important;
  }
  
  /* Remove fixed margins on mobile */
  body {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Make centered tables full width on mobile */
  table[align="center"] {
    margin: 0 !important;
    width: 100% !important;
  }
}

/* Tablet styles - optional, for screens between 768px and 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  body {
    padding: 20px;
  }
  
  table {
    max-width: 100%;
  }
}