/* Shared by the Roundcube skin and panel. Only typing controls opt in; native
   checkbox, button, menu and toolbar keyboard indicators remain intact. */
:root {
  --xf-border: var(--xb-line, #c3cdd8);
  --xf-hover: var(--xb-muted, #8294a8);
  --xf-brand: var(--xb-accent, #0288d1);
  --xf-bg: var(--xb-surface, #fff);
  --xf-disabled: var(--xb-soft, #edf2f7);
  --xf-ink: var(--xb-text, #172b45);
  --xf-muted: var(--xb-muted, #52647a);
  --xf-error: #be3645;
  --xf-scheme: light;
}
html.dark-mode {
  --xf-error: #ff8994;
  --xf-scheme: dark;
}
:root[data-harbor-theme] {
  --xf-border: var(--panel-border);
  --xf-hover: var(--panel-muted);
  --xf-brand: var(--panel-accent);
  --xf-bg: var(--panel-surface);
  --xf-disabled: var(--panel-raised);
  --xf-ink: var(--panel-ink);
  --xf-muted: var(--panel-muted);
}
:root[data-harbor-theme='dark'] {
  --xf-error: #ff8994;
  --xf-scheme: dark;
}
body .xf-control,
body .xf-group {
  box-sizing: border-box;
  border: 1px solid var(--xf-border) !important;
  border-radius: 8px !important;
  background-color: var(--xf-bg) !important;
  color: var(--xf-ink) !important;
  outline: none !important;
  box-shadow: none !important;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}
body .xf-control {
  color-scheme: var(--xf-scheme);
  height: 40px !important;
  min-height: 40px !important;
  max-width: 100%;
  min-width: 0;
  padding: 7px 12px !important;
  font-size: 16px !important;
  line-height: 24px;
}
body select.xf-control {
  padding-right: 32px !important;
}
body textarea.xf-control {
  height: auto !important;
  min-height: 120px !important;
  padding-block: 10px !important;
  resize: vertical;
}
body .xf-richtext.xf-control {
  height: auto !important;
  min-height: 120px !important;
}
body.task-login #login-form tr {
  display: block;
  margin-bottom: 16px;
}
body.task-login #login-form td.title {
  display: block !important;
  padding: 0 0 6px;
}
body.task-login #login-form td.title label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
body.task-login #login-form td.input {
  width: 100%;
}
body .xf-control::placeholder {
  color: var(--xf-muted);
  opacity: 1;
}
body .xf-control:hover:not(:disabled),
body .xf-group:hover:not(.xf-disabled) {
  border-color: var(--xf-hover) !important;
}
body .xf-control:focus:not(:disabled),
body .xf-group:focus-within:not(.xf-disabled),
body .xf-group.xf-editor-focused:not(.xf-disabled) {
  border-color: var(--xf-brand) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--xf-brand) 20%, transparent) !important;
  outline: none !important;
}
/* The outer group owns the border/ring even when its input, select or button
   is focused. Inner controls keep their size, so focusing cannot move text. */
body .xf-group .xf-control,
body .xf-group .xf-control:is(:hover, :focus, :focus-visible),
body .xf-group .recipient-input,
body .xf-group .recipient-input.focus,
body .xf-group .tox-tinymce,
body .xf-group .cm-editor,
body .xf-group .cm-content,
body .xf-group .cm-editor.cm-focused {
  border-color: transparent !important;
  border-width: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}
body .xf-group input.xf-control,
body .xf-group select.xf-control {
  height: 38px !important;
  min-height: 38px !important;
}
/* Elastic paints recipient and sender backgrounds with an ID selector.
   Keep those transparent so they cannot cover the outer rounded corners. */
body #compose-headers .xf-group .form-control,
body #compose-headers .xf-group .recipient-input {
  background: transparent !important;
}
body .xf-group .input-group-text {
  border: 0 !important;
  border-left: 1px solid var(--xf-border) !important;
  border-radius: 0 7px 7px 0;
  background: transparent !important;
}
body .xf-group :is(button, a):focus-visible {
  outline: none !important;
  box-shadow: none !important;
  background-color: color-mix(in srgb, var(--xf-brand) 18%, var(--xf-bg)) !important;
  text-decoration: underline;
}
body .xf-control:disabled,
body .xf-group.xf-disabled,
body .xf-group.xf-disabled:focus-within {
  border-color: var(--xf-border) !important;
  background-color: var(--xf-disabled) !important;
  color: var(--xf-muted) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
body .xf-control[aria-invalid='true']:not(:disabled),
body .xf-group:not(.xf-disabled):has([aria-invalid='true']) {
  border-color: var(--xf-error) !important;
}
body .xf-control[aria-invalid='true']:focus,
body .xf-group:not(.xf-disabled):has([aria-invalid='true']):focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--xf-error) 18%, transparent) !important;
}
body .xf-group .xf-control[aria-invalid='true'] {
  border: 0 !important;
  box-shadow: none !important;
}
.xf-label,
.xf-field-label > span,
.xf-search-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  color: var(--xf-ink);
}
body .xf-error {
  display: block;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--xf-error);
}
.xf-field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.xf-field-label > .xf-control {
  width: 100%;
}
body #contact-details .xf-contact-group {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}
body #contact-details .xf-contact-field {
  flex: 1 1 140px;
  min-width: 0;
  max-width: 100%;
  text-align: left;
}
body #contact-details .xf-contact-field > .xf-control {
  width: 100% !important;
}
body #contact-details .input-group-prepend:not(.content):has(.xf-contact-field) {
  flex: 0 1 160px;
  display: block;
}
body #contact-details .xf-contact-group > .content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1 1 280px;
  min-width: 0;
  gap: 10px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
}
body #contact-details .content .xf-contact-field:has(.ff_street) {
  grid-column: 1 / -1;
}
.manager-filters,
.mail-pro-filters {
  align-items: flex-end;
}
.xf-search-field {
  flex: 1;
  min-width: 160px;
}
.xf-search-field .manager-search {
  min-width: 0;
}
.mail-pro-filters > .xf-field-label {
  flex: 1;
}
body .mail-password-field.xf-group {
  padding: 0;
  overflow: visible;
}
body .mail-password-field.xf-group > button {
  align-self: stretch;
  height: 38px;
}
body .xf-group .recipient-input {
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 4px !important;
}
body .xf-group .recipient-input input.xf-control {
  padding: 7px 8px !important;
}
body .xf-group .recipient-input li.input {
  margin: 0;
  padding: 0;
}
body #composebodycontainer.xf-group {
  border-radius: 8px;
  overflow: visible;
}
body #composebodycontainer.xf-group .tox-tinymce {
  border-radius: 7px !important;
  overflow: hidden;
}
body.xb-compose-page #composebodycontainer.xb-visible-format textarea.xf-control {
  padding: 10px 12px !important;
}
body .xf-code-editor.xf-group:has(.cm-search :focus) {
  border-color: var(--xf-border) !important;
  box-shadow: none !important;
}
body .xf-code-editor.xf-group .cm-search .xf-control {
  border: 1px solid var(--xf-border) !important;
  border-radius: 8px !important;
  background: var(--xf-bg) !important;
  height: 40px !important;
}
body .xf-code-editor.xf-group .cm-search .xf-control:focus {
  border-color: var(--xf-brand) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--xf-brand) 20%, transparent) !important;
}
body .xf-search-labelled {
  position: relative;
  margin-top: 24px !important;
}
body .xf-search-labelled .xf-search-label {
  position: absolute !important;
  display: block !important;
  top: -24px;
  left: 0;
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  white-space: nowrap;
  margin: 0;
  padding: 0;
}
body .searchbar.xf-group {
  height: 40px !important;
  min-height: 40px !important;
  overflow: visible;
}
body .searchbar.xf-group form {
  position: static;
}
body .searchbar.xf-group input.xf-control {
  padding-block: 7px !important;
}
body .xf-label-visible.voice,
body .xf-label-visible.sr-only {
  position: static !important;
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  display: block !important;
  margin: 0 0 6px;
}
@media (min-width: 1025px) {
  body.xb-shell .xb-topbar {
    min-height: 88px;
  }
  body.xb-shell #xb-desktop-search {
    align-self: center;
  }
}
@media (max-width: 480px) {
  body .searchbar.xf-search-labelled {
    margin-top: 30px !important;
  }
  .xf-field-label {
    max-width: 100%;
  }
  .manager-filters > .xf-field-label {
    flex: 1 1 140px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body .xf-control,
  body .xf-group {
    transition: none;
  }
}
