/* ============================== */
/* Responsive Media Queries File */
/* ============================== */

/* big tablets to computers 1024-3000px */
@media only screen and (max-width: 3000px) {
  h1 {
    font-size: 200%;
    color: antiquewhite;
    letter-spacing: 1px;
    word-spacing: 5px;
  }
}

/* Extra large screens */
@media only screen and (min-width: 1400px) {
  .container-index {
    max-width: 1320px;
    margin: 0 auto;
  }
  
  .container-index-form {
    max-width: 32%;
  }
}

/* Large screens - laptops/desktops */
@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .container-index-form {
    max-width: 31%;
  }
}

/* small tablets to big tablets 768-1023px */
@media only screen and (max-width: 1023px) {
  h1 {
    font-size: 200%;
    color: antiquewhite;
    letter-spacing: 1px;
    word-spacing: 5px;
  }

  .head-text-box {
    left: 6%;
  }

  .container-index {
    padding: 0 15px;
    gap: 15px;
  }

  .container-index-form {
    max-width: 48%;
    min-width: 48%;
  }

  .container-index-actionItems {
    max-width: 100%;
    min-width: 100%;
  }

  .List td {
    padding: 8px 4px;
    font-size: 0.85em;
    min-height: 50px;
  }

  .List th {
    padding: 6px 3px;
    font-size: 0.85em;
  }

  .List td.ListDescription {
    font-size: 0.8em;
  }

  /* Ensure no horizontal overflow on tablets */
  .table-responsive {
    overflow-x: visible;
  }

  /* Multi-line content adjustments for tablets */
  .cell-content {
    min-height: 45px;
  }

  .cell-primary {
    font-size: 0.9em;
  }

  .cell-secondary {
    font-size: 0.75em;
  }
}

/* small phones to small tablets 481px -767px */
@media only screen and (max-width: 767px) {
  .headertext {
    font-size: 120%;
    color: antiquewhite;
    letter-spacing: 1px;
    word-spacing: 5px;
  }

  .head-text-box {
    left: 35%;
    width: auto;
  }

  .check-description,
  .check-buttons {
    flex: 0 0 100%;
    text-align: center;
    justify-content: center;
    padding-right: 0;
  }

  .container-index {
    flex-direction: column;
    padding: 0 10px;
    gap: 15px;
  }

  .container-index-form,
  .container-index-actionItems {
    max-width: 100%;
    min-width: 100%;
    margin-bottom: 15px;
  }

  /* Make tables more compact but keep them as tables */
  .List {
    font-size: 0.75em;
    width: 100%;
  }

  .List td {
    padding: 10px 4px;
    min-width: auto;
    font-size: 0.8em;
    min-height: 60px;
  }

  .List th {
    padding: 8px 4px;
    min-width: auto;
    font-size: 0.8em;
  }

  .List td.ListDescription {
    min-width: auto;
    max-width: none;
    font-size: 0.75em;
  }

  /* Enhanced multi-line content for mobile */
  .cell-content {
    min-height: 55px;
    gap: 3px;
  }

  .cell-primary {
    font-size: 0.85em;
  }

  .cell-secondary {
    font-size: 0.7em;
  }

  .cell-meta {
    font-size: 0.65em;
  }
}

/* small phones 0-600px */
@media only screen and (max-width: 600px) {
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .container-form {
    width: 100%;
    min-width: unset;
    max-width: calc(100vw - 20px);
    padding: 10px;
    margin: 15px 5px;
  }

  .container-index {
    flex-direction: column;
    padding: 0 5px;
    gap: 10px;
    max-width: calc(100vw - 10px);
  }

  .container-index-form,
  .container-index-actionItems {
    max-width: calc(100vw - 10px);
    min-width: calc(100vw - 10px);
    margin-bottom: 10px;
    padding: 10px;
  }

  .container-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .morr-item {
    flex-direction: column;
    align-items: stretch;
  }

  .morr-label {
    width: 100%;
    text-align: left;
    padding: 5px 0;
  }

  .morr-textbox {
    width: 100%;
    padding-left: 0;
    flex-wrap: wrap;
  }

  .check-button {
    width: 100%;
    margin-bottom: 10px;
  }

  .cta-button {
    width: 100%;
    font-size: 1.1em;
    padding: 12px;
  }

  .content_title {
    font-size: 1.5em;
    margin-bottom: 15px;
    word-wrap: break-word;
  }

  /* Make tables stack vertically on small screens */
  .table-responsive {
    border: 0;
    overflow: visible;
  }

  .List thead {
    display: none;
  }

  .List,
  .List tbody,
  .List tr,
  .List td {
    display: block;
    width: 100%;
  }

  .List tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .List td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding: 8px 0 8px 40% !important;
    text-align: left !important;
    white-space: normal;
    min-width: auto;
  }

  .List td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 0;
    width: 35%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
    color: #8a0000;
    top: 8px;
  }

  .List td:last-child {
    border-bottom: 0;
  }

  /* Header adjustments for mobile */
  header {
    height: 120px;
    padding-top: 10px;
  }

  .head-text-box {
    left: 50%;
    transform: translateX(-50%);
    top: 20px;
  }

  .headertext {
    font-size: 100%;
  }
}

/* Print view */
@media only print {
  table {
    background-color: white;
    width: 8.5in;
    font-size: 12pt;
  }
  h4 {
    text-align: center;
    font-size: 16pt;
  }
  .spacer {
    height: 1px;
  }
  table.dreport tr {
    height: 1em;
  }
}

/* ============================== */
/* Modal Content Responsive Width */
/* ============================== */

.modal-content {
  width: 100%;
  max-width: 540px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

@media only screen and (min-width: 768px) {
  .modal-content {
    max-width: 720px;
  }
}

@media only screen and (min-width: 992px) {
  .modal-content {
    max-width: 960px;
  }
}

@media only screen and (min-width: 1200px) {
  .modal-content {
    max-width: 1140px;
  }
}
