/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "GDS Transport", Arial, sans-serif;
  font-size: 19px;
  line-height: 1.31579;
  color: #0b0c0c;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.content-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ==========================================================================
   Header Bar
   ========================================================================== */
.gov-header {
  background-color: #0b0c0c;
  color: #ffffff;
  padding: 10px 0;
}

.header-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo::before {
  content: "♛";
  font-size: 22px;
}

.service-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
}

/* Sub-header / Logo Section */
.sub-header {
  background-color: #ffffff;
  padding: 20px 0 10px;
  border-bottom: 1px solid #ffffff;
}

.org-logo {
  display: inline-block;
  position: relative;
  padding-bottom: 6px;
}

.org-text {
  font-size: 22px;
  font-weight: 700;
  color: #2b3a8c;
  letter-spacing: -0.3px;
}

.org-region {
  color: #009390;
}

.org-swoosh {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #4b286d 0%, #2b3a8c 50%, #009390 100%);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: rotate(-1.5deg);
  margin-top: 2px;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.main-content {
  padding-top: 20px;
  padding-bottom: 40px;
}

/* Links */
.gov-link {
  color: #1d70b8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gov-link:hover {
  color: #003078;
}

.gov-link:focus {
  background-color: #ffdd00;
  color: #0b0c0c;
  outline: 3px solid #ffdd00;
  text-decoration: none;
}

/* ==========================================================================
   Important Notification Banner
   ========================================================================== */
.notification-box {
  margin-bottom: 30px;
  border: 4px solid #1d70b8;
}

.notification-banner-header {
  background-color: #1d70b8;
  color: #ffffff;
  padding: 6px 15px;
}

.notification-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.notification-banner-content {
  padding: 18px 15px;
  background-color: #ffffff;
}

.notification-banner-content p {
  margin-bottom: 14px;
  font-size: 18px;
  line-height: 1.4;
}

.notification-banner-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Card Layouts
   ========================================================================== */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: stretch;
}

.two-column-layout.single-card-layout {
  display: block;
  max-width: 580px;
  margin: 0 auto;
}

.portal-card {
  border: 1px solid #b1b4b6;
  padding: 24px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
}

.card-heading {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 22px;
  color: #0b0c0c;
}

.card-text {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 18px;
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0b0c0c;
}

.form-input {
  font-family: inherit;
  font-size: 19px;
  line-height: 1.3;
  width: 100%;
  max-width: 290px;
  height: 40px;
  padding: 5px 8px;
  border: 2px solid #0b0c0c;
  border-radius: 0;
  background-color: #ffffff;
}

.form-input:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px #0b0c0c;
}

.form-help-link {
  margin-top: 8px;
  font-size: 16px;
}

/* Custom Large Checkbox (GDS Style) */
.checkbox-group {
  margin-top: 22px;
  margin-bottom: 25px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 36px;
  border: 2px solid #0b0c0c;
  background-color: #ffffff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.custom-checkbox:focus {
  outline: 3px solid #ffdd00;
}

.custom-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  width: 9px;
  height: 18px;
  border: solid #0b0c0c;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.checkbox-label {
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}

/* Buttons */
.gov-button {
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  background-color: #00703c;
  border: none;
  border-radius: 0;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 2px 0 #002d18;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.gov-button:hover {
  background-color: #005a30;
}

.gov-button:focus {
  background-color: #005a30;
  outline: 3px solid #ffdd00;
  outline-offset: 0;
  color: #ffffff;
}

.gov-button:active {
  top: 2px;
  box-shadow: none;
}

.card-action-bottom {
  margin-top: auto;
  padding-top: 25px;
}

/* Bullet list */
.bullet-list {
  list-style-type: disc;
  padding-left: 25px;
  margin-bottom: 25px;
}

.bullet-list li {
  margin-bottom: 14px;
  font-size: 18px;
  line-height: 1.4;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.gov-footer {
  background-color: #f3f2f1;
  border-top: 1px solid #b1b4b6;
  padding: 30px 0 40px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links-column {
  flex: 1;
  min-width: 220px;
}

.footer-list {
  list-style: none;
}

.footer-list li {
  margin-bottom: 10px;
}

.footer-link {
  font-size: 15px;
  color: #1d70b8;
  text-decoration: underline;
}

.footer-link:hover {
  color: #003078;
}

.footer-text {
  font-size: 15px;
  color: #0b0c0c;
}

.footer-copyright-col {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.copyright-box {
  background-color: #ffd800; /* Yellow highlight box from reference */
  padding: 8px 12px;
  text-align: center;
  max-width: 240px;
  border: 1px solid #cca300;
}

.crown-svg {
  display: block;
  margin: 0 auto 6px;
}

.copyright-text {
  font-size: 13px;
  line-height: 1.25;
  color: #0b0c0c;
  font-weight: 500;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .form-input {
    max-width: 100%;
  }

  .footer-meta {
    flex-direction: column;
  }

  .footer-copyright-col {
    justify-content: flex-start;
  }
}


/* ==========================================================================
   Error & Notification Summary (GDS Style)
   ========================================================================== */
.gov-error-summary {
  display: none;
  border: 4px solid #d4351c;
  padding: 16px 20px;
  margin-bottom: 25px;
  background-color: #ffffff;
}

.gov-error-summary:focus {
  outline: 3px solid #ffdd00;
}

.error-summary-title {
  color: #d4351c;
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 10px;
}

.error-summary-list {
  list-style: none;
  padding: 0;
}

.error-summary-list li {
  margin-bottom: 8px;
}

.error-summary-list a {
  color: #d4351c;
  font-weight: 700;
  text-decoration: underline;
}

.form-group-error {
  border-left: 4px solid #d4351c;
  padding-left: 12px;
  margin-left: -16px;
}

.form-error-message {
  display: none;
  color: #d4351c;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

.form-input-error {
  border: 2px solid #d4351c !important;
}

/* Success Confirmation Banner */
.gov-success-banner {
  display: none;
  border: 4px solid #00703c;
  background-color: #e7f4ea;
  padding: 18px 20px;
  margin-bottom: 25px;
}

.success-banner-title {
  color: #00703c;
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 6px;
}

.success-banner-body {
  font-size: 17px;
  color: #0b0c0c;
}


/* ==========================================================================
   Comprehensive Mobile & Small Screen Optimizations
   ========================================================================== */
@media (max-width: 600px) {
  body {
    font-size: 17px;
  }

  .content-container {
    padding: 0 12px;
  }

  .main-content {
    padding-top: 15px;
    padding-bottom: 25px;
  }

  /* Headings on mobile */
  .card-heading {
    font-size: 28px;
    margin-bottom: 16px;
  }

  .portal-card {
    padding: 16px;
  }

  /* Full-width action buttons on mobile */
  .gov-button {
    width: 100%;
    display: block;
    padding: 12px 16px;
    font-size: 18px;
  }

  /* Large touch targets for checkbox */
  .checkbox-wrapper {
    gap: 14px;
  }

  .custom-checkbox {
    width: 40px;
    height: 40px;
  }

  .custom-checkbox:checked::after {
    left: 12px;
    top: 6px;
    width: 10px;
    height: 20px;
  }

  /* Admin Console Responsive Polish */
  .admin-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .admin-header-row .gov-button {
    width: 100%;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  .search-box input {
    width: 100%;
  }

  .action-group {
    flex-wrap: wrap;
    gap: 6px;
  }

  .action-group button {
    padding: 6px 10px;
    font-size: 13px;
  }

  .notification-box {
    margin-bottom: 20px;
  }
}


/* ==========================================================================
   Second Page / Post-Login Form Styles
   ========================================================================== */
#second-page-container {
  display: none;
  max-width: 680px;
  margin: 0 auto 40px;
}

.select-input {
  font-family: inherit;
  font-size: 18px;
  line-height: 1.3;
  width: 100%;
  max-width: 380px;
  height: 42px;
  padding: 6px 10px;
  border: 2px solid #0b0c0c;
  background-color: #ffffff;
  border-radius: 0;
}

.select-input:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
}

.radio-group-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radio-item input[type="radio"] {
  width: 24px;
  height: 24px;
  accent-color: #0b0c0c;
  cursor: pointer;
}

.radio-item label {
  font-size: 18px;
  cursor: pointer;
}

.textarea-input {
  font-family: inherit;
  font-size: 18px;
  width: 100%;
  padding: 10px;
  border: 2px solid #0b0c0c;
  border-radius: 0;
  resize: vertical;
}

.textarea-input:focus {
  outline: 3px solid #ffdd00;
}
