/* ==========================================================================
   Safe Mauritius clone – styles replicating the Angular Material (indigo) look
   ========================================================================== */
:root {
  --primary: #3f51b5;
  --primary-dark: #303f9f;
  --error: #f44336;
  --success: #43a047;
  --text: #212529;
  --muted: rgba(0, 0, 0, .54);
  --border: rgba(0, 0, 0, .38);
  --divider: rgba(0, 0, 0, .12);
  --header-bg: #f5f5f5;
  --lang-active: #add8e6;
  --moh: #4c4c4c;
  --shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 20px; letter-spacing: .0178571429em;
  color: var(--text); background: #fff;
}
.app { display: flex; flex-direction: column; min-height: 100%; }
.content { flex: 1; padding: 0 12px 24px; max-width: 1400px; width: 100%; margin: 0 auto; }
h1, h2, h3 { font-weight: 500; }
p { margin: 0 0 12px; }
a { color: var(--primary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- header --------------------------------------------------- */
.moh-header { background: var(--header-bg); min-height: 128px; display: flex; flex-direction: column; }
.toolbar-row { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.moh-link { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.moh-text { color: var(--moh); font-size: 16px; font-weight: 500; letter-spacing: .25px; text-transform: uppercase; }
.mauritian-flag { display: flex; flex-direction: column; width: 28px; gap: 2px; }
.mauritian-flag span { height: 4px; display: block; }
.mauritian-flag span:nth-child(1) { background: #e5354b; }
.mauritian-flag span:nth-child(2) { background: #53abe1; }
.mauritian-flag span:nth-child(3) { background: #ecc849; }
.mauritian-flag span:nth-child(4) { background: #008000; }
.language-wrapper { display: flex; border: 1px solid #9e9e9e; border-radius: var(--radius); overflow: hidden; }
.language { padding: 0 6px; line-height: 30px; min-width: 34px; text-align: center; color: rgba(0,0,0,.87); text-decoration: none; font-size: 16px; }
.language:hover { background: rgba(0,0,0,.06); }
.language.active { background: var(--lang-active); font-weight: 700; }
.second-row { justify-content: flex-start; }
.moh-icon { height: 55px; width: auto; }

/* ---------- cards ---------------------------------------------------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin: 16px 0; padding: 16px 24px; }
.info-card summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 0; }
.info-card summary::-webkit-details-marker { display: none; }
.info-card h1 { font-size: 18px; font-weight: 400; color: #8a8a8a; margin: 0; flex: 1; line-height: 1.3; }
.info-icon { color: var(--primary); }
.chevron { color: var(--muted); transition: transform .2s; }
details[open] .chevron { transform: rotate(180deg); }
.info-body { padding: 8px 0 4px; }
.info-body p { font-size: 16px; line-height: 1.4; }

/* ---------- stepper header ------------------------------------------ */
.step-header { display: flex; align-items: center; list-style: none; padding: 8px 0 24px; margin: 0; overflow-x: auto; gap: 8px; border-bottom: 1px solid var(--divider); margin-bottom: 24px; }
.step-label { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--muted); flex: 1 0 auto; cursor: default; font-size: 14px; }
.step-label:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--divider); min-width: 16px; }
.step-icon { width: 24px; height: 24px; border-radius: 50%; background: var(--muted); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; font-weight: 500; }
.step-label.active { color: var(--text); }
.step-label.active .step-icon, .step-label.done .step-icon { background: var(--primary); }
.step-label.done { cursor: pointer; }
.step-text { overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.step-label.active .step-text { max-width: none; }

/* ---------- steps --------------------------------------------------- */
.step h2 { font-size: 20px; margin: 0 0 16px; display: flex; align-items: center; gap: 8px; }
.step h3 { font-size: 16px; font-weight: 400; margin: 8px 0 16px; }
.subheading { font-size: 16px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; align-items: start; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- outlined (Material) fields -------------------------------- */
.form-field { display: flex; flex-direction: column; position: relative; margin-bottom: 4px; }
.form-field > label { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.form-field input, .form-field select, .form-field textarea {
  font: inherit; font-size: 16px; padding: 14px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; outline: 0; color: var(--text); width: 100%; min-height: 52px;
}
.form-field textarea { resize: vertical; min-height: 84px; }
.form-field select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23757575' d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.form-field.invalid input, .form-field.invalid select, .form-field.invalid textarea { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.form-field.invalid > label { color: var(--error); }
.form-field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; padding-left: 12px; }
.form-field .error { font-size: 12px; color: var(--error); padding-left: 12px; min-height: 0; }
.form-field .error:empty { display: none; }
.form-field .error:not(:empty) { margin-top: 4px; }
.icon { display: inline-block; vertical-align: middle; flex: none; }
.help-icon { display: inline-flex; color: var(--muted); cursor: help; }
.help-icon .icon { width: 20px; height: 20px; }
.help-icon:hover, .help-icon:focus { color: var(--primary); outline: 0; }

.phone-row { display: flex; gap: 8px; }
.phone-row .dial-code { width: 40%; flex: none; }
.phone-row input { flex: 1; }
.phone-row .dial-code[data-locked] { pointer-events: none; background-color: #f5f5f5; }

.field-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; font-size: 16px; }
.radio-label { margin-right: 8px; }
.radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
input[type=radio], input[type=checkbox] { accent-color: var(--primary); width: 18px; height: 18px; margin: 0; cursor: pointer; }
.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 16px; padding: 12px 0; }
.checkbox.declaration { align-items: flex-start; margin-top: 16px; line-height: 1.4; }
.checkbox.declaration input { margin-top: 3px; flex: none; }
.checkbox.invalid span { color: var(--error); }

.symptom-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: 16px; }
.symptom-row:last-of-type { border-bottom: 0; }
.symptom-label { min-width: 240px; flex: 1; }
.symptom-row.invalid .symptom-label { color: var(--error); }
.text-danger { color: var(--error); font-size: 13px; margin-top: 8px; }

/* chips (countries visited) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; min-height: 52px; background: #fff; }
.chips:focus-within { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.chips input { border: 0 !important; box-shadow: none !important; padding: 6px 4px !important; min-height: 0 !important; flex: 1; min-width: 140px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #e0e0e0; border-radius: 16px; padding: 4px 8px 4px 12px; font-size: 14px; }
.chip-remove { border: 0; background: rgba(0,0,0,.15); color: #333; border-radius: 50%; width: 18px; height: 18px; line-height: 16px; cursor: pointer; padding: 0; font-size: 14px; }
.chip-remove:hover { background: rgba(0,0,0,.3); }

/* ---------- buttons -------------------------------------------------- */
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.btn-primary, .btn-text {
  font: 500 14px/36px Roboto, sans-serif; letter-spacing: .0892857143em; text-decoration: none; cursor: pointer;
  border: 0; border-radius: var(--radius); padding: 0 16px; height: 36px; display: inline-flex; align-items: center;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-primary:disabled { background: rgba(0,0,0,.12); color: rgba(0,0,0,.38); box-shadow: none; cursor: default; }
.btn-text { background: transparent; color: var(--primary); }
.btn-text:hover { background: rgba(63,81,181,.08); }
.required-note { font-size: 13px; margin: 8px 4px 16px; }

/* ---------- review (step 6) ----------------------------------------- */
.review h3 { font-size: 16px; font-weight: 500; margin: 16px 0 6px; color: var(--primary); }
.review dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 15px; }
.review dt { color: var(--muted); }
.review dd { margin: 0; word-break: break-word; }
@media (max-width: 600px) { .review dl { grid-template-columns: 1fr; } .review dt { margin-top: 6px; } }

/* ---------- success dialog ------------------------------------------ */
.dialog { max-width: 640px; margin: 32px auto; padding: 24px; font-size: 16px; }
.dialog-greeting { font-weight: 500; }
.ref { font-size: 14px; color: var(--muted); margin-top: 16px; }

/* ---------- footer --------------------------------------------------- */
.moh-footer { text-align: center; padding: 8px; font-size: 14px; box-shadow: 0 -1px 3px rgba(0,0,0,.12); background: #fff; }

/* ---------- desktop sizing (mirrors the original >=769px override) ----- */
@media (min-width: 769px) {
  .form-field > label, .radio, .checkbox, .symptom-row, .subheading, .text-danger, .field-row { font-size: 18px; }
  .form-field > label { font-size: 13px; }
  .form-field .error, .form-field .hint { font-size: 14px; }
  .btn-primary, .btn-text { font-size: 15px; }
}
