/* CRM overrides on top of the Vuexy core */

.menu .app-brand {
  height: 64px;
}

.app-brand-logo .avatar-initial {
  width: 34px;
  height: 34px;
}

.app-brand-text {
  font-size: 1.25rem;
}

.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 72px !important;
}

.content-wrapper .navbar {
  z-index: auto;
}

/* Table cell that may wrap inside a nowrap table */
.cell-wrap {
  min-width: 12rem;
  white-space: normal;
}

.text-pre-line {
  white-space: pre-line;
}

/* Whole card is a link (x-ui.link-card) */
.card-link {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card-link:hover {
  box-shadow: var(--bs-box-shadow-lg);
  transform: translateY(-2px);
}

/* Image thumbnails (x-ui.gallery, x-ui.images-input) */
.crm-thumb {
  display: block;
  width: 140px;
  height: 100px;
  border-radius: var(--bs-border-radius);
  border: 1px solid var(--bs-border-color);
  object-fit: cover;
  background: var(--bs-gray-100);
}

/* Image server browser tiles (x-ui.media-library) */
.crm-media-tile {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.375rem;
  border: 2px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-paper-bg, #fff);
  cursor: pointer;
}

.crm-media-tile img {
  width: 100%;
  height: 110px;
  border-radius: calc(var(--bs-border-radius) - 2px);
  object-fit: cover;
}

.crm-media-tile.is-selected {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.16);
}

.crm-media-name {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.crm-lightbox-image {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--bs-border-radius);
}

/* Repeater rows (x-ui.repeater) */
[data-crm-repeater-item] + [data-crm-repeater-item] {
  margin-top: 0.75rem;
}

/* Rich text shown on detail pages */
.crm-richtext > :last-child {
  margin-bottom: 0;
}

.crm-richtext table {
  width: 100%;
  margin-bottom: 1rem;
}

.crm-richtext td,
.crm-richtext th {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--bs-border-color);
}

/* Summernote inside Vuexy forms */
.note-editor.note-frame {
  border-color: var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.note-editor .note-toolbar {
  background: var(--bs-gray-50, #f8f8f9);
  border-bottom-color: var(--bs-border-color);
}

/* Badges next to a page title keep their normal size */
h4 > .badge {
  font-size: 0.8125rem;
}
