:root {
  --bg: #e6e6e6;
  --panel: #bfbfbf;
  --label-bg: #ffea00;
  --label-text: #d40000;
  --eligible-bg: #2e7d32;
  --eligible-text: #ffffff;
  --not-bg: #c62828;
  --not-text: #ffffff;
  --border: #222222;
  --red-text: #d40000;
  --blue-text: #1a237e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Calibri, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem 2rem 1rem; /* ðŸ”¹ no top padding, keep sides & bottom */
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

.location-list {
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 26pt;
}

.location {
  margin: 0 0.5rem;
}

.location.red {
  color: var(--red-text);
}

.location.blue {
  color: var(--blue-text);
}

.separator {
  color: var(--border);
  font-weight: 400;
}

.title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.postcode {
  color: var(--red-text);
  font-weight: 700;
  font-size: 30pt;
}

.eligibility {
  color: var(--blue-text);
  font-weight: 700;
  font-size: 30pt;
}

.panel {
  background-color: var(--panel);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  min-width: 600px;
}

.enter-postcode {
  background-color: var(--label-bg);
  color: var(--label-text);
  border: 2px solid var(--border);
  padding: 0.4rem 1.5rem;
  font-weight: 700;
  font-size: 20pt;
  border-radius: 4px;
  white-space: nowrap;
  transition: all 0.2s ease;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.enter-postcode:hover {
  background-color: #ffe066;
  transform: translateY(-1px);
}

.enter-postcode:active {
  transform: translateY(0);
}

.arrow {
  color: var(--red-text);
  font-size: 4rem;
  font-weight: bold;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-container {
  flex: 1;
  height: 60px;
  display: flex;
  align-items: center;
}

#postcodeInput {
  width: 100%;
  height: 60px;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  font-size: 16pt;
  font-weight: 600;
  background-color: white;
  color: var(--border);
  box-sizing: border-box;
  text-align: center;
}

#postcodeInput:focus {
  outline: none;
  border-color: var(--red-text);
  box-shadow: 0 0 0 3px rgba(212, 0, 0, 0.1);
}

.status-box {
  min-width: 300px;
  height: 60px;
  padding: 1.5rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  font-weight: 700;
  font-size: 16pt;
  text-align: center;
  transition: all 0.3s ease;
  background-color: var(--blue-text);
  color: var(--eligible-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-box.eligible {
  background-color: var(--eligible-bg);
  color: var(--eligible-text);
}

.status-box.not-eligible {
  background-color: var(--not-bg);
  color: var(--not-text);
}

.status-box.typing {
  background-color: var(--not-bg);
  color: var(--not-text);
}

.status-box.empty {
  background-color: var(--blue-text);
  color: var(--eligible-text);
}

.error-banner {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background-color: var(--not-bg);
  color: var(--not-text);
  padding: 1rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.error-banner.hidden {
  display: none;
}

/* Responsive design */

@media (max-width: 900px) {
  .panel {
    flex-direction: column;
    width: 100% !important;
    max-width: 700px !important;
    min-width: 80vw !important;
    padding: 1rem;
    gap: 1rem;
  }

  .panel > *,
  .input-container,
  .status-box,
  .enter-postcode,
  #postcodeInput,
  .arrow {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100%;
  }

  .arrow {
    transform: rotate(90deg);
    margin: 0 auto;
    font-size: 2rem;
    height: auto;
  }

  #postcodeInput,
  .enter-postcode,
  .status-box {
    height: 50px;
    font-size: 1rem;
    padding: 0.6rem;
  }

  span {
    font-size: 1.6rem !important;
    white-space: normal !important;
    overflow-wrap: break-word;
    text-align: center;
  }

  body {
    padding: 1rem 0.5rem;
    overflow-x: hidden;
  }
  .logo {
    display: block;
    text-align: center;
    margin-bottom: 1rem;
  }

  .logo span,
  .auto-style14 {
    font-size: 3.5rem !important;
    line-height: 1.1;
    white-space: normal;
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .auto-style21,
  .auto-style37 {
    font-size: 1.2rem !important;
  }
  .auto-style53 {
    font-size: 0.8rem !important;
  }
  img {
    width: 100%;
    max-width: 500px;
  }
  main {
    padding: 20px 0px;
  }
  .equal {
    transform: none;
  }
  img {
    width: 100%;
    max-width: 500px;
  }
}
@media (max-width: 500px) {
  span {
    font-size: 1.2rem !important;
  }
}
