/* Application styles of the app pages, loaded after the theme's core.css. */

/* Font: Figtree (local, vendor/fonts/figtree, latin + latin-ext) first, then the theme's original stack as fallback
   ("Public Sans" is local too, vendor/fonts/public-sans).
   --bs-body-font-family reads this variable, so body text, buttons, inputs and tooltips all follow.
******************************************************************************/

:root {
  --bs-font-sans-serif: "Figtree Variable", "Figtree", "Public Sans", -apple-system, blinkmacsystemfont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

/* Colours: the QPoint brand palette (qpoint-color-guidelines.pdf), mapped onto the variables the theme reads. Fonts are
   not part of it yet. The primary is the brand green with white text. Amber takes navy text, never white.
******************************************************************************/

:root,
[data-bs-theme=light] {
  --bs-primary: #009a73;
  --bs-primary-rgb: 0, 154, 115;
  --bs-secondary: #5a5e79;
  --bs-secondary-rgb: 90, 94, 121;
  --bs-success: #009a73;
  --bs-success-rgb: 0, 154, 115;
  --bs-info: #2086c0;
  --bs-info-rgb: 32, 134, 192;
  --bs-warning: #f5ae4b;
  --bs-warning-rgb: 245, 174, 75;
  --bs-danger: #e64343;
  --bs-danger-rgb: 230, 67, 67;
  --bs-light: #f9fafc;
  --bs-light-rgb: 249, 250, 252;
  --bs-dark: #21243c;
  --bs-dark-rgb: 33, 36, 60;
  --bs-black: #131527;
  --bs-black-rgb: 19, 21, 39;
  --bs-body-bg: #f8f7fa;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-paper-bg: #f9fafc;
  --bs-paper-bg-rgb: 249, 250, 252;
  --bs-body-color: #323654;
  --bs-body-color-rgb: 50, 54, 84;
  --bs-base-color: #323654;
  --bs-base-color-rgb: 50, 54, 84;
  --bs-emphasis-color: #323654;
  --bs-emphasis-color-rgb: 50, 54, 84;
  --bs-secondary-color: #5a5e79;
  --bs-secondary-color-rgb: 90, 94, 121;
  --bs-tertiary-bg: #f2f3f8;
  --bs-tertiary-bg-rgb: 242, 243, 248;
  --bs-secondary-bg: #e4e6ed;
  --bs-secondary-bg-rgb: 228, 230, 237;
  --bs-link-color: #008265;
  --bs-link-color-rgb: 0, 130, 101;
  --bs-link-hover-color: #006a53;
  --bs-link-hover-color-rgb: 0, 106, 83;
  --bs-heading-color: #323654;
  --bs-border-color: #e4e6ed;
  --bs-primary-contrast: #fff;
  --bs-success-contrast: #fff;
  --bs-info-contrast: #fff;
  --bs-secondary-contrast: #fff;
  --bs-danger-contrast: #fff;
  --bs-warning-contrast: #131527;
  --bs-primary-bg-subtle: #d2f1e2;
  --bs-success-bg-subtle: #d2f1e2;
  --bs-info-bg-subtle: #d5efff;
  --bs-warning-bg-subtle: #ffecd2;
  --bs-danger-bg-subtle: #ffdbd6;
  --bs-secondary-bg-subtle: #f2f3f8;
  --bs-primary-border-subtle: #ade0c9;
  --bs-primary-text-emphasis: #006a53;
  --bs-custom-link-color: #008265;
  --bs-gray-25: #f9fafc;
  --bs-gray-50: #f9fafc;
  --bs-gray-75: #f2f3f8;
  --bs-gray-100: #f2f3f8;
  --bs-gray-200: #e4e6ed;
  --bs-gray-300: #d0d2dd;
  --bs-gray-400: #a0a3b7;
  --bs-gray-500: #70748b;
  --bs-gray-600: #5a5e79;
  --bs-gray-700: #444864;
  --bs-gray-800: #323654;
  --bs-gray-900: #21243c;
  --bs-box-shadow: 0 .1875rem .75rem 0 rgba(50, 54, 84, .12);
  --qp-tag-primary: #006a53;
  --qp-tag-info: #0b6b9d;
  --qp-tag-warning: #7c4e00;
  --qp-tag-danger: #a51b22;
  --qp-tag-secondary: #444864;
}

[data-bs-theme=dark] {
  --bs-body-bg: #131527;
  --bs-body-bg-rgb: 19, 21, 39;
  --bs-paper-bg: #21243c;
  --bs-paper-bg-rgb: 33, 36, 60;
  --bs-body-color: #f2f3f8;
  --bs-body-color-rgb: 242, 243, 248;
  --bs-base-color: #f2f3f8;
  --bs-base-color-rgb: 242, 243, 248;
  --bs-emphasis-color: #f2f3f8;
  --bs-emphasis-color-rgb: 242, 243, 248;
  --bs-secondary-color: #a0a3b7;
  --bs-secondary-color-rgb: 160, 163, 183;
  --bs-tertiary-bg: #323654;
  --bs-tertiary-bg-rgb: 50, 54, 84;
  --bs-secondary-bg: #444864;
  --bs-secondary-bg-rgb: 68, 72, 100;
  --bs-link-color: #75ceaa;
  --bs-link-color-rgb: 117, 206, 170;
  --bs-link-hover-color: #ade0c9;
  --bs-link-hover-color-rgb: 173, 224, 201;
  --bs-heading-color: #f2f3f8;
  --bs-border-color: #323654;
  --bs-primary-bg-subtle: #003c2f;
  --bs-success-bg-subtle: #003c2f;
  --bs-info-bg-subtle: #003958;
  --bs-warning-bg-subtle: #553200;
  --bs-danger-bg-subtle: #61080e;
  --bs-primary-text-emphasis: #75ceaa;
  --bs-custom-link-color: #75ceaa;
  --qp-tag-primary: #75ceaa;
  --qp-tag-info: #8bcdfb;
  --qp-tag-warning: #ffce8d;
  --qp-tag-danger: #ff938b;
  --qp-tag-secondary: #d0d2dd;
}

/* Tags and icon tiles: a 100 tint with its 700 shade (800 for amber) */
.bg-label-primary,
.bg-label-success {
  background-color: var(--bs-primary-bg-subtle) !important;
  color: var(--qp-tag-primary) !important;
}

.btn-label-primary:not(:hover, :active, .active) {
  color: var(--qp-tag-primary);
  background-color: var(--bs-primary-bg-subtle);
}

.btn-label-warning:not(:hover, :active, .active) {
  color: var(--qp-tag-warning);
  background-color: var(--bs-warning-bg-subtle);
}

.bg-label-info {
  background-color: var(--bs-info-bg-subtle) !important;
  color: var(--qp-tag-info) !important;
}

.bg-label-warning {
  background-color: var(--bs-warning-bg-subtle) !important;
  color: var(--qp-tag-warning) !important;
}

.bg-label-danger {
  background-color: var(--bs-danger-bg-subtle) !important;
  color: var(--qp-tag-danger) !important;
}

.bg-label-secondary {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--qp-tag-secondary) !important;
}

.progress {
  --bs-progress-bar-bg: var(--bs-primary);
}

/* Menu: an active group looks the same as an active page
******************************************************************************/

.menu.menu-horizontal .menu-inner > .menu-item.active > .menu-link.menu-toggle {
  background: var(--bs-menu-horizontal-active-bg);
  box-shadow: none;
  color: var(--bs-link-color);
}

/* Navbar
******************************************************************************/

/* Backup of the dark navbar matching the legacy pages (header in res/css/global.css), kept to compare with the theme's
   default. Switch it on with the navbar-qp-dark class on #layout-navbar. */
#layout-navbar.navbar-qp-dark {
  --bs-navbar-bg: #232d3c;
  --qp-navbar-link: #d5dbe5;
  background-color: var(--bs-navbar-bg);
}

#layout-navbar.navbar-qp-dark .nav-link,
#layout-navbar.navbar-qp-dark .btn-text-secondary {
  color: var(--qp-navbar-link);
}

#layout-navbar.navbar-qp-dark .nav-link:hover,
#layout-navbar.navbar-qp-dark .btn-text-secondary:hover {
  color: #fff;
}

#layout-navbar.navbar-qp-dark .select2-selection {
  background-color: transparent !important;
  border-color: #4a5668 !important;
}

#layout-navbar.navbar-qp-dark .select2-selection__rendered {
  color: var(--qp-navbar-link) !important;
}

.app-brand-img {
  display: block;
  height: 28px;
  width: auto;
}

.navbar-account {
  position: relative;
  width: 250px;
}

.navbar-account .select2-container--default .select2-selection--single {
  height: 2.25rem;
  background-color: var(--bs-tertiary-bg);
  border-color: transparent;
  border-radius: 50rem;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.navbar-account .select2-container--default .select2-selection--single:hover,
.navbar-account .select2-container--default.select2-container--open .select2-selection--single,
.navbar-account .select2-container--default.select2-container--focus .select2-selection--single {
  background-color: var(--bs-paper-bg);
  border-color: var(--bs-primary);
  border-radius: 50rem !important;
}

.navbar-account .select2-container--default .select2-selection--single .select2-selection__rendered {
  height: 100%;
  padding-inline: 0.875rem 2.25rem;
  line-height: 1;
}

.navbar-account .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  top: 0;
  inset-inline-end: 0.625rem;
}

.navbar-account-selection,
.navbar-account-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.navbar-account-selection {
  height: 100%;
  color: var(--bs-body-color);
}

.navbar-account-selection > .icon-base {
  flex-shrink: 0;
  color: var(--bs-primary);
}

.navbar-account-option {
  flex: 1;
  justify-content: space-between;
}

.navbar-account-title {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar-account-id {
  flex-shrink: 0;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

.navbar-account .select2-dropdown {
  min-width: 20rem;
  margin-top: 0.25rem;
  overflow: hidden;
  border-color: var(--bs-border-color);
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 1.125rem rgba(50, 54, 84, 0.16);
}

.navbar-account .select2-results__option--highlighted .navbar-account-id {
  color: inherit;
}

.navbar-profile-menu {
  min-width: 16rem;
}

/* Email Templates
******************************************************************************/

.template-preview-frame {
  width: 100%;
  height: 70vh;
  border: 0;
}

.template-variables {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .75rem;
  border: 1px solid var(--bs-border-color);
  border-top: 0;
}

/* People
******************************************************************************/

.people-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
}

.people-stat {
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
}

.people-stat.is-selected {
  border-color: var(--bs-primary);
}

.people-search {
  width: 16rem;
}

.people-list-toggle {
  max-width: 14rem;
}

.people-list-menu {
  width: 20rem;
  max-height: 24rem;
  overflow-y: auto;
}

.people-check {
  width: 2.5rem;
}

.people-person {
  max-width: 18rem;
}

.people-form {
  max-width: 14rem;
}

.people-journey {
  display: flex;
  gap: .25rem;
  width: 8rem;
}

.people-journey span {
  flex: 1;
  height: .25rem;
  border-radius: 1rem;
  background-color: var(--bs-border-color);
}

.people-history {
  max-height: 22rem;
  overflow-y: auto;
}

.min-w-0 {
  min-width: 0;
}

/* Team
******************************************************************************/

.team-seats {
  height: .5rem;
}

.team-card {
  transition: transform .15s ease-in-out;
}

.team-card:hover {
  transform: translateY(-2px);
}

/* Forms
******************************************************************************/

.forms-search {
  flex: 1 1 14rem;
  width: auto;
}

.forms-filter {
  width: auto;
}

.forms-title {
  overflow-wrap: anywhere;
}

/* Campaigns
******************************************************************************/

.campaigns-search {
  width: 16rem;
}

.campaigns-title {
  max-width: 20rem;
}

.campaigns-sender {
  max-width: 14rem;
}

.campaigns-progress {
  width: 6rem;
  height: .375rem;
}

.campaign-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--bs-secondary-color);
}

.campaign-steps .badge {
  margin-right: .5rem;
  background-color: var(--bs-border-color);
  color: var(--bs-body-color);
}

.campaign-steps .active {
  color: var(--bs-heading-color);
  font-weight: 500;
}

.campaign-steps .active .badge,
.campaign-steps .done .badge {
  background-color: var(--bs-primary);
  color: var(--bs-primary-contrast);
}

.campaign-email-tag {
  min-width: 3.25rem;
  justify-content: center;
}

/* Account
******************************************************************************/

.account-progress {
  height: .5rem;
}

.account-api-key {
  font-family: var(--bs-font-monospace);
}

/* Upgrade
******************************************************************************/

.upgrade-step {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.upgrade-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--bs-primary);
  color: var(--bs-primary-contrast);
  font-size: .875rem;
}

.upgrade-plan {
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s ease-in-out, transform .15s ease-in-out;
}

.upgrade-plan:hover {
  transform: translateY(-2px);
}

.upgrade-plan:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.upgrade-plan.is-selected {
  border-color: var(--bs-primary);
}

.upgrade-plan-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--bs-border-color);
  border-radius: 50%;
  color: transparent;
}

.upgrade-plan.is-selected .upgrade-plan-check {
  border-color: var(--bs-primary);
  background-color: var(--bs-primary);
  color: var(--bs-primary-contrast);
}

.upgrade-plan-price {
  color: var(--bs-heading-color);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.upgrade-perk-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  padding: 0;
}

.upgrade-card-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.upgrade-card-row.is-default {
  border-color: var(--bs-primary);
}

.upgrade-summary-plan {
  padding: .75rem 1rem;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-primary-bg-subtle);
}


.form-control.upgrade-hosted-field {
  height: 2.5rem;
  padding: 0 .875rem;
  overflow: hidden;
}

.upgrade-hosted-field iframe {
  height: 100% !important;
}

/* Admin accounts
******************************************************************************/

.admin-accounts {
  font-size: .8125rem;
}

.admin-stat {
  color: var(--bs-heading-color);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.admin-stat-card {
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
}

.admin-stat-card.is-selected {
  border-color: var(--bs-primary);
}

.admin-country {
  max-width: 12rem;
}

.admin-account-cell {
  max-width: 20rem;
}

.admin-accounts-table td {
  vertical-align: middle;
}

.admin-account-details td {
  background-color: var(--bs-body-bg);
}

/* The summary card beside a long page, stopping below the fixed navbar and menu (110px together) */
@media (min-width: 992px) {
  .sticky-summary {
    position: sticky;
    top: 7.875rem;
  }
}

/* Form pages (Views/Form/Shared/_FormHeader.cshtml)
******************************************************************************/

@media (min-width: 1200px) {
  .layout-menu-fixed .layout-horizontal .layout-page .menu-horizontal + [class*=container-]:has(> #formHeaderApp) {
    padding-block-start: 4.375rem !important;
  }
}

/* One compact bar: title | tabs | actions. The header sits above every form page, often sticky, so every pixel of
   height is taken from the content. */
.form-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  min-height: 3.25rem;
  padding: .5rem 1rem;
}

.form-header-title {
  flex: 1 1 12rem;
  min-width: 0;
}

.form-header-title .form-control-sm {
  max-width: 28rem;
}

.form-title-edit {
  display: flex;
  align-items: center;
  max-width: 100%;
  cursor: pointer;
}

.form-title-edit > i {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}

.form-title-edit:hover > i,
.form-title-edit:focus-visible > i {
  opacity: 1;
}

.form-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .375rem;
  margin-left: auto;
}

/* The section tabs as a row of pills in the middle of the bar */
.form-tabs {
  display: flex;
  gap: .125rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.form-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .375rem;
  padding: .375rem .75rem;
  border-radius: .375rem;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--bs-body-color);
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}

.form-tab:hover {
  color: var(--bs-link-color);
  background-color: var(--bs-tertiary-bg);
}

.form-tab:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}

.form-tab.active {
  color: var(--qp-tag-primary);
  background-color: var(--bs-primary-bg-subtle);
}

/* Narrower than a laptop: the tabs take a line of their own under the title and the actions */
@media (max-width: 1199.98px) {
  .form-tabs {
    order: 3;
    flex-basis: 100%;
    margin: 0 -.5rem -.25rem;
    padding: .25rem .5rem 0;
    border-top: 1px solid var(--bs-border-color);
  }
}

/* The Online/Offline status and the Share panel in the header */
.form-status {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}

.form-status-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: currentColor;
}

.form-share {
  --bs-offcanvas-width: 28rem;
}

.form-share-switch .form-check-label {
  font-weight: 500;
}

/* The theme's buttons are flex rows, so a second line needs a column */
.form-share .form-share-stacked {
  flex-direction: column;
  align-items: center;
  gap: .125rem;
}

.form-share .form-share-stacked small {
  font-weight: 400;
  opacity: .75;
}

/* Section menu of the form pages (Collect, Config, Design)
******************************************************************************/

.form-section {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .625rem .75rem;
  text-align: start;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--bs-border-radius-lg);
  transition: background-color .15s;
}

.form-section + .form-section {
  margin-top: .125rem;
}

.form-section-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--bs-body-color);
  background-color: var(--bs-tertiary-bg);
  border-radius: var(--bs-border-radius-lg);
  transition: background-color .15s, color .15s;
}

.form-section-title {
  display: block;
  font-weight: 500;
  color: var(--bs-heading-color);
}

.form-section-arrow {
  flex-shrink: 0;
  opacity: 0;
  color: var(--bs-link-color);
  transition: opacity .15s, transform .15s;
  transform: translateX(-.25rem);
}

.form-section:hover {
  background-color: var(--bs-tertiary-bg);
}

.form-section:hover .form-section-icon {
  background-color: var(--bs-paper-bg);
}

.form-section:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}

.form-section.active {
  background-color: var(--bs-primary-bg-subtle);
}

.form-section.active .form-section-icon {
  color: var(--bs-white);
  background-color: var(--bs-primary);
}

.form-section.active .form-section-arrow {
  opacity: 1;
  transform: none;
}

.footer-editor {
  min-height: 10rem;
}

/* Design (Views/Form/Design/Index.cshtml)
******************************************************************************/

.form-range::-webkit-slider-runnable-track {
  background-color: var(--bs-secondary-bg);
}

.form-range::-moz-range-track {
  background-color: var(--bs-secondary-bg);
}

.design-preview {
  display: block;
  width: 100%;
  height: calc(100vh - 13.25rem);
  min-height: 24rem;
  border: 0;
  border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius);
}

.design-themes {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  max-height: 16rem;
  overflow-y: auto;
}

.design-theme-row {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.design-theme {
  display: flex;
  flex-grow: 1;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  padding: .375rem .5rem;
  text-align: start;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--bs-border-radius);
}

.design-theme:hover {
  background-color: var(--bs-tertiary-bg);
}

.design-theme-swatches {
  display: flex;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-sm);
}

.design-theme-swatches > span {
  width: 1.125rem;
  height: 1.5rem;
  background-size: cover;
}

.design-color {
  display: flex;
  gap: .5rem;
}

.design-color .form-control-color {
  flex-shrink: 0;
  width: 2.75rem;
  padding: .25rem;
}

.design-selected {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem;
  background-color: var(--bs-tertiary-bg);
  border-radius: var(--bs-border-radius);
}

.design-selected img {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: var(--bs-border-radius-sm);
}

.design-positions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}

.design-positions .insights-choice {
  padding-inline: .25rem;
}

.design-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: .5rem;
}

.design-library-add,
.design-library-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--bs-border-radius);
}

.design-library-add {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--bs-link-color);
  cursor: pointer;
  border: 1px dashed var(--bs-primary);
}

.design-library-add:hover {
  background-color: var(--bs-primary-bg-subtle);
}

.design-library-add.disabled {
  cursor: default;
  opacity: .6;
}

.design-library-image {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background-color: var(--bs-tertiary-bg);
  background-position: center;
  background-size: cover;
  border: 2px solid transparent;
  border-radius: inherit;
}

.design-library-favicon {
  background-repeat: no-repeat;
  background-size: 2rem;
}

.design-library-item.active .design-library-image {
  border-color: var(--bs-primary);
}

.design-library-delete {
  position: absolute;
  top: .25rem;
  right: .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  color: var(--bs-white);
  background-color: var(--bs-danger);
  border: 0;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .15s;
}

.design-library-item:hover .design-library-delete,
.design-library-delete:focus-visible {
  opacity: 1;
}

.design-font {
  display: block;
  width: 100%;
  padding: .5rem .75rem;
  text-align: start;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--bs-border-radius-lg);
}

.design-font:hover {
  background-color: var(--bs-tertiary-bg);
}

.design-font.active {
  color: var(--qp-tag-primary);
  background-color: var(--bs-primary-bg-subtle);
}

/* Vue
******************************************************************************/

/* In-DOM templates stay hidden until the Vue app has mounted */
[v-cloak] {
  display: none !important;
}

/* Dialogs (confirmDialog / messageDialog in src/js/app.ts, SweetAlert2). The message is what matters: the theme's
   38px title and 80px icon are scaled down so they frame it instead of dominating it. The icon is sized through its
   font-size, because all of its parts (ring, mark, animations) are drawn in em. */
.swal2-container .swal2-modal.swal2-popup {
  width: 28rem;
  padding-bottom: 1.5rem;
}

.swal2-container .swal2-modal.swal2-popup .swal2-icon {
  font-size: .6rem;
  margin: 1.75rem auto 0;
}

.swal2-container .swal2-modal.swal2-popup .swal2-title {
  margin-block: 1rem 0;
  padding: 0 1.5rem;
  max-inline-size: none;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.swal2-container .swal2-modal.swal2-popup .swal2-html-container {
  padding: .5rem 1.5rem 0;
  font-size: 1rem;
  line-height: 1.5;
}

.swal2-container .swal2-modal.swal2-popup .swal2-actions {
  margin-block-start: 1.5rem;
}

/* Loader (src/js/app.ts). The overlay fades in after a short delay, so a quick request never flashes it; it
   blocks clicks from the start. Over a container taller than the window (.is-tall) the sticky box stays in the
   middle of the viewport while the page scrolls. */
.app-loader {
  position: absolute;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(var(--bs-body-bg-rgb), .6);
  border-radius: inherit;
  animation: app-loader-in .2s ease-out .15s both;
}

.app-loader.is-fixed {
  position: fixed;
}

.app-loader.is-tall .app-loader-box {
  position: sticky;
  top: calc(50vh - 2.25rem);
  bottom: calc(50vh - 2.25rem);
}

.app-loader-box {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 4.5rem;
  min-height: 4.5rem;
  justify-content: center;
  padding: 1rem 1.25rem;
  background-color: var(--bs-paper-bg);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--bs-box-shadow-lg);
  animation: app-loader-pop .25s ease-out .15s both;
}

.app-loader-box .spinner-border {
  --bs-spinner-width: 2rem;
  --bs-spinner-height: 2rem;
  --bs-spinner-border-width: .2rem;
  flex-shrink: 0;
}

.app-loader-message {
  max-width: 24rem;
  color: var(--bs-heading-color);
  font-weight: 500;
}

.app-loader-host {
  min-height: 12rem;
}

.app-loader-positioned {
  position: relative;
}

@keyframes app-loader-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes app-loader-pop {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .app-loader,
  .app-loader-box {
    animation-duration: 1ms;
  }
}

/* A small spinner under a list while its next page loads */
.app-list-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1.5rem 0 .5rem;
  color: var(--bs-secondary-color);
}

/* Insights (Views/Form/Insights/Index.cshtml)
******************************************************************************/

.insights-views {
  flex-wrap: nowrap;
  gap: .25rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--bs-border-color);
}

.insights-views .nav-item {
  flex-shrink: 0;
}

.insights-views .nav-link {
  color: var(--bs-body-color);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.insights-views .nav-link:hover {
  color: var(--bs-link-color);
}

.insights-views .nav-link.active {
  font-weight: 500;
  color: var(--bs-link-color);
  border-bottom-color: var(--bs-primary);
}

.insights-lines {
  white-space: pre-line;
}

.insights-answers {
  max-height: 18rem;
  overflow-y: auto;
}

.insights-answer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  padding: .25rem 0;
  font-size: .8125rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.insights-upsell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background-color: var(--bs-primary-bg-subtle);
  border-radius: var(--bs-border-radius-lg);
}

.insights-upsell-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--bs-white);
  background-color: var(--bs-primary);
  border-radius: var(--bs-border-radius-lg);
}

.insights-filter {
  display: inline-flex;
  align-items: center;
  max-width: 24rem;
}

.insights-filter .btn-close {
  width: .5rem;
  height: .5rem;
  flex-shrink: 0;
}

.insights-responses thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--bs-paper-bg, var(--bs-body-bg));
}

.insights-cell {
  display: block;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insights-bar {
  height: .5rem;
}

.insights-variables {
  max-height: 20rem;
  overflow-y: auto;
}

.insights-crosstab td:first-child {
  min-width: 14rem;
}

.insights-base td {
  font-weight: 500;
  background-color: var(--bs-tertiary-bg);
}

.insights-group td {
  font-weight: 500;
  background-color: var(--bs-primary-bg-subtle);
}

.insights-stat td {
  background-color: var(--bs-tertiary-bg);
}

.insights-significance {
  margin-inline-start: .25rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--bs-link-color);
}

.insights-filter-section + .insights-filter-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bs-border-color);
}

.insights-choice {
  padding: .25rem .75rem;
  font-size: .8125rem;
  cursor: pointer;
  border: 1px solid var(--bs-border-color);
  border-radius: 50rem;
  transition: background-color .15s, border-color .15s;
}

.insights-choice:hover {
  border-color: var(--bs-primary);
}

.insights-choice.active {
  font-weight: 500;
  border-color: transparent;
}

.insights-choice:has(input:focus-visible) {
  outline: 2px solid var(--bs-primary);
  outline-offset: 1px;
}

.insights-rule {
  position: relative;
  padding: .75rem 2.25rem .75rem .75rem;
  margin-bottom: .5rem;
  background-color: var(--bs-body-bg);
  border-radius: var(--bs-border-radius);
}

.insights-rule .form-select,
.insights-rule .form-control,
.insights-rule .insights-choice {
  background-color: var(--bs-paper-bg);
}

.insights-rule-remove {
  position: absolute;
  top: 1.1rem;
  right: .75rem;
}

.offcanvas.insights-panel {
  width: 32rem;
  max-width: 100%;
}

/* Login and sign up (Views/Shared/_AuthLayout.cshtml): the brand panel beside the form
******************************************************************************/

.auth-page .auth-brand-small {
  z-index: 2;
}

@media (min-width: 992px) {
  .auth-page .auth-brand-small {
    display: none;
  }
}

/* The brand panel: a dark emerald picture of the product (res/images/auth, one per page) under a shade that keeps the
   left side, where the text sits (up to 34rem incl. padding), dark and calm whatever the panel's width. The picture is
   anchored top right, where its objects are. */
.auth-panel {
  --auth-panel-shade: linear-gradient(90deg, rgba(6, 46, 38, .95) 0, rgba(6, 46, 38, .85) 22rem, rgba(6, 46, 38, .55) 34rem, rgba(6, 46, 38, 0) 50rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 100vh;
  padding: 3rem 4rem;
  color: #fff;
  background-color: #073a30;
  background-image: var(--auth-panel-shade), linear-gradient(160deg, #0b7f61 0%, #009a73 45%, #0fb98c 100%);
  background-repeat: no-repeat;
  background-position: top right;
  background-size: cover;
}

.auth-panel-login {
  background-image: var(--auth-panel-shade), url(../res/images/auth/login.webp);
}

.auth-panel-signup {
  background-image: var(--auth-panel-shade), url(../res/images/auth/signup.webp);
}

.auth-panel-body {
  max-width: 30rem;
  margin: auto 0;
}

.auth-panel-logo {
  height: 2.25rem;
  margin-bottom: 3rem;
}

.auth-panel-title {
  margin-bottom: .75rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.auth-panel-lead {
  margin-bottom: 2.5rem;
  font-size: 1.0625rem;
  opacity: .9;
}

.auth-panel-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-panel-points li {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.auth-panel-points i {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .5rem;
  background: rgba(255, 255, 255, .16);
  font-size: 1.25rem;
}

.auth-panel-foot {
  margin: 0;
  font-size: .8125rem;
  opacity: .7;
}

.auth-form .form-label {
  margin-bottom: .375rem;
}

/* The toggle keeps the field's red border when the password is invalid */
.auth-form .input-group.is-invalid .input-group-text {
  border-color: var(--bs-form-invalid-border-color);
}
