html {
  line-height: 1.15;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: #F8F1E9;
}

article,
aside,
footer,
header,
nav,
section {
  display: block;
}

.header-shadow {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.order-info {
  height: 100%;
  width: 100%;
  max-width: 100vw;
  background-color: #D4A017;
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  transition: opacity 500ms ease;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 20px;
}

h1, h3 {
  font-family: 'Poppins', sans-serif;
  color: #0A3D62;
}

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

figcaption,
figure,
main {
  display: block;
}

figure {
  margin: 1em 40px;
}

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}

pre {
  font-family: monospace, monospace;
  font-size: 1em;
}

a {
  background-color: transparent;
  -webkit-text-decoration-skip: objects;
}

abbr[title] {
  border-bottom: none;
  text-decoration: underline;
  text-decoration: underline dotted;
}

b,
strong {
  font-weight: bolder;
}

code,
kbd,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

dfn {
  font-style: italic;
}

mark {
  background-color: #D4A017;
  color: #0A3D62;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

audio,
video {
  display: inline-block;
}

audio:not([controls]) {
  display: none;
  height: 0;
}

img {
  border-style: none;
}

svg:not(:root) {
  overflow: hidden;
}

button,
input,
optgroup,
select,
textarea {
  font-family: 'Poppins', sans-serif;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

button,
html [type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

fieldset {
  padding: 0.35em 0.75em 0.625em;
  border: 0;
}

legend {
  box-sizing: border-box;
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal;
}

progress {
  display: inline-block;
  vertical-align: baseline;
}

textarea {
  overflow: auto;
}

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box;
  padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

details,
menu {
  display: block;
}

summary {
  display: list-item;
}

canvas {
  display: inline-block;
}

template {
  display: none;
}

[hidden] {
  display: none;
}

html {
  height: 100%;
}

* {
  box-sizing: border-box;
}

.container {
  max-width: 800px; /* Constrain container width */
  margin: 0 auto;
  padding: 0 15px;
}

.s01 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0A3D62 0%, #3E7C96 100%);
  padding: 20px;
}

.s01 form {
  width: 100%;
  max-width: 800px; /* Fixed max-width for desktop */
  margin: 0 auto; /* Center form */
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  padding: 20px;
}

.s01 form legend {
  font-size: 48px;
  line-height: 1.2;
  color: #0A3D62;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
}

.s01 form .inner-form {
  padding: 15px;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap; /* Keep inputs in a single row on desktop */
}

.s01 form .inner-form .input-field {
  margin-right: 15px;
  height: 48px;
  flex: 1;
  min-width: 0;
}

.s01 form .inner-form .input-field input,
.s01 form .inner-form .input-field select {
  height: 100%;
  background: #F8F1E9;
  border-radius: 8px;
  border: 1px solid #0A3D62;
  display: block;
  width: 100%;
  padding: 10px 15px;
  font-size: 16px;
  color: #0A3D62;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.s01 form .inner-form .input-field input:focus,
.s01 form .inner-form .input-field select:focus {
  border-color: #D4A017;
  box-shadow: 0 0 8px rgba(212, 160, 23, 0.3);
  outline: none;
}

.s01 form .inner-form .input-field input::placeholder,
.s01 form .inner-form .input-field select::placeholder {
  color: #6B7280;
  font-size: 16px;
}

.s01 form .inner-form .input-field.first-wrap {
  flex-grow: 1;
}

.s01 form .inner-form .input-field.second-wrap {
  width: 25%; /* Reduced to fit within container */
  min-width: 100px;
}

.s01 form .inner-form .input-field.third-wrap {
  width: 100px; /* Reduced to fit */
  margin-right: 0;
}

.s01 form .inner-form .input-field.third-wrap .btn-search {
  height: 100%;
  width: 100%;
  background: linear-gradient(135deg, #0A3D62 0%, #3E7C96 100%);
  white-space: nowrap;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #F8F1E9;
  transition: all 0.3s ease;
  border: 0;
  cursor: pointer;
}

.s01 form .inner-form .input-field.third-wrap .btn-search:hover {
  background: linear-gradient(135deg, #092c4c 0%, #326b85 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
  max-width: 800px; /* Match form width */
  margin: 20px auto;
  padding: 0 15px;
}

.action-btn {
  display: inline-block;
  white-space: nowrap;
  text-align: center;
  padding: 14px 28px;
  background: linear-gradient(135deg, #0A3D62 0%, #3E7C96 100%);
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  color: #F8F1E9;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
  text-overflow: ellipsis;
  overflow: hidden;
}

.action-btn:hover {
  background: linear-gradient(135deg, #092c4c 0%, #326b85 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
  text-decoration: none;
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.5);
}

.modal-dialog {
  max-width: 800px; /* Match form width */
  margin: 1rem auto;
}

.modal-content {
  border-radius: 12px;
  border: none;
  background: #F8F1E9;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: #0A3D62;
  color: #F8F1E9;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding: 15px 20px;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
}

.modal-body {
  overflow-y: auto;
  max-height: 60vh;
  padding: 20px;
}

.modal-footer {
  border-top: none;
  padding: 15px 20px;
}

.modal-footer .btn {
  background: #D4A017;
  color: #0A3D62;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.modal-footer .btn:hover {
  background: #b88b14;
  transform: translateY(-2px);
}

.table-responsive {
  overflow-x: auto;
}

.table {
  background: #F8F1E9;
  color: #0A3D62;
}

.table th {
  background: #0A3D62;
  color: #F8F1E9;
  font-weight: 600;
  font-size: 14px;
  padding: 10px;
}

.table td {
  font-size: 14px;
  padding: 10px;
  border-bottom: 1px solid #E5E7EB;
}

.table-hover tbody tr:hover {
  background: #E5E7EB;
}

#errorModal .modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
}

#errorModal h3 {
  font-size: 18px;
  color: #D4A017;
  font-weight: 700;
  background: rgba(10, 61, 98, 0.9);
  padding: 15px;
  margin: 20px auto;
  text-align: center;
  max-width: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.map-container {
  width: 100%;
  max-width: 800px; /* Match form width */
  margin: 20px auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

iframe {
  width: 100%;
  max-width: 100vw;
  height: 350px;
  border: none;
}

@media screen and (min-width: 768px) {
  .s01 form .inner-form {
    flex-wrap: nowrap; /* Ensure single row on desktop */
  }

  .s01 form .inner-form .input-field.second-wrap {
    width: 25%;
    min-width: 100px;
  }

  .s01 form .inner-form .input-field.third-wrap {
    width: 100px;
  }
}

@media screen and (max-width: 767px) {
  .s01 {
    padding: 10px;
  }

  .s01 form {
    padding: 15px;
    max-width: 100%; /* Full width on mobile */
  }

  .s01 form legend {
    font-size: 28px;
    margin-bottom: 10px;
  }

  .s01 form .inner-form {
    flex-wrap: wrap;
    padding: 10px;
  }

  .s01 form .inner-form .input-field {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
  }

  .s01 form .inner-form .input-field input,
  .s01 form .inner-form .input-field select {
    padding: 8px 10px;
    font-size: 14px;
  }

  .s01 form .inner-form .input-field.first-wrap,
  .s01 form .inner-form .input-field.second-wrap,
  .s01 form .inner-form .input-field.third-wrap {
    width: 100%;
    min-width: 0;
  }

  .s01 form .inner-form .input-field.third-wrap .btn-search {
    font-size: 14px;
  }

  .button-container {
    max-width: 100%;
    padding: 0 10px;
  }

  .action-btn {
    padding: 10px 20px;
    font-size: 16px;
    max-width: 100%;
  }

  .modal-dialog {
    max-width: 95vw;
  }

  .modal-title {
    font-size: 20px;
  }

  .table th,
  .table td {
    font-size: 12px;
    padding: 6px;
  }

  #errorModal h3 {
    font-size: 16px;
    padding: 10px;
  }

  iframe {
    height: 200px;
  }
}