/* Diver forms (/forms/ and the six form pages) – shared stylesheet, loaded via front-matter `css:` */

/* Hero ------------------------------------------------------------------ */
.forms-hero { background-blend-mode: multiply; }
.forms-hero .divider { transform: scale(-1, 1); }
.forms-hero__title { font-size: 4vw; color: var(--white); }
.forms-hero__sub { color: var(--white); opacity: .9; font-size: 17px; padding-top: 12px; line-height: 1.6; }
.forms-hero__sub strong { font-weight: 600; }
@media (max-width: 767px) { .forms-hero__title { font-size: 7vw; } .forms-hero__sub { font-size: 15px; } }

/* Hub page cards --------------------------------------------------------- */
.forms-intro p { font-size: 17px; }
.forms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; width: 100%; }
.form-card { position: relative; background: var(--white); padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 2px 18px rgba(0, 0, 0, .06); border-top: 4px solid var(--primary); }
.form-card__num { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: var(--white); font-weight: 600; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.form-card.is-done { border-top-color: #2e9e5b; }
.form-card.is-done .form-card__num { background: #2e9e5b; }
.form-card.is-done .form-card__num::before { content: "✓"; }
.form-card.is-done .form-card__num span { display: none; }
.form-card__title { font-size: 20px; margin: 0; line-height: 1.25; }
.form-card__desc { flex: 1; line-height: 1.6; font-size: 15px; }
.form-card__meta { font-size: 13px; color: #888; }
.form-card__done { display: none; font-size: 13px; color: #2e9e5b; font-weight: 600; }
.form-card.is-done .form-card__done { display: block; }
.form-card .btn { align-self: flex-start; }
.forms-help { margin-top: 10px; font-size: 15px; line-height: 1.7; }

/* Steps strip on each form page ---------------------------------------- */
.form-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0 0 22px; border-bottom: 1px solid #e5e5e5; }
.form-steps li a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 20px; background: #eef3f7; color: var(--primary); font-size: 13px; font-weight: 500; text-decoration: none; line-height: 1.2; }
.form-steps li a span:first-child { width: 22px; height: 22px; border-radius: 50%; background: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.form-steps li.is-current a { background: var(--primary); color: var(--white); }
.form-steps li.is-done a span:first-child { background: #2e9e5b; color: var(--white); }
.form-steps li.is-done a span:first-child::before { content: "✓"; }
.form-steps li.is-done a span:first-child b { display: none; }
.form-steps li a:hover { background: #dbe7f0; }
.form-steps li.is-current a:hover { background: var(--primary); }

/* Card ----------------------------------------------------------------- */
.dform-card { background: var(--white); padding: 44px 48px 48px; width: 100%; max-width: 1000px; margin: 0 auto; box-shadow: 0 2px 22px rgba(0, 0, 0, .06); box-sizing: border-box; }
@media (max-width: 767px) { .dform-card { padding: 24px 18px 30px; } }
.dform__intro { margin-bottom: 26px; }
.dform__intro p { font-size: 16px; line-height: 1.7; padding-bottom: .8em; }
.dform__intro p:last-child { padding-bottom: 0; }
.dform__section { margin-top: 36px; }
.dform__section-title { font-size: 21px; letter-spacing: -.3px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid #eef3f7; }
.dform__section-title small { display: block; font-size: 14px; font-weight: 400; color: #888; letter-spacing: 0; margin-top: 4px; }
.dform__lead { font-size: 15px; color: #777; line-height: 1.6; margin: -6px 0 16px; }

/* Fields ---------------------------------------------------------------- */
.dform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 26px; }
.dform__field--full { grid-column: 1 / -1; }
@media (max-width: 767px) { .dform__grid { grid-template-columns: 1fr; } }
.dform__label { display: block; font-size: 14px; font-weight: 500; color: #333; margin-bottom: 7px; line-height: 1.4; }
.req { color: var(--secondary); font-weight: 600; }
.dform__input {
  display: block; width: 100%; margin: 0; padding: 13px 15px; border: 0; border-radius: 3px; box-sizing: border-box;
  background-color: #eeeeee; color: #333; font-family: var(--font); font-size: 15px; font-weight: 400; line-height: 1.4;
  -webkit-appearance: none; appearance: none;
}
.dform__input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.dform__input::placeholder { color: #999; opacity: 1; }
select.dform__input { padding-right: 38px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
select.dform__input:invalid, select.dform__input.is-placeholder { color: #999; }
input[type="date"].dform__input { min-height: 47px; }
input[type="file"].dform__input { padding: 10px 12px; font-size: 14px; }
input[type="file"].dform__input::file-selector-button { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--primary); background: var(--white); border: 1px solid var(--primary); border-radius: 3px; padding: 6px 12px; margin-right: 12px; cursor: pointer; }
.dform__phone { display: flex; gap: 8px; }
.dform__phone .dform__input--code { width: 150px; flex: 0 0 150px; }
.dform__phone .dform__input:not(.dform__input--code) { flex: 1; min-width: 0; }
@media (max-width: 420px) { .dform__phone .dform__input--code { width: 118px; flex-basis: 118px; padding-right: 30px; } }
.dform__hint { font-size: 13px; color: #888; margin-top: 6px; line-height: 1.5; }
.dform__error { display: none; color: var(--secondary); font-size: 13px; margin-top: 6px; line-height: 1.4; }
.dform__field.is-invalid .dform__error, .dform__yesno.is-invalid .dform__error, .dform__sig.is-invalid .dform__error, .dform__check-wrap.is-invalid .dform__error { display: block; }
.dform__field.is-invalid .dform__input, .dform__input.is-invalid { outline: 2px solid var(--secondary); outline-offset: -2px; background-color: #fdf1f1; }

/* Choices ------------------------------------------------------------- */
.dform__choices { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.dform__choice { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; color: #444; cursor: pointer; }
.dform__choice input { width: 19px; height: 19px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.dform__check-wrap { margin-top: 6px; }
.dform__check { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.65; color: #444; cursor: pointer; padding: 16px 18px; background: #f4f8fb; border-left: 4px solid var(--primary); }
.dform__check input { width: 20px; height: 20px; flex: 0 0 20px; margin: 3px 0 0; accent-color: var(--primary); cursor: pointer; }
.dform__check-wrap.is-invalid .dform__check { border-left-color: var(--secondary); background: #fdf1f1; }

/* Yes / No questions --------------------------------------------------- */
.dform__yesno { border: 0; padding: 16px 0; margin: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 24px; border-top: 1px solid #ececec; }
.dform__yesno:first-of-type { border-top: 0; }
.dform__q { flex: 1 1 60%; min-width: 240px; font-size: 15px; line-height: 1.65; color: #444; padding: 0; margin: 0; }
.dform__q b { color: var(--primary); font-weight: 600; margin-right: 6px; }
.dform__toggle { display: inline-flex; flex: 0 0 auto; border: 2px solid var(--primary); border-radius: 6px; overflow: hidden; }
.dform__toggle label { position: relative; cursor: pointer; }
.dform__toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.dform__toggle span { display: block; padding: 8px 22px; font-size: 14px; font-weight: 600; color: var(--primary); background: var(--white); line-height: 1.3; min-width: 40px; text-align: center; transition: background-color .15s, color .15s; }
.dform__toggle label + label span { border-left: 2px solid var(--primary); }
.dform__toggle input:checked + span { background: var(--primary); color: var(--white); }
.dform__toggle input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }
.dform__toggle:hover span { background: #eef3f7; }
.dform__toggle:hover input:checked + span { background: var(--primary); }
.dform__yesno.is-invalid .dform__toggle { border-color: var(--secondary); }
.dform__yesno.is-invalid .dform__toggle label + label span { border-left-color: var(--secondary); }
.dform__yesno .dform__error { flex-basis: 100%; margin-top: -4px; }
.dform__box { flex-basis: 100%; margin: 4px 0 0; padding: 4px 22px 6px; border-left: 4px solid var(--accent); background: #f4f9fd; }
.dform__box-title { font-size: 14px; font-weight: 600; color: var(--primary); margin: 12px 0 4px; }
.dform__box .dform__yesno { padding: 12px 0; }
.dform__box .dform__q { font-size: 14px; }
.dform__box .dform__q b { color: #555; }
.dform__group[hidden] { display: none !important; }
.dform__note { font-size: 14px; line-height: 1.6; color: #666; padding: 14px 18px; background: #fff8e6; border-left: 4px solid #f0b429; margin-top: 16px; }
.dform__note strong { color: #333; }

/* Legal text ---------------------------------------------------------- */
.form-legal { font-size: 15px; line-height: 1.7; color: #555; }
.form-legal p { margin: 0 0 1em; }
.form-legal p:last-child { margin-bottom: 0; }
.form-legal strong { color: #333; }
.form-legal__title { font-size: 18px; margin: 0 0 12px; }
.form-legal__list { margin: 0 0 1em; padding-left: 1.5em; }
.form-legal__list li { margin-bottom: .55em; padding-left: .2em; }
.form-legal__list li::marker { color: var(--primary); font-weight: 600; }
.form-legal__arabic { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e5e5e5; font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, "Geeza Pro", Arial, sans-serif; font-size: 17px; line-height: 2; text-align: right; }
.form-legal__arabic .form-legal__list { padding: 0 1.6em 0 0; }
.form-legal__arabic .form-legal__title { text-align: right; }
.form-legal__caps { text-transform: none; font-weight: 600; color: #333; }
.dform__echo { display: inline-block; min-width: 120px; padding: 0 4px; font-weight: 600; color: var(--primary); border-bottom: 2px solid var(--primary); text-align: center; line-height: 1.3; }
.dform__inline-name { display: inline-block; width: 260px; max-width: 100%; margin: 0 6px 6px 0; padding: 8px 12px; vertical-align: middle; }
.dform__scroll { max-height: 360px; overflow-y: auto; padding: 18px 22px; border: 1px solid #e3e3e3; background: #fafafa; }
.dform__scroll-hint { font-size: 13px; color: #888; margin: 8px 0 0; }

/* Signature ------------------------------------------------------------ */
.dform__sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 26px; margin-top: 20px; }
@media (max-width: 767px) { .dform__sigs { grid-template-columns: 1fr; } }
.dform__sig-pad { position: relative; height: 190px; border: 2px dashed #b9b9b9; border-radius: 8px; background: var(--white); touch-action: none; overflow: hidden; }
.dform__sig-pad canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.dform__sig-pad::after { content: "Sign here with your finger, mouse or pen"; position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 13px; color: #aaa; pointer-events: none; }
.dform__sig-pad::before { content: ""; position: absolute; left: 24px; right: 24px; bottom: 44px; border-bottom: 1px solid #ddd; pointer-events: none; }
.dform__sig.has-ink .dform__sig-pad::after { display: none; }
.dform__sig.has-ink .dform__sig-pad { border-style: solid; border-color: var(--primary); }
.dform__sig.is-invalid .dform__sig-pad { border-color: var(--secondary); background: #fdf1f1; }
.dform__sig-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.dform__sig-clear { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--primary); background: none; border: 1px solid var(--primary); border-radius: 3px; padding: 5px 12px; cursor: pointer; }
.dform__sig-clear:hover { background: #eef3f7; }
.dform__sig-optional { font-size: 13px; color: #888; }

/* Submit ---------------------------------------------------------------- */
.dform__actions { margin-top: 34px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dform__submit { font-size: 17px; }
.dform__submit[disabled] { opacity: .6; cursor: wait; }
.dform__privacy { font-size: 13px; color: #888; line-height: 1.5; flex: 1; min-width: 200px; }
.dform__message { margin-top: 18px; padding: 14px 18px; font-size: 15px; line-height: 1.6; border-left: 4px solid var(--primary); background: #eef3f7; color: #333; }
.dform__message.is-error { border-left-color: var(--secondary); background: #fdecec; color: #b3261e; }
.dform__message[hidden] { display: none; }
.dform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Success panel ---------------------------------------------------------- */
.dform__success { text-align: center; padding: 20px 6px 10px; }
.dform__success-icon { width: 76px; height: 76px; border-radius: 50%; background: #2e9e5b; color: var(--white); font-size: 40px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.dform__success h2 { margin-bottom: 14px; }
.dform__success p { font-size: 16px; line-height: 1.7; margin: 0 0 12px; }
.dform__ref { display: inline-block; font-family: Menlo, Consolas, monospace; font-size: 18px; letter-spacing: 1px; background: #f2f2f2; padding: 8px 16px; border-radius: 4px; margin: 4px 0 14px; color: #333; }
.dform__success .dform__note { text-align: left; margin: 10px 0 20px; }
.dform__success-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }

/* Guardian options on the forms + the remote-signing page ------------- */
.dform__choices--stack { flex-direction: column; gap: 10px; margin: 14px 0 6px; }
.dform__guardian { margin: 22px 0 6px; padding: 4px 22px 18px; border-left: 4px solid #f0b429; background: #fffaf0; }
.dform__guardian .dform__note { margin: 14px 0 0; padding-left: 0; background: none; border: 0; }
.dform__guardian-details { margin-top: 14px; }
.guardian-status { margin-bottom: 10px; }
.guardian-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 24px; margin: 0 0 20px; padding: 18px 22px; background: #f4f8fb; border-left: 4px solid var(--primary); }
.guardian-summary dt { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #888; margin-bottom: 3px; }
.guardian-summary dd { margin: 0; font-size: 16px; font-weight: 500; color: #333; }
.guardian-summary__pdf { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 10px; }
