/* The portal forms: fields, buttons, the error under its field, "Saved", the spinner while sending. */
/* minmax(0, 1fr): a field is never wider than the form (an input's own width pushed it out on a phone). */
.ovemo-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 640px; width: 100%; margin: 0 auto; padding: 20px; }
.ovemo-form.is-narrow { max-width: 440px; }
.ovemo-form h2 { margin: 0; font-size: 18px; color: var(--ovemo-navy); }
.ovemo-lead { margin: 0; color: var(--ovemo-muted); line-height: 1.5; }

.ovemo-field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.ovemo-field input,
.ovemo-field select,
.ovemo-field textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--ovemo-line); border-radius: 8px; background: var(--ovemo-card); color: var(--ovemo-fg); width: 100%; }
.ovemo-field input[readonly] { background: var(--ovemo-tile); color: var(--ovemo-muted); }
.ovemo-field input.is-code { letter-spacing: .3em; font-variant-numeric: tabular-nums; max-width: 180px; }
.ovemo-field [aria-invalid="true"] { border-color: var(--ovemo-warn); }
.ovemo-field input:focus-visible,
.ovemo-field select:focus-visible,
.ovemo-field textarea:focus-visible { outline: 2px solid var(--ovemo-accent); outline-offset: 1px; }
.ovemo-hint { font-weight: 400; color: var(--ovemo-muted); font-size: 12px; }
.ovemo-field-error { font-weight: 400; color: var(--ovemo-warn); font-size: 13px; }

/* The notices of HVAC CRM (HVAC_Field::notice()) in the new portal look the same. */
.ovemo-notice,
.ovemo-portal :is(.hvac-portal-error, .notice) { margin: 0; border: 0; border-radius: 8px; padding: 8px 12px; font-size: 13px; line-height: 1.45; }
.ovemo-notice.is-error,
.ovemo-portal :is(.hvac-portal-error, .notice-error) { background: var(--ovemo-warn-soft); color: var(--ovemo-warn); }
.ovemo-notice.is-ok,
.ovemo-portal .notice-success { background: var(--ovemo-ok-soft); color: var(--ovemo-ok); }
.ovemo-portal .notice p { margin: 0; }

.ovemo-actions { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* Inside the portal the buttons of a frame stand in the middle (the door keeps its own look). */
.ovemo-portal:not(.is-door) .ovemo-actions { justify-content: center; }
.ovemo-btn { font: inherit; font-weight: 700; font-size: 15px; color: #fff; background: var(--ovemo-accent); border: 0; border-radius: 10px; padding: 12px 22px; cursor: pointer; box-shadow: var(--ovemo-shadow); }
.ovemo-btn[disabled] { opacity: .6; cursor: not-allowed; }
.ovemo-btn:focus-visible { outline: 2px solid var(--ovemo-accent); outline-offset: 2px; }

.ovemo-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ovemo-links a,
.ovemo-links button { font: inherit; font-size: 13px; color: var(--ovemo-accent); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* "Sending…" next to the pressed button (assets/js/portal/forms.js) - also in the older CRM portal screens, hence the fallback colours. */
.ovemo-busy { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; vertical-align: middle; color: var(--ovemo-muted, #5a6b82); font-size: 13px; }
.ovemo-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(34, 113, 177, .3); border-top-color: var(--ovemo-accent, #2271b1); border-radius: 50%; animation: ovemo-spin .8s linear infinite; }
@keyframes ovemo-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ovemo-spinner { animation-duration: 2s; } }

.ovemo-field input:is([type="checkbox"], [type="radio"]) { width: auto; padding: 0; }

/* Every drop-down and one-line field of the portal - one height (a drop-down is drawn lower, a text field gets more from the site).
   :where keeps it below the own heights (the door 46 px, the item rows 36 px). */
.ovemo-portal :where(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="date"], input[type="number"], input[type="search"], select) { height: 42px; }

/* The field parts HVAC CRM draws for the portal and the registration (Clients, Orders: the sites,
   the invoice details, the request) - inside the new portal in the look of the sample's form:
   the label over the field, the hint and the error under it. */
.ovemo-portal :is(.hvac-portal-field-row, .hvac-portal-field) { display: grid; gap: 14px; margin: 0; }
/* A display set here would show a part the form hides (the fields of another invoice choice). */
.ovemo-portal [hidden] { display: none !important; }
.ovemo-portal .hvac-portal-field { gap: 6px; font-weight: 600; font-size: 14px; }
/* Every form: the label close over its own field (the gap of the field), the bigger gap before the next label.
   The site's "label { margin-bottom }" would push it away from its field; a wrapper that shows and hides
   fields (a tick, a choice a/b/c) keeps the gap of the form between them. */
.ovemo-portal :is(.ovemo-field, .hvac-portal-field, .hvac-crm-field) > label { margin: 0; }
.ovemo-portal :is([data-hvac-show-when], [data-hvac-choice-for]) { display: grid; gap: 14px; }
.ovemo-portal .hvac-portal-field :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--ovemo-line); border-radius: 8px; background: var(--ovemo-card); color: var(--ovemo-fg); width: 100%; }
.ovemo-portal .hvac-portal-field :is(input, select, textarea):focus-visible { outline: 2px solid var(--ovemo-accent); outline-offset: 1px; }
/* "Day" of the Schedule (Attendance, Waiting): the label and the date on one row, in the middle, the date only as wide as a date. */
.ovemo-portal .hvac-portal-field.hvac-crm-day-field { display: flex; justify-content: center; align-items: center; gap: 12px; }
.ovemo-portal .hvac-portal-field.hvac-crm-day-field input[type="date"] { width: auto; }
.ovemo-portal .hvac-portal-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ovemo-portal :is(.hvac-portal-hint, .hvac-portal-optional, .ovemo-field .description, .hvac-portal-field .description) { margin: 0; font-weight: 400; color: var(--ovemo-muted); font-size: 12px; }
.ovemo-portal .hvac-portal-field-error { margin: 0; font-weight: 400; color: var(--ovemo-warn); font-size: 13px; }
.ovemo-portal .hvac-portal-field-warning { margin: 0; font-weight: 400; color: #8a5a00; font-size: 13px; }
.ovemo-portal .hvac-portal-warning { margin: 0; border-radius: 8px; padding: 10px 12px; background: #fff8e6; border: 1px solid #f0d79a; font-weight: 400; font-size: 13px; line-height: 1.45; }
.ovemo-portal .hvac-portal-invoice-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* A group of fields for something else inside a form: a grey line over it and a dark heading - the eye must see where it starts. */
.ovemo-portal .hvac-portal-section-label { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--ovemo-line); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ovemo-fg); font-weight: 700; }

/* "Sites": every site a card that opens with its form; "+ New site" on top. */
.ovemo-portal .hvac-portal-sites { display: grid; gap: 10px; max-width: 640px; width: 100%; margin: 0 auto; }
.ovemo-portal .hvac-portal-site > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: grid; gap: 2px; }
.ovemo-portal .hvac-portal-site > summary::-webkit-details-marker { display: none; }
.ovemo-portal .hvac-portal-site[open] > summary { border-bottom: 1px solid var(--ovemo-line); }
.ovemo-portal .hvac-portal-site.is-new > summary { color: var(--ovemo-accent); font-weight: 600; }
.ovemo-portal .hvac-portal-site-name { font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ovemo-portal .hvac-portal-site-sub { color: var(--ovemo-muted); font-size: 13px; }
.ovemo-portal .hvac-portal-site > form { padding: 14px 16px 16px; }
.ovemo-portal .hvac-portal-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 400; background: var(--ovemo-chip); color: var(--ovemo-fg); }
.ovemo-portal .hvac-portal-pill.is-main { background: var(--ovemo-navy); color: #fff; }
/* „Нов адрес“ в „Къде да ви посетим?“ (Ovemo Sites 1.3.0) - полетата под менюто, само при този отговор. */
.ovemo-portal .hvac-crm-site-new { display: grid; gap: 14px; margin-top: 12px; }

/* The buttons of those parts: the main one as "Save" of the sample, the others as "Back". */
.ovemo-portal .hvac-portal-buttons { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.ovemo-portal .button { display: inline-block; font: inherit; font-size: 13px; font-weight: 600; color: var(--ovemo-accent); background: var(--ovemo-card); border: 1px solid var(--ovemo-accent); border-radius: 6px; padding: 8px 14px; text-decoration: none; cursor: pointer; }
.ovemo-portal .button.button-primary { color: #fff; background: var(--ovemo-accent); }
.ovemo-portal .button.button-small { font-size: 12px; padding: 4px 10px; }
.ovemo-portal .button:focus-visible { outline: 2px solid var(--ovemo-accent); outline-offset: 2px; }

/* What the modules add under an opened order (hvac_crm_client_portal_order_actions): the small
   label, the box with "Shall we go ahead?" and the question asked before sending (form-send.js). */
.ovemo-portal .hvac-portal-field > .hvac-portal-small-label { font-size: 12px; color: var(--ovemo-muted); }
.ovemo-portal :is(.hvac-portal-form-card, .hvac-confirm-box) { display: grid; gap: 10px; margin: 0; padding: 12px 14px; max-width: 560px; }
.ovemo-portal .hvac-confirm-box { border-color: var(--ovemo-warn); background: var(--ovemo-warn-soft); }
.ovemo-portal :is(.hvac-portal-form-card, .hvac-confirm-box) p { margin: 0; }
.ovemo-portal .hvac-confirm-box p { font-weight: 600; }
.ovemo-portal .hvac-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* The registration in 5 steps (sample registracia-i-obekti.html): the steps over the form, the choice
   by buttons (a/b/c, Yes/No - assets/js/portal-choice.js of HVAC CRM), the address as a fact, the ticks. */
.ovemo-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ovemo-steps li { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 14px; background: var(--ovemo-chip); color: var(--ovemo-muted); font-size: 12px; }
.ovemo-steps li b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; font-size: 11px; }
.ovemo-steps li.is-active { background: var(--ovemo-navy); color: #fff; font-weight: 600; }
.ovemo-steps li.is-active b { color: var(--ovemo-navy); }
.ovemo-steps li.is-done { background: var(--ovemo-ok-soft); color: var(--ovemo-ok); }
.ovemo-choices { display: grid; gap: 8px; }
.ovemo-choice { text-align: left; font: inherit; color: inherit; background: var(--ovemo-tile); border: 1px solid var(--ovemo-line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.ovemo-choice.is-active { background: var(--ovemo-card); border-color: var(--ovemo-accent); box-shadow: 0 0 0 1px var(--ovemo-accent); font-weight: 600; }
.ovemo-choice:focus-visible { outline: 2px solid var(--ovemo-accent); outline-offset: 2px; }
/* The site-wide button:hover makes the text white - on a light button it is not read. */
.ovemo-portal .ovemo-choice:is(:hover, :focus, :active) { color: var(--ovemo-fg); }
.ovemo-pair { display: flex; gap: 8px; }
.ovemo-pair .ovemo-choice { flex: 1; text-align: center; }
.ovemo-facts { margin: 0; background: var(--ovemo-tile); border-radius: 8px; padding: 10px 12px; display: grid; gap: 4px; font-size: 13px; color: var(--ovemo-muted); }
.ovemo-facts b { color: var(--ovemo-fg); }
.ovemo-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.ovemo-check input { width: auto; margin-top: 3px; }
.ovemo-check a { color: var(--ovemo-accent); }

/* The red warnings of the modules on the home of the staff (hvac_crm_staff_portal_flags): the big one
   (a late cancellation) solid red, the others soft; every row with "!" and its "Seen". The choice
   "New client / Existing client" (tabs.js) shows only its own panel. */
.ovemo-portal .hvac-portal-flag-bar { display: grid; gap: 8px; border-radius: 10px; padding: 12px 16px; background: var(--ovemo-warn-soft); color: var(--ovemo-warn); border: 1px solid rgba(179, 45, 46, .35); }
.ovemo-portal .hvac-portal-flag-bar.is-big { background: var(--ovemo-warn); color: #fff; border-color: var(--ovemo-warn); }
.ovemo-portal .hvac-portal-flag-bar p { margin: 0; }
.ovemo-portal .hvac-portal-flag-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.ovemo-portal .hvac-portal-flag-row + .hvac-portal-flag-row { border-top: 1px solid rgba(179, 45, 46, .2); padding-top: 8px; }
.ovemo-portal .hvac-portal-flag-row > span:first-child::before { content: "! "; font-weight: 700; }
.ovemo-portal .hvac-portal-flag-bar:not(.is-big) a { color: var(--ovemo-warn); }
.ovemo-portal .hvac-crm-tab-panel:not(.is-active) { display: none; }

/* The review invitation (HVAC CRM, modules/reviews.php) as in the sample: the yellow bar, the box
   with the stars. The stars: radio 5…1 in reverse order, so ":checked ~ label" lights the lower ones. */
.ovemo-review-slot { display: grid; gap: 12px; }
.ovemo-review-slot:empty { display: none; }
.ovemo-portal .hvac-portal-review-banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; background: #fff8e6; border: 1px solid #f0d79a; font-size: 14px; }
.ovemo-portal .hvac-portal-review-banner .button { color: #fff; background: var(--ovemo-navy); border-color: var(--ovemo-navy); padding: 6px 12px; }
.ovemo-portal .hvac-portal-review-card { display: grid; gap: 10px; padding: 16px; max-width: 640px; width: 100%; margin: 0 auto; }
.ovemo-portal .hvac-portal-review-card p { margin: 0; }
.ovemo-portal .hvac-portal-review-card form { display: grid; gap: 10px; }
.ovemo-portal .hvac-portal-review-card textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--ovemo-line); border-radius: 8px; width: 100%; }
.ovemo-portal .hvac-portal-review-card form > p { display: flex; flex-wrap: wrap; gap: 10px; }
.ovemo-portal .hvac-portal-star-rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.ovemo-portal .hvac-portal-star-rating input { position: absolute; opacity: 0; width: 0; height: 0; }
.ovemo-portal .hvac-portal-star-rating label { font-size: 28px; line-height: 1; color: #c9d0da; cursor: pointer; padding: 0 2px; }
.ovemo-portal .hvac-portal-star-rating :is(input:checked ~ label, label:hover, label:hover ~ label) { color: #e0a321; }
.ovemo-portal .hvac-portal-star-rating input:focus-visible + label { outline: 2px solid var(--ovemo-accent); outline-offset: 2px; border-radius: 4px; }
.ovemo-portal .hvac-portal-star-display { color: #e0a321; letter-spacing: 2px; font-size: 20px; }
.ovemo-portal .hvac-portal-review-thanks { text-align: center; }

/* "View PDF" of an opened document - its own row under the top row. */
.ovemo-pdf-row { margin: 0; text-align: center; }
.ovemo-portal .ovemo-pdf-row .button { padding: 8px 18px; color: #fff; background: var(--ovemo-navy); border-color: var(--ovemo-navy); }

/* Ovemo Security: the QR code of the two-factor key; the face or finger login - its devices and its door. */
.ovemo-totp-key { display: grid; gap: 8px; justify-items: start; }
.ovemo-qr { display: block; max-width: 100%; height: auto; border: 1px solid var(--ovemo-line, #dde3e9); border-radius: 8px; }
.ovemo-passkeys { display: grid; gap: 8px; margin-top: 18px; }
.ovemo-passkey-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ovemo-btn-small.is-delete { border-color: var(--ovemo-warn); color: var(--ovemo-warn); }
.ovemo-btn-small.is-delete:is(:hover, :focus, :active) { background: var(--ovemo-warn-soft); color: var(--ovemo-warn); }
.ovemo-passkey-login { display: grid; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--ovemo-line, #dde3e9); }
.ovemo-passkey-status:empty { display: none; }

/* Phone: the review invitation only on the home, only the name of the current step, smaller buttons, less padding, the buttons on the whole width. */
@media (max-width: 720px) {
	.ovemo-review-slot.is-section { display: none; }
	/* The steps on one row: the others only as numbers, the current one with its name (shortened when long). */
	.ovemo-steps { flex-wrap: nowrap; gap: 4px; }
	.ovemo-steps li { flex: none; padding: 2px; }
	.ovemo-steps li span { display: none; }
	.ovemo-steps li.is-active { flex: 0 1 auto; min-width: 0; gap: 5px; padding: 2px 9px 2px 2px; }
	.ovemo-steps li.is-active span { display: inline; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
	.ovemo-choice { padding: 8px 10px; }
	.ovemo-form { padding: 16px; }
	.ovemo-btn { font-size: 14px; padding: 9px 12px; border-radius: 8px; }
	.ovemo-actions { flex-direction: column; align-items: stretch; gap: 8px; }
	.ovemo-actions .ovemo-btn { width: 100%; }
	.ovemo-passkey-login .ovemo-actions .ovemo-btn { width: auto; }
	.ovemo-portal .hvac-portal-field-pair { grid-template-columns: 1fr; }
	.ovemo-portal .hvac-portal-buttons { flex-direction: column; align-items: stretch; }
	.ovemo-portal .hvac-portal-buttons .button { width: 100%; text-align: center; }
}
