/* Prevent scroll on narrow devices */
/* This was commented out to prevent double scrollbars when modal open */
/* html,
body {
 overflow-x: hidden;  
} */

body {
  padding-top: 56px;
}

/* Prevent modals from shifting pages with a scrollbar when they are opened */
body.modal-open,
body.modal-open .navbar.fixed-top {
  overflow: auto;
  padding-right: 0px !important;
}

.avatar-container {
  display: inline-block;
  font-size: 1rem;
  height: 3rem;
  position: relative;
  width: 3rem;
}

.avatar {
  vertical-align: middle;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin-left: 10px;
}

/* Used on feeds */
.avatar-container img.avatar {
  margin-left: 0px;
}

.ms-n2 {
  margin-left: -0.375rem !important;
}

.profile-avatar {
  vertical-align: middle;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  margin-right: 1rem;
}

a.app-link {
  text-decoration: none;
}

a.app-link:hover {
  text-decoration: underline;
}

.btn-outline-secondary {
  border-color: #CFD4DA !important;
  color: #383838 !important;
}

.btn-outline-secondary.active {
  background-color: #E9F0FE !important;
  color: #4E88EB !important;
  border-color: #4E88EB !important;
  box-shadow: none !important;
}

.btn-outline-secondary:hover {
  background-color: #F2F2F2 !important;
}

.activity-type-picker button.btn-outline-secondary.active:focus {
  outline: none !important;
  box-shadow: none !important;
}

.btn-secondary {
  border-color: #F2F2F2 !important;
  background-color: #F2F2F2 !important;
  color: #383838 !important;
}

.btn-secondary.active {
  background-color: #DDDDDD !important;
  border-color: #DDDDDD !important;
  color: #383838 !important;
}

.btn-secondary:hover {
  background-color: #DDDDDD !important;
  border-color: #DDDDDD !important;
  color: #383838 !important;
}

.btn-check:active+.btn-outline-secondary,
.btn-check:checked+.btn-outline-secondary,
.btn-outline-secondary.active,
.btn-outline-secondary.dropdown-toggle.show,
.btn-outline-secondary:active {
  color: #fff;
  background-color: #DDDDDD;
  border-color: #6c757d;
}

.app-bg-info {
  border-color: #E2ECF4 !important;
  background-color: #E2ECF4 !important;
  color: #39739D !important;
}

/*  Top Navigation */
#app-navbar .nav-link {
  border-radius: 5px;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  margin: 0.25rem !important;
}

#app-navbar .nav-link.active,
#app-navbar .nav-link.active:hover {
  background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25));
}

#app-navbar .nav-link:hover {
  background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15));
}

.app-infoicon {
  color: #adb5bd;
  cursor: help;
}

.app-infoicon:hover {
  color: #6F3CBD;
  cursor: help;
}

.app-infoicon.bi-info-circle-fill {
  color: #6F3CBD !important;
}

.app-popover {
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
}

.app-link-disabled {
  color: #adb5bd;
}

/* Offcancas Navigation */
@media (max-width: 991.98px) {
  .offcanvas-collapse {
    position: fixed;
    top: 48px;
    /* Height of navbar */
    bottom: 0;
    left: 100%;
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    padding-top: 1rem;
    overflow-y: auto;
    visibility: hidden;
    background-color: #343a40;
    transition: transform .3s ease-in-out, visibility .3s ease-in-out;
  }

  .offcanvas-collapse.open {
    visibility: visible;
    transform: translateX(-100%);
  }

  .offcanvas-collapse.open a.nav-link {
    padding-right: 1rem !important;
    padding-left: 1rem !important;
    padding-top: 1rem !important;
  }

  .offcanvas-collapse input {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0rem !important;
  }

  .offcanvas-collapse #user-avatar {
    width: 100%;
    margin-top: 1rem;
    margin-left: 0%;
  }

  .offcanvas-collapse .dropdown-menu-end[data-bs-popper] {
    right: auto;
    left: auto;
  }

}

/* Custom app tabs (e.g. Underlined) */
.nav.app-tabs {
  border-bottom: 1px solid #dee2e6 !important;
}

.nav.app-tabs .nav-link {
  color: #6c757d;
}

.nav.app-tabs .active {
  border-bottom: 2px solid #6F3CBD !important;
  font-weight: 500;
  color: #343a40;
}


/* Account Field Settings */
#app-field-settings .list-group-item {
  border-left: 2px solid white;
}

.app-field-required {
  border-left: 2px solid red !important;
}

#app-field-settings .list-group-item-action {
  cursor: pointer;
}

#app-field-settings .list-group-flush>.list-group-item:last-child {
  border-bottom-width: 1px !important;
}

#app-field-settings .card-header {
  font-weight: 500;
  background-color: transparent;
}

#app-field-settings .bi-grip-vertical {
  margin-left: -1rem;
  float: left !important;
  display: none;
}

#app-field-settings .app-field-reorder-enabled .bi-grip-vertical {
  display: block;
}

#app-field-settings .app-field-reorder-enabled {
  cursor: move;
}

#app-field-settings .card .app-field-reorder-controls {
  position: absolute;
  bottom: .25rem;
  right: .25rem;
  display: none;
}

.app-field-reorder-ghost {
  border: 2px dashed #398FE8 !important;
  background-color: #E4F3FC !important;
  color: #E4F3FC !important;
  height: 41px;
}

.app-field-reorder-chosen {
  opacity: 1 !important;
}

/* Sub-Navigation */
.nav-scroller {
  position: relative;
  z-index: 2;
  height: 2.75rem;
  overflow-y: hidden;

}

.nav-scroller .nav {
  display: flex;
  flex-wrap: nowrap;
  padding-bottom: 1rem;
  margin-top: -1px;
  overflow-x: auto;
  color: rgba(255, 255, 255, .75);
  text-align: center;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-underline .nav-link {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: .875rem;
  color: #6c757d;
}

.nav-underline a.nav-link:hover {
  color: #007bff;
}

.nav-underline .active {
  font-weight: 600;
  color: #343a40;
}

.text-white-50 {
  color: rgba(255, 255, 255, .5);
}


.btn-appgrey {
  color: #fff;
  background-color: #B3BAC4;
  border-color: #B3BAC4;
}

.btn-outline-appgrey {
  color: #B3BAC4;
  border-color: #B3BAC4;
}

#app-search {
  max-width: 300px;
  background-color: #8A5FCC;
}

#app-search::placeholder {
  /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: #CCBAE7;
  opacity: 1;
  /* Firefox */
}

#app-search:focus {
  background-color: #FFF;
  outline: none;
  box-shadow: none;
}



/* Quick Add Menu */
#app-quickadd:focus {
  outline: none;
  box-shadow: none;
}

#app-quickadd:hover {
  background-color: transparent !important;
}

/* Start:  Carat used on quick menu */
.dropdown-menu-center {
  right: auto;
  left: 50%;
  -webkit-transform: translate(-41%, 0);
  -o-transform: translate(-41%, 0);
  transform: translate(-41%, 0);
}

.dropdown-menu-arrow::before {
  border-bottom: 9px solid rgba(0, 0, 0, 0.2);
  border-left: 9px solid rgba(0, 0, 0, 0);
  border-right: 9px solid rgba(0, 0, 0, 0);
  content: "";
  display: inline-block;
  left: 46%;
  /* position */
  position: absolute;
  top: -8px;
}

.dropdown-menu-arrow::after {
  border-bottom: 8px solid #FFFFFF;
  border-left: 9px solid rgba(0, 0, 0, 0);
  border-right: 9px solid rgba(0, 0, 0, 0);
  content: "";
  display: inline-block;
  left: 46%;
  /* position */
  position: absolute;
  top: -7px;
}

.dropdown-menu-center.dropdown-menu-arrow {
  left: 50%;
}

/* End:  Carat used on quick menu */

/* Activity Calendar - Override FullCalendar styles*/
.fc .fc-toolbar-title {
  font-size: 1em;
  font-weight: normal;
  margin-left: .8rem;
}

.fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 1em;
  margin-right: 1em;
}

.fc-header-toolbar .fc-button {
  padding: 0em 0em;
  font-size: 1em;
}

.fc .fc-button-primary {
  color: #3C3F43;
  background-color: #fff;
  border-color: #fff;
}

.fc .fc-button-primary:hover {
  color: #3C3F43;
  background-color: #F4F4F4;
  border-color: #F4F4F4;
}

.fc .fc-button-primary:disabled {
  color: #3C3F43;
  background-color: #fff;
  border-color: #fff;
}

.fc .fc-button-primary:focus {
  box-shadow: #FFF;
  border-color: #FFF;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
  color: #3C3F43;
  background-color: #F4F4F4;
  border-color: #F4F4F4;
}

.fc .fc-button-primary:not(:disabled):active:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active:focus {
  color: #3C3F43;
  background-color: #F4F4F4;
  border-color: #F4F4F4;
}

.fc .fc-button:focus {
  box-shadow: 0 0 0 0 #FFF;
}

.fc .fc-button-primary:focus {
  box-shadow: 0 0 0 0 #FFF;
}

.fc .fc-button-primary:not(:disabled):active:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active:focus {
  box-shadow: 0 0 0 0 #FFF;
}

.fc .fc-button:focus {
  outline: 0px auto #FFF;
}

.fc-theme-standard .fc-scrollgrid {
  border-left-width: 0px;
}

.fc .fc-daygrid-day.fc-day-today {
  background-color: inherit;
}

.fc .fc-timegrid-col.fc-day-today {
  background-color: inherit;
}


/* Activity Modal */
#activity-modal .modal-body {
  padding-top: 0px;
  padding-bottom: 0px;
  padding-right: 0px;
}

#activity-schedule {
  border-left: 1px solid #DEE2E6;
  padding-left: 0px;
  padding-right: 0px;
}

.activity-event-icon .fc-event-title::before {
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -0.125em;
  margin-right: 5px;
  -webkit-font-smoothing: antialiased;
}

.clock .fc-event-title::before {
  content: "\f293";
}

.telephone .fc-event-title::before {
  content: "\f5c1";
}

.send .fc-event-title::before {
  content: "\f6c0";
}

.flag .fc-event-title::before {
  content: "\f3cc";
}

.person-video3 .fc-event-title::before {
  content: "\f679";
}

.people-fill .fc-event-title::before {
  content: "\f4cf";
}

/* Style the tables */
.app-table thead {
  /* background-color: #E9ECEF; */
  border-top: 0px solid #DEE2E6;
  border-bottom: 3px solid #DEE2E6;

}

table.dataTable th {
  background-color: inherit;
  /* fix missing border in firefox */
}

.app-table.table>:not(:first-child) {
  border-top: 1px solid currentColor;
}

.app-table tbody {
  border-color: #DEE2E6 !important;
}

.app-table thead th {
  color: #58666F !important;
  font-weight: 600;
}

table.app-table-hover tbody tr:hover {
  background-color: #F8F9FA;
  cursor: pointer;
}

/*
 @preserve
 bstreeview.css
 Version: 1.2.0
 Authors: Sami CHNITER <sami.chniter@gmail.com>
 Copyright 2020
 License: Apache License 2.0
 Project: https://github.com/chniter/bstreeview
*/
.bstreeview {
  position: relative;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, .125);
  border-radius: .25rem;

  padding: 0;

  /* Removed this due to the dropdown menus being hidden */
  /* overflow: hidden; */
}

.bstreeview .list-group {
  margin-bottom: 0;
}

.bstreeview .list-group-item {
  border-radius: 0;
  border-width: 1px 0 0 0;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  cursor: pointer;
}

.bstreeview .list-group-item:hover {
  background-color: #F8F9FA;
}

.bstreeview>.list-group-item:first-child {
  border-top-width: 0;
}

.bstreeview .state-icon {
  margin-right: 8px;
  width: 12px;
  text-align: center;
}

.bstreeview .item-icon {
  margin-right: 5px;
}

.collapsing {
  transition: none;
}

#app-roletree .list-group-item {
  padding-right: 0.3rem;
}

.app-droptree-container .dropdown {
  display: none;
}

/* SweetAlert2 Customizations */
button.swal2-cancel {
  color: #383838 !important;
}

/* Pipeline */

.app-pipeline-stage-header {
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 2px solid #dee2e6;
  /*  margin-top: .5rem; */
  margin-bottom: 1rem;
  display: grid;
  padding-bottom: 0.5rem;
  padding-left: .5rem;
  padding-right: .5rem;
  padding-top: 3px;
  background-image: url(pipeline-chevron.png);
  background-repeat: no-repeat;
  background-position-x: right;
}

.app-pipeline-stage-detail {
  font-weight: normal;
  font-size: 1rem;
}

.app-pipeline-deal {
  margin: .5rem;
  background-color: #F6F5FC;
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
}

.app-pipeline-deal:hover {
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
  cursor: grab;
}

.app-pipeline-deal .card-footer {
  padding: 1rem 0 0 0;
  border: 0;
  background-color: #F6F5FC;
}

.app-pipline-stage-deals {
  min-height: 400px;
}

.app-pipeline-deal-ghost {
  opacity: 0.33;
}

.app-pipeline-deal-chosen {
  cursor: grabbing !important;
}

.app-pipeline-deal-drag {
  cursor: grabbing !important;
}

/* Datatable */
table.dataTable {
  margin-top: 0px !important;
  border-collapse: collapse !important;
}

.app-table-actions {
  width: 26px;
  display: table-cell;
  text-align: center;
  float: right;
}

.app-table-actions:hover {
  background-color: #E9ECEF;
}

th.app-table-column-picker {
  padding: 0rem 0.3rem !important;
  font-size: 125%;
  vertical-align: middle;
  text-align: center;
  border-left: 1px solid #dee2e65b;
  cursor: pointer;

}

th.app-table-column-picker i {
  padding: 2px 7px 5px 7px;
  border-radius: 50%;
  opacity: 0.4;
}

th.app-table-column-picker i:hover {
  background-color: #E9ECEF;
  opacity: 1;
}

/* input.dt-checkboxes, .dt-checkboxes-select-all input{
  width: 16px;
  height: 16px;
} */

/* Textarea - grow from one line to 3 lines upon focus */
.app-textarea {
  height: 38px;
}

.app-textarea:focus {
  height: 86px;
}

.app-droptree-container .list-group-item {
  border: none;
}

/* Profile Dialog */
#profile_form .app-permission-toggle:checked {
  background-color: #3CAF76;
  border-color: #3CAF76;
}

#profile_form .app-permission-matrix {
  opacity: 0.7;
}

#profile_form .app-permission-matrix-active {
  opacity: 1;
}

#profile_form .app-permission-matrix-active .app-permission-crud:checked {
  background-color: #3CAF76;
  border-color: #3CAF76;
}

#profile_form .app-permission-matrix-active .app-permission-crud {
  background-color: #EC403D;
  border-color: #EC403D;
}

#profile_form .app-permission-matrix-active .form-switch .form-check-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e");
}

/* Customize Select2 Bootstrap 5 theme */
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--highlighted {

  background-color: #E9ECEF
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected=true] {
  color: #fff;
  background-color: #0d6efd
}

/* Hide the focus when the menu is open */
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: #ced4da;
  -webkit-appearance: none;
  box-shadow: none !important;
}

.select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection {
  border-bottom: 1px solid #ced4da;
  border-bottom-right-radius: .25rem;
  border-bottom-left-radius: .25rem;
}

.app-field-type-desc {
  font-size: .85rem;
}

/* View Menu Customizations */
.app-view-menu .dropdown-header {
  color: #313131;
  font-size: 1rem;
  font-weight: 600;
}

.app-view-menu .dropdown-item{
  
}

/* Ask Sorivelo panel */
#ask-bailey {
  width: 420px;
  max-width: 100vw;
}

.ask-bailey-msg {
  max-width: 90%;
  width: fit-content;
  overflow-wrap: anywhere;
}

.ask-bailey-reply p:last-child,
.ask-bailey-reply ul:last-child {
  margin-bottom: 0 !important;
}

/* AI fill: fields Sorivelo filled in from pasted text */
.ai-filled .form-control,
.ai-filled .form-select,
.ai-filled .select2-selection,
.ai-filled tags {
  background-color: rgba(255, 193, 7, .15) !important;
}

/* Ticket conversation (record page): the customer's messages, the team's
   replies, and internal notes, which are yellow so nobody mistakes one for
   something the customer sees */
.ticket-msg {
  border: 1px solid #dee2e6;
}

.ticket-msg-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-msg-customer {
  background-color: #f8f9fa;
}

.ticket-msg-reply {
  background-color: #f1f6ff;
  border-color: #b6d4fe;
}

.ticket-msg-internal,
.ticket-internal-input,
.ticket-internal-input:focus {
  background-color: #fff8db;
  border-color: #ffe69c;
}

.ticket-not-sent {
  color: #997404;
}
