/* hca-permits — applicant-side styles. Theme-independent: everything is scoped to .hca-portal.
   Color and type are deliberately restrained (the wireframes are unstyled by design; the Hualālai brand comes later). */

.hca-portal {
	--hca-ink: #1a1a1a;
	--hca-muted: #5f5f5f;
	--hca-rule: #d4d4d4;
	--hca-fill: #f5f5f3;
	--hca-accent: #1f4e3d;
	--hca-warn-bg: #fbf0e2;
	--hca-warn-ink: #6a3a00;
	--hca-warn-rule: #d0a86a;
	max-width: 900px;
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
	color: var(--hca-ink);
	font-size: 1.0625rem;
	line-height: 1.55;
}

.hca-portal h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; margin: 0 0 .5rem; }
.hca-portal h2 { font-size: 1.375rem; margin: 0 0 .75rem; padding-bottom: .35rem; border-bottom: 1px solid var(--hca-rule); }
.hca-portal h3 { font-size: 1.125rem; margin: 0 0 .35rem; }
.hca-portal p { margin: 0 0 .9rem; }
.hca-lede { font-size: 1.15rem; max-width: 66ch; color: #333; }
.hca-small { font-size: .9rem; color: var(--hca-muted); }
.hca-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .02em; }
.hca-req { color: #a00; }
.hca-crumb { font-size: .9rem; color: var(--hca-muted); margin-bottom: .25rem; }
.hca-crumb a { color: inherit; }

.hca-hero { margin-bottom: 2rem; }
.hca-section { margin: 0 0 2.25rem; }
.hca-foot { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--hca-rule); }

.hca-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.hca-panel { border: 1px solid var(--hca-rule); background: var(--hca-fill); padding: 1.1rem 1.2rem 1.25rem; border-radius: 4px; }
.hca-panel p { font-size: .95rem; color: #333; }

.hca-btn {
	display: inline-block; padding: .6rem 1.1rem; border-radius: 3px;
	background: var(--hca-accent); color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: .95rem;
}
.hca-btn:hover, .hca-btn:focus { filter: brightness(1.12); }

.hca-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0 0 .75rem; }
.hca-table th, .hca-table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--hca-rule); vertical-align: top; }
.hca-table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--hca-muted); border-bottom: 1px solid var(--hca-ink); }
.hca-table tbody th { font-weight: 600; white-space: nowrap; }
.hca-table--steps th { width: 8.5rem; }

.hca-pill { display: inline-block; font-size: .8rem; padding: .1rem .55rem; border: 1px solid var(--hca-rule); border-radius: 999px; background: #fff; white-space: nowrap; }
.hca-pill--on { background: var(--hca-ink); color: #fff; border-color: var(--hca-ink); }

.hca-steps { counter-reset: hca-step; list-style: none; margin: 0; padding: 0; }
.hca-steps li { display: grid; grid-template-columns: 2.25rem 1fr; gap: .25rem .75rem; padding: .6rem 0; border-bottom: 1px solid var(--hca-rule); }
.hca-steps li::before { counter-increment: hca-step; content: counter(hca-step); grid-row: 1 / span 2; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--hca-ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .9rem; }
.hca-steps li strong { display: block; }
.hca-steps li span { color: #333; font-size: .95rem; }

.hca-faq-item { border: 1px solid var(--hca-rule); border-radius: 4px; padding: .6rem .9rem; margin-bottom: .6rem; background: #fff; }
.hca-faq-item summary { font-weight: 600; cursor: pointer; }
.hca-faq-item p { margin: .6rem 0 .2rem; font-size: .95rem; }

/* Notices rendered inside the Gravity Forms (F3 renewal-window notice, insurance blocks, placeholders) */
.hca-notice { border-left: 3px solid var(--hca-warn-rule); background: var(--hca-warn-bg); color: var(--hca-warn-ink); padding: .75rem 1rem; margin: .5rem 0 1rem; border-radius: 0 4px 4px 0; }
.hca-notice p { margin: 0 0 .4rem; }
.hca-notice p:last-child { margin-bottom: 0; }
.hca-insurance { border: 1px solid var(--hca-rule); background: var(--hca-fill); padding: .75rem 1rem; border-radius: 4px; margin: .25rem 0 .75rem; font-size: .95rem; }
.hca-insurance ul { margin: .25rem 0 .5rem 1.1rem; }
.hca-ack { font-size: .9rem; color: #333; border: 1px dashed var(--hca-rule); padding: .6rem .9rem; border-radius: 4px; margin: .25rem 0 .75rem; }
.hca-placeholder { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; font-size: .9rem; color: var(--hca-muted); }
.hca-placeholder .button[disabled] { opacity: .55; cursor: not-allowed; }

/* Keep the theme's own page title out of the way on portal pages (the template carries the H1). */
.hca-portal-page .entry-title, .hca-portal-page .page-title, .hca-portal-page h1.elementor-heading-title:first-of-type:not(.hca-portal h1) { display: none; }

/* Gravity Forms sizing inside the portal */
.hca-form-page .gform_wrapper { margin-top: 1rem; }
.hca-form-page .gform_required_legend { display: none; } /* GF prints the wrapper even when the legend filter returns '' */
.hca-form-page .gform_wrapper .gsection_title { font-size: 1.2rem; margin-top: 1.5rem; }
.hca-form-page .gform_wrapper .gfield_description { font-size: .9rem; color: var(--hca-muted); }

@media (max-width: 600px) {
	.hca-portal { padding: 1rem .75rem 2.5rem; font-size: 1rem; }
	.hca-table--steps th { width: auto; }
}

/* B6 gate lookup */
.hca-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hca-btn--ghost { background: #fff; color: var(--hca-ink); border: 1px solid var(--hca-rule); }
.hca-pill--ok { background: var(--hca-accent); color: #fff; border-color: var(--hca-accent); }
.hca-pill--warn { background: var(--hca-warn-bg); color: var(--hca-warn-ink); border-color: var(--hca-warn-rule); }
.hca-gate-search { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: 0 0 1rem; }
.hca-gate-search input { flex: 1 1 320px; font-size: 1.5rem; padding: .6rem .8rem; border: 2px solid var(--hca-ink); border-radius: 6px; text-transform: uppercase; }
.hca-gate-status { color: var(--hca-muted); font-size: .95rem; min-height: 1.4em; }
.hca-gate-results { display: grid; gap: .75rem; }
.hca-gate-card { display: grid; grid-template-columns: minmax(8rem, auto) 1fr auto; gap: 1rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--hca-rule); border-left-width: 6px; border-radius: 6px; background: #fff; }
.hca-gate-card.is-active { border-left-color: var(--hca-accent); }
.hca-gate-card.is-expired, .hca-gate-card.is-revoked { border-left-color: #b32d2e; background: #fff6f6; }
.hca-gate-card.is-replaced { border-left-color: var(--hca-rule); color: var(--hca-muted); }
.hca-gate-plate { font-size: 2rem; font-weight: 700; letter-spacing: .06em; }
.hca-gate-company { font-weight: 600; }
.hca-gate-vehicle { color: var(--hca-muted); }
.hca-gate-side { text-align: right; font-size: .95rem; }
.hca-gate-side .hca-pill { font-size: .9rem; margin-bottom: .25rem; }
.hca-gate-print { margin-top: 2rem; }
.hca-gate-call { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .35rem 1rem; padding-top: .5rem; border-top: 1px dashed var(--hca-rule); font-size: 1.05rem; line-height: 1.5; }
.hca-gate-call.is-empty { color: var(--hca-muted); }
.hca-gate-call-label { color: var(--hca-muted); }
.hca-gate-call-person, .hca-gate-call-main { white-space: nowrap; }
.hca-gate-tel { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; padding: .15rem 0; }
@media (max-width: 640px) { .hca-gate-tel { display: inline-block; min-height: 44px; line-height: 44px; padding: 0 .25rem; } .hca-gate-call { font-size: 1.15rem; } }
.hca-gate-list .hca-gate-call { display: table-cell; border: 0; padding: .25rem .4rem; font-size: inherit; }
.hca-gate-bar { display: flex; gap: .5rem; margin: 0 0 1rem; }
.hca-gate-list .hca-gate-plate { font-size: 1.05rem; }
.hca-gate .post-password-form { max-width: 30rem; }
@media (max-width: 640px) {
	.hca-gate-card { grid-template-columns: 1fr; gap: .35rem; }
	.hca-gate-side { text-align: left; }
}
@media print {
	.hca-noprint, header, nav, footer, .site-header, .site-footer, #wpadminbar { display: none !important; }
	.hca-portal { max-width: none; padding: 0; font-size: 11pt; }
	.hca-gate-list th, .hca-gate-list td { padding: .25rem .4rem; }
	.hca-gate-list thead th { border-bottom: 1px solid #000; }
}

/* renewal path (7.8) */
.hca-renew-form p { margin: .6rem 0; }
.hca-renew-form label { font-weight: 600; margin-right: .4rem; }
.hca-renew-form input[type=email] { min-width: 18rem; padding: .45rem .6rem; border: 1px solid var(--hca-rule); border-radius: 4px; }
.hca-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hca-notice--ok { border-left-color: var(--hca-accent); background: #eef5f1; color: #163a2c; }
.hca-readonly { background: #f3f3f1 !important; color: #444; }
/* "Change" on a pre-filled field: a small ghost pill inline with the label. Specific enough to beat Gravity Forms' button theme. */
.gform_wrapper .gfield .gfield_label button.hca-change, .gform_wrapper .gfield button.hca-change {
	display: inline-block; float: none; vertical-align: middle; margin: 0 0 0 .6rem; padding: .1rem .6rem; line-height: 1.5;
	font: 500 .78rem/1.5 inherit; letter-spacing: 0; text-transform: none; border-radius: 999px; cursor: pointer;
	background: #fff !important; color: var(--hca-ink, #1a1a1a) !important; border: 1px solid var(--hca-rule, #d4d4d4) !important; box-shadow: none !important; min-height: 0; height: auto;
}
.gform_wrapper .gfield button.hca-change:hover, .gform_wrapper .gfield button.hca-change:focus-visible { border-color: var(--hca-ink, #1a1a1a) !important; }
.gform_wrapper .gfield.hca-prefilled .gfield_label { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.hca-locked .gfield_radio { pointer-events: none; opacity: .8; }
/* 0.5.9 Part 4: the company's own vehicles (picker.js) */
.hca-picker-controls { margin: 0 0 .75rem; }
.hca-picker-intro { margin: 0 0 .5rem; }
.hca-picker-buttons { margin: 0 0 .5rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.hca-picker-warn { margin: 0 0 .5rem; }
.hca-pick-cell { min-width: 15rem; }
.hca-pick-include, .hca-pick-remove { display: flex; align-items: flex-start; gap: .4rem; font-weight: 400; margin: 0 0 .35rem; }
.hca-pick-include strong { display: block; }
.hca-pick-include small { display: block; color: #555; font-size: .8em; }
.hca-pick-reason { width: 100%; font-size: .9em; }
.gpnf-nested-entries tr.hca-row-include { background: #eef5f1; }
.gpnf-nested-entries tr.hca-row-remove { background: #fbf0e2; }
.gpnf-nested-entries tr.hca-row-remove td:not(.hca-pick-cell) { text-decoration: line-through; color: #777; }
.gpnf-nested-entries tr.hca-row-new { background: #f4f8ff; }
.hca-picker-summary { font-weight: 600; margin: 1rem 0 .5rem; padding: .6rem .9rem; border-left: 4px solid #1f4e3d; background: #f6f7f7; }
.hca-picker-summary.is-empty { border-left-color: #b32d2e; }
/* 0.5.9 Part 3: continue-your-application */
.gform_wrapper .gfield.hca-missing-field { border-left: 4px solid #b32d2e; padding-left: 12px; }
.gform_wrapper .gfield.hca-missing-field .gfield_description { color: #b32d2e; font-weight: 600; }
.gform_wrapper .gfield.hca-onfile .gfield_description { color: #1f4e3d; }
.hca-continue-banner ul.hca-missing-list { margin: .25rem 0 .5rem 1.25rem; }
.hca-missing-list li { margin: 0 0 .25rem; }

/* renewal modal (wireframe F6) */
.hca-modal-wrap { position: fixed; inset: 0; z-index: 100000; background: rgba(30, 30, 30, .62); display: flex; align-items: flex-start; justify-content: center; padding: 44px 20px; overflow: auto; }
.hca-modal-wrap[hidden] { display: none; }
.hca-modal { max-width: 460px; width: 100%; background: #fff; border: 1px solid var(--hca-ink, #1a1a1a); padding: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.25); color: var(--hca-ink, #1a1a1a); font-size: 1rem; line-height: 1.5; }
.hca-modal h2 { font-size: 1.25rem; margin: 0 0 .6rem; padding: 0; border: 0; }
.hca-modal p { margin: 0 0 .8rem; }
.hca-modal label { font-weight: 600; }
.hca-modal input[type=email] { width: 100%; box-sizing: border-box; padding: .5rem .6rem; border: 1px solid var(--hca-rule, #d4d4d4); border-radius: 4px; font-size: 1rem; margin-top: .3rem; }
.hca-modal-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 .6rem; }
.hca-modal .hca-small { margin-bottom: 0; }
body.hca-modal-open { overflow: hidden; }
.gform_wrapper.hca-renewing-hidden .gform_body .gfield:not(.hca-keep), .gform_wrapper.hca-renewing-hidden .gform_footer, .gform_wrapper.hca-renewing-hidden .gform_page_footer { display: none !important; }

/* Buttons inside the modal and on portal pages: Gravity Forms' theme styles every <button>; ours win here. */
.hca-modal button.hca-btn, .hca-portal button.hca-btn {
	appearance: none; -webkit-appearance: none; cursor: pointer; display: inline-block; padding: .6rem 1.1rem; border-radius: 3px;
	background: var(--hca-accent, #1f4e3d) !important; color: #fff !important; border: 1px solid var(--hca-accent, #1f4e3d) !important;
	font: 600 .95rem/1.3 inherit; box-shadow: none !important; text-shadow: none; outline-offset: 2px; margin: 0;
}
.hca-modal button.hca-btn--ghost, .hca-portal button.hca-btn--ghost {
	background: #fff !important; color: var(--hca-ink, #1a1a1a) !important; border: 1px solid var(--hca-rule, #d4d4d4) !important;
}
.hca-modal button.hca-btn:hover, .hca-modal button.hca-btn:focus-visible, .hca-portal button.hca-btn:hover, .hca-portal button.hca-btn:focus-visible { filter: brightness(1.12); }
.hca-modal button.hca-btn[disabled] { opacity: .6; cursor: default; }

/* 10 Sep (Gary, browser run): the theme's red link color bled into the forms — file links in the vehicle table and
   upload previews, the Delete actions, the upload-rules text and the confirmation page's link. Portal links take the
   accent; helper text and destructive links take the muted ink. */
.hca-portal a:not(.hca-btn):not(.button):not(.gform_button) { color: var(--hca-accent, #1f4e3d); }
.hca-form-page .gform_wrapper .gform_fileupload_rules,
.hca-form-page .gform_wrapper .ginput_preview,
.hca-form-page .gform_wrapper .gfield_description,
.hca-form-page .gform_wrapper .gform_fileupload_multifile .gform_drop_instructions { color: var(--hca-muted, #5f5f5f); }
.hca-form-page .gform_wrapper .gpnf-nested-entries a,
.hca-form-page .gform_wrapper .ginput_preview a { color: var(--hca-accent, #1f4e3d); }
.hca-form-page .gform_wrapper .gpnf-row-actions .delete-button,
.hca-form-page .gform_wrapper .gpnf-row-actions button.delete-button,
.hca-form-page .gform_wrapper .gform_delete_file,
.hca-form-page .gform_wrapper .gform_delete { color: var(--hca-muted, #5f5f5f); text-decoration: underline; }
/* 10 Sep (browser run): .hca-btn forces white text with !important, which swallowed the ghost variant on the gate
   page ("Print today's active list" rendered white on white). The ghost variant wins with its own !important. */
.hca-portal .hca-btn--ghost, .hca-portal a.hca-btn--ghost { color: var(--hca-ink, #1a1a1a) !important; }
/* The theme's red submit on WordPress's own password prompt for /gate/. */
.hca-portal-page .post-password-form input[type="submit"] { background: var(--hca-accent, #1f4e3d); color: #fff; border-color: var(--hca-accent, #1f4e3d); }

/* Test mode (Stage 3): the line above each public form. */
.hca-portal .hca-test-site { display: inline-block; color: #7a4b00; background: #fff4dc; padding: 6px 10px; border-radius: 4px; }

/* 0.5.6 — live checks next to the field, the authorized-persons cap, plainer validation */
.hca-live-msg { margin: .35rem 0 0; font-size: .95rem; line-height: 1.4; }
.hca-live-msg.is-bad { color: #b32d2e; font-weight: 600; }
.hca-live-msg.is-ok { color: #1a7f37; }
.hca-list-cap { margin: .4rem 0 0; font-size: .95rem; color: var(--hca-muted); }
.hca-list-cap.is-on { color: #b32d2e; font-weight: 600; }
.gform_wrapper .gform_validation_errors { border-left: 4px solid #b32d2e; }
.gform_wrapper .gform_validation_errors h2.gform_submission_error { font-size: 1.05rem; line-height: 1.4; }
.gform_wrapper .gform_validation_errors ol li a { font-weight: 600; }
.gform_wrapper .gfield_validation_message, .gform_wrapper .validation_message { font-size: .95rem; line-height: 1.4; }
