/* Grey Solutions LLC — intake app styles.
   Mobile-first, single column. No external assets: everything is local,
   so the pages work with no third-party requests. */

:root {
  --navy: #0b2239;
  --navy-dark: #071627;
  --logo-blue: #53a6d6;
  --logo-blue-dark: #3d8ab8;
  --bg: #f4f7fa;
  --card: #ffffff;
  --text: #1a2a3a;
  --muted: #5a6b7a;
  --border: #d5dde4;
  --error-bg: #fdecea;
  --error-border: #e57373;
  --error-text: #8b1e1e;
  --success-bg: #e8f4ec;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--logo-blue-dark);
}

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--navy);
}

h2 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--navy);
}

.container {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header: white band so the dark logo reads correctly. */
.site-header {
  background: var(--card);
  border-bottom: 3px solid var(--logo-blue);
  padding: 14px 0;
}

.brand {
  display: block;
  max-width: 320px;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
}

main.container {
  padding-top: 24px;
  padding-bottom: 40px;
}

.intro {
  color: var(--muted);
  margin: 0 0 1rem;
}

/* Disclosure box, shown on the form and the confirmation screen. */
.disclosure {
  background: #e9f3fa;
  border-left: 4px solid var(--logo-blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 14px;
  margin: 0 0 1.25rem;
}

.disclosure p {
  margin: 0;
  font-size: 0.92rem;
}

/* Forms */
form {
  max-width: 100%;
}

fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}

legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.5rem;
}

.field {
  margin-bottom: 1rem;
  min-width: 0;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 520px) {
  .field-row {
    flex-direction: row;
    gap: 12px;
  }

  .field-row .field {
    flex: 1 1 0;
  }
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-size: 16px; /* 16px+ prevents auto-zoom on iOS */
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235a6b7a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--logo-blue);
  outline-offset: 2px;
  border-color: var(--logo-blue);
}

.radio-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio-pill {
  flex: 1 1 140px;
  margin: 0;
  cursor: pointer;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill span {
  display: block;
  text-align: center;
  font-weight: 600;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.radio-pill input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.radio-pill input:focus-visible + span {
  outline: 2px solid var(--logo-blue);
  outline-offset: 2px;
}

/* Honeypot: off-screen, never visible to people. */
.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Buttons */
.button-primary,
.button-secondary {
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 13px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  border: 1px solid transparent;
  max-width: 100%;
}

.button-primary {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.button-primary:hover {
  background: var(--navy-dark);
}

.button-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button-secondary {
  background: var(--card);
  color: var(--navy);
  border-color: var(--navy);
}

.button-secondary.small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.fine-print {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Errors */
.errors {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 1.25rem;
}

.errors p {
  margin: 0;
}

.errors ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

/* Confirmation */
.confirmation-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.summary,
.request-fields {
  margin: 1rem 0;
}

.summary div,
.request-fields div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.summary dt,
.request-fields dt {
  font-weight: 600;
  flex: 0 0 130px;
  color: var(--muted);
}

.summary dd,
.request-fields dd {
  margin: 0;
  flex: 1 1 160px;
  min-width: 0;
}

.contact-line {
  margin-top: 1rem;
}

/* Broker view */
.broker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.logout-form {
  margin: 0;
}

.count,
.empty-state {
  color: var(--muted);
}

.empty-state {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.request-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  min-width: 0;
}

.request-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.request-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.35rem 0 0;
}

.status-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-new {
  background: #e9f3fa;
  color: #1d5f86;
}

.status-working {
  background: #fff4d6;
  color: #7a5b00;
}

.status-quoted {
  background: var(--success-bg);
  color: #256b3a;
}

.status-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.status-form select {
  flex: 1 1 160px;
  width: auto;
}

/* Operator details + pre-filled form downloads on each request card. */
.operator-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.operator-form .field {
  margin-bottom: 0.75rem;
}

.forms-download {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.forms-download h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--navy);
}

.download-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.forms-download .fine-print {
  margin: 0.5rem 0 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #dbe7f0;
  padding: 24px 0 32px;
  text-align: center;
}

.site-footer a {
  color: #fff;
}

.footer-contact {
  margin: 0 0 0.5rem;
  overflow-wrap: anywhere;
}

.footer-note {
  margin: 0;
  font-size: 0.88rem;
  color: #9fb4c6;
}
