@import "../../libraries/bootstrap/bootstrap-mautic-custom-variables";

.label-as-badge {
  border-radius: @badge-border-radius !important;
}

.media-list {
  .media-body {
    width: auto;
  }
}

// Fit the right menu to the screen no matter the viewport size
.dropdown-menu-right {
  max-height: 85vh;
  overflow-y: auto;
}

// Color input fields
.minicolors-swatch::after,
.minicolors-theme-bootstrap .minicolors-swatch { border-radius: var(--swatch-size); }

.minicolors-theme-bootstrap .minicolors-swatch {
  --swatch-size: 20px;
  height: var(--swatch-size);
  width: var(--swatch-size);
  top: 50%;
  transform: translateY(-50%);
  left: 6px;
}

.minicolors-swatch::after { box-shadow: none; }

.minicolors .minicolors-grid {
  border-radius: 10px;
}

.minicolors-slider, .minicolors-opacity-slider {
  border-radius: 5px;
}

.minicolors-panel {
  border-radius: 10px;
}

.minicolors-picker {
  height: 5px;
}

// Contact image
form[name="lead"] {
  .media-body, .contact-avatar {
    width: 100%;
  }
}

// vertical tabs
.bg-auto {
  .tabs-left>li.active>a,
  .tabs-left>li.active>a:hover,
  .tabs-left>li.active>a:focus {
    border-left-width: 0;
  }

  .tabs-left, .tabs-right {
    -webkit-box-shadow: inset 0 -3px 0 -3px rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 -3px 0 -3px rgba(0, 0, 0, 0.05);

    li:last-child {
      margin-bottom: -2px;
    }
  }

  .tabs-right>li.active>a,
  .tabs-right>li.active>a:hover,
  .tabs-right>li.active>a:focus {
    border-right-width: 0;
  }
}

.tab-button {
  border-bottom: 1px solid #ebedf0 !important;
}

.modal-body.np {
  .tabs-horizontal {
    margin-top: -1px;
  }
  .tabs-left, .tabs-right {
    li>a {
      border-radius: 0;
    }
  }
}

//confirmation modal

.confirmation-modal .modal-content {
  width: 400px;
  font-size: 1.2em;
  font-weight: bold;
  margin: 10% auto;
  padding: 8px;
  border-radius: 8px;
  background: var(--background);
  text-align: center;
}

.content-overlay {
  position: absolute;
  background: var(--background);
  z-index: 50;
  width: 100%;
  height: 100%;
  padding: 15px;
  font-weight: normal;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.stat-boxes {
  .panel {
    height: 164px;
  }
}

.has-click-event {
  cursor: pointer;
}

//Mautibot
.mautibot-error {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

label.required:after {
  content: " *";
  color: @brand-danger;
}

//Nav header
#app-header .nav > li > a {
  padding: 10px 12px;
}

.col-actions {
  width: 100px;
}

/* Shuffle */
.shuffle-item .card{
  height: 150px;
}

.equal, .equal > div[class*='col-'] {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  flex:1 1 auto;
}

.mautic-pleasewait {
  width: 200px;
  height: 50px;
  position: fixed;
  left: 50%;
  top: 10px;
  margin: 0 0 0 -100px;
  text-align: center;
  font-weight: bold;
  font-size: 2em;
  color: #eee;
  z-index: 9999;
}

body.noscroll {
  overflow: hidden;
}

.form-select-modal .panel-body {
  min-height: 150px;
}

@media (max-width: @screen-sm-min) {
  .form-select-modal .panel-body {
    min-height: 0;
  }
}

.theme-selected {
  outline: 1px solid var(--focus);
  -webkit-box-shadow: 0px 0px 40px var(--focus);
  box-shadow: 0px 0px 40px var(--focus);
}

#app-content.content-only {
  .toolbar-form-buttons.pull-right {
    padding-right:20px;
  }
}

.fr-toolbar {
  border-top: 2px solid #4e5d9d;
}
.modal-body-content iframe.fr-iframe {
  min-height:300px;
}

table.table > tbody > tr > td.long-text {
  max-width: 500px;
  min-width: 300px;
  -ms-word-break: break-all;
  word-break: break-word;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
}

#dynamicContentContainer .remove-item {
  display:block;
}
#dynamicContentContainer > .tab-pane > .panel > ul {
  white-space: nowrap;
  overflow:auto;
  overflow-y:hidden;
  max-width:100%;
}
#dynamicContentContainer > .tab-pane > .panel > ul li {
  display:inline-block;
  vertical-align: top;
  float:none;
}

div[data-filter-container] .in-group {
  margin-left:20px;
}

div[data-filter-container] .panel {
  margin-bottom:0;
  margin-top:20px;
}

div[data-filter-container] .panel.in-group {
  margin-top:0;
  border-top:0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

td.col-id, th.col-id {
  width: 75px;
}

.badge-wrapper {
  float: right;
  vertical-align: middle;
  margin-right: -10px;
}
span.slot-caption {
  font-size: 12px;
}
.imagecard-caption, figcaption {
  font-size: 16px;
}
.imagecard {
  background-color: #ddd !important;
}
.imagecard .imagecard-caption {
  background-color: #bbb !important;
}

ul.media-list.media-list-feed div.media-body
{
  width:auto;
}

.characters-count {
  z-index: 100;
  float: right;
  position: relative;
}

.ui-sortable-handle {
  cursor: grab;
}

.ui-sortable-handle:active {
  cursor: grabbing;
}
.notification {
  width: inherit !important;
}
.notification-title {
  display: block !important;
}

.flip-vertically {
  transform: scaleY(-1);
  display: inline-flex;
}

.disabled-row {
  pointer-events: none;
  color: var(--text-disabled);
}

.publishstatus_pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;

  &:after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    -webkit-animation: circle-pulse 2s infinite;
    animation: circle-pulse 3s infinite;
    border-radius: 50%;
    background-color: inherit;
  }
}

@keyframes circle-pulse {
  0% {
      -webkit-transform: scale(0.55);
      transform: scale(1);
      opacity: 0.8;
  }

  50% {
      -webkit-transform: scale(1);
      transform: scale(3);
      opacity: 0;
  }

  100% {
      -webkit-transform: scale(0.95);
      transform: scale(1);
      opacity: 0;
  }
}

.copy-icon {
  display: inline-flex;
  opacity: 0;
  transform: translateX(-0.25rem);
  transition: var(--transition-all-productive);
  margin-right: -18px;
  background-color: var(--layer);
  z-index: 2;
  position: relative;
  border-radius: clamp(1px, var(--border-radius-sm), 4px);
  aspect-ratio: 1 / 1;
  color: var(--icon-interactive);
  height: 18px;
  vertical-align: middle;
  justify-content: center;
  align-items: center;
}
code:hover > .copy-icon {
  opacity: 1;
  transform: none;
}

// Logo
// --------------------------------------------------

// mautic-brand
.mautic-brand {
  display: block;
  height: @header-height;
  width: 100%;
  overflow: hidden;

  &.pull-left {
    width: 75%;
  }

  // mautic logo figure
  > svg.mautic-logo-figure {
    width: @mautic-logo-figure-width;
    height: @header-height;
    .circle {
      fill: @mautic-logo-figure-circle-fill;
    }
    .m,
    .m-arrow {
      fill: @mautic-logo-figure-m-fill;
    }
  }

  // mautic logo text
  > svg.mautic-logo-text {
    height: @header-height;
    width: @mautic-logo-text-width;
    .m,.a,.u,.t,.i,.c {
      fill: @mautic-logo-text-fill
    }
  }
}

@media (max-width: 768px) {
  svg.mautic-logo-text {
    display: none;
  }
}



.well { box-shadow: none; }

.collapsed .arrow { transform: scaleY(-1); }

.description {
  width: 410px;
  max-width: 410px;
  transition-delay: 2s;
  .transition(var(--transition-all-expressive));
}
.description:has(.collapsed) {
  width: 140px;
  .transition(all 1.5s var(--easing-standard-expressive));
}
.description-content { width: 388px; }

.description--full-width {
  width: 100%;
  max-width: 100%;

  .description-content { 
    width: 100%;
    height: 0px;
    opacity: 0;
    overflow: hidden;
    max-width: calc(100% - 20px);
    animation: animationDescription var(--duration-expressive) forwards .3s;
    transform-origin: top left;
  }
}

@keyframes animationDescription {
  from { transform: scale(0.95); opacity: 0; height: 0px; }
  to   { transform: scale(1); opacity: 1; height: 100%; }
}

.builder-active {
  background-color: var(--background);
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1030;
}

.builder .builder-panel-top {
  margin-bottom: 10px;
}

.builder-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 30%;
  height: 100%;
  padding: 15px;
  background-color: var(--layer, #d5d4d4);
  overflow-y: auto;
}

.builder-content {
  position: fixed;
  left: 0;
  top: 48px;
  width: 70%;
  height: 100%;
}

.builder-panel .panel a.btn {
  white-space: normal;
}

@media (max-width: 767px) {
  .builder .builder-panel {
    width: 100%;
    bottom: 0;
    top: auto;
    height: 35%;
    padding-left: 30px !important;
    padding-right: 30px !important;
    border-top: 1px solid #757575;
    position: fixed;
  }
  .builder .builder-content {
    right: 0;
    width: 100%;
  }
  .builder .builder-panel-top {
    position: relative;
    width: 100%;
  }
  .builder .builder-tokens {
    margin-top: 10px;
  }
}

.rounded-corners-preview {
  --preview-width: 28px;
  width: var(--preview-width);
  height: calc(var(--preview-width) / 1.4);
  background-color: var(--text-placeholder);
  margin: 3px 4px;
}

.rounded-corners-preview--0 {
  border-radius: 0;
}

.rounded-corners-preview--8 {
  border-radius: 3px;
}

.rounded-corners-preview--16 {
  border-radius: 6px;
}

.rounded-corners-preview--32 {
  border-radius: 32px;
}

.category--inline-color {
  width: 18px;
  height: 8px;
  border-radius: 10px;
  background: var(--category-color);
  transition: var(--transition-all-productive);

  i { 
    opacity: 0; 
    transition: var(--transition-all-productive); 
    filter: invert(100%) grayscale(100%) contrast(500%);
    color: var(--category-color);
  }
}

.category--inline:hover .category--inline-color {
  height: 16px;
  width: 26px;

  i { opacity: 1; }
}

.tooltip-inner { padding: 12px; }
.popover {
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: clamp(4px, var(--border-radius-sm), 8px);
  box-shadow: 0 0px 10px 0px rgb(0 0 0 / 7%);
}
.popover-title {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
  line-height: 1em;
  font-size: calc(1em + 1px);
  border-radius: 8px 8px 0 0;
  .background-blur()
}

.popover-content {
  padding: 12px 16px 16px;
  border-radius: 0 0 clamp(4px, var(--border-radius-sm), 8px) clamp(4px, var(--border-radius-sm), 8px);
  background-color: var(--layer-02);
}

@media (min-width: 768px) {
  .popover:has([class^="col-"]) {
    max-width: 450px;
    width: 450px;
  }
}

.project-popover {
    display: inline-flex;
}

.project-popover__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.project-popover__icon {
  background-color: var(--background-brand);
  color: var(--text-on-color);
  aspect-ratio: 1 / 1;
  width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border-radius: 4px;
}

.project-popover__meta {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.project-popover__meta-icon {
  display: inline-flex;
  width: 24px;
}

.project-popover__actions {
  display: flex;
  flex-direction: column;
}

.modal.fade .modal-dialog {
  -webkit-transform: scale(0.95);
  -ms-transform: scale(0.95);
  -o-transform: scale(0.95);
  transform: scale(0.95);
  .transition(transform var(--duration-productive) var(--easing-standard-productive));
}

.modal.in .modal-dialog {
  -webkit-transform: translate(0, 0);
  -ms-transform: translate(0, 0);
  -o-transform: translate(0, 0);
  transform: translate(0, 0) scale(1);
}

@keyframes modal-fade {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

.modal.fade .modal-dialog {
  animation: modal-fade var(--duration-productive) var(--easing-standard-productive);
}

.code-snippet {
  position: relative;

  button {
    position: absolute;
    right: 0;
    top: 0;
  }

  &--single {
    code {
      min-height: 24px;
      display: flex;
      text-wrap: nowrap;
      align-items: center;
    }
    &:has(button) {
      code {
        padding-inline-end: 30px;

        &:before {
          content: '';
          position: absolute;
          inset: 0;
          background: linear-gradient(to right, transparent 80%, var(--layer) 95%);
          border-top-right-radius: clamp(4px, var(--border-radius-sm), 6px);
          border-bottom-right-radius: clamp(4px, var(--border-radius-sm), 6px);
          pointer-events: none;
        }
      }
    }
    button {
      border-top-right-radius: clamp(4px, var(--border-radius-sm), 6px);
      border-bottom-right-radius: clamp(4px, var(--border-radius-sm), 6px);
    }
  }
  &--multi {
    pre:before {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 70px;
      background: linear-gradient(to top, var(--layer) 5%, transparent);
      pointer-events: none;
      max-height: 100%;
    }
  }
  &--inline {
    display: inline-flex;
    code {
      cursor: pointer;
    }
  }
}

.asset-preview {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;

  &:hover {
    .asset-preview__label {
      opacity: 0.5;
    }
  }
  
  .asset-preview__label:has(a:focus) {
    opacity: 0.5;
  }
}

.asset-preview--image {
  border-radius: var(--border-radius-sm);
  transition: var(--transition-all-expressive); 
  transform: scale(1);

  .img-thumbnail {
    background-color: var(--background);
    border-color: transparent;
    transition: var(--transition-all-expressive);
  }

  &:hover {
    transform: scale(1.05);
    
    .img-thumbnail {
      border-radius: 12px;
      box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
      border-color: var(--interactive);
    }
  }

  &:active {
    transform: scale(1.35);

    .img-thumbnail {
      border-radius: 24px;
      box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
      border-color: var(--interactive);
    }

    .asset-preview__label {
      opacity: 0;
    }
  }
}

.asset-preview__label {
  opacity: 0;
  position: absolute;
  top: 10px;
  z-index: 1;
  right: 10px;
  transition: var(--transition-all-expressive);
}

.chart-no-data {
  background-color: var(--layer);
  width: 100%;
}
