// ======================== ·
// REFACTOR - popover
// tc-bt-showhelp, pp-help, popover, popover-alt
// ======================== ·

@use "../../tools/mixins/mixins-forms" as *;
@use "../../settings/base/colors/s-colors-general" as colors-general;
@use "../../settings/base/display/s-space" as spaces;
@use "../../settings/base/s-fonts" as fonts;

// ================ ·
// BOOTSTRAP REFACTOR CALL
// ================ ·

.btn-help:hover {
  background: #FE2E9A !important;
}

.popover {
  @include t-position-properties(0, null, null, 0);
  z-index: 1060;
  display: none;
  max-width: 276px;
  padding: 1px;
  line-height: 1.42857143;
  line-break: auto;
  text-align: left;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  word-break: normal;
  word-spacing: normal;
  word-wrap: normal;
  white-space: normal;
  font-size: 14px;
  background-color: #fff;
  background-clip: padding-box;
  border-radius: 6px;
  @include t-box-shadow(0, 5px, 10px, black, 20%);
}
.popover.ptop {
  margin-top: -10px;
}
.popover.right {
  margin-left: 10px;
}
.popover.bottom {
  margin-top: 10px;
}
.popover.left {
  margin-left: -10px;
}
.popover > .arrow {
  border-width: 11px;
}
.popover > .arrow,
.popover > .arrow:after {
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}
.popover > .arrow:after {
  content: "";
  border-width: 10px;
}
.popover.ptop > .arrow {
  bottom: -11px;
  left: 50%;
  margin-left: -11px;
  border-bottom-width: 0;
}
.popover.ptop > .arrow:after {
  bottom: 1px;
  margin-left: -10px;
  content: " ";
  border-top-color: #fff;
  border-bottom-width: 0;
}
.popover.right > .arrow {
  top: 50%;
  left: -11px;
  margin-top: -11px;
  border-left-width: 0;
}
.popover.right > .arrow:after {
  bottom: -10px;
  left: 1px;
  content: " ";
  border-right-color: #fff;
  border-left-width: 0;
}
.popover.bottom > .arrow {
  top: -11px;
  left: 50%;
  margin-left: -11px;
  border-top-width: 0;
}
.popover.bottom > .arrow:after {
  top: 1px;
  margin-left: -10px;
  content: " ";
  border-top-width: 0;
  border-bottom-color: #fff;
}
.popover.left > .arrow {
  top: 50%;
  right: -11px;
  margin-top: -11px;
  border-right-width: 0;
}
.popover.left > .arrow:after {
  right: 1px;
  bottom: -10px;
  content: " ";
  border-right-width: 0;
  border-left-color: #fff;
}
.popover-title {
  padding: 8px 14px;
  margin: 0;
  font-size: 14px;
  background-color: #f7f7f7;
  border-bottom: 1px solid #ebebeb;
  border-radius: 5px 5px 0 0;
}
.popover-content {
  padding: 9px 14px;
}

.tc-bt-showhelp:hover,
.tc-bt-showhelp:active,
.tc-bt-showhelp.active {
  background: #FE2E9A;
}

.pp-help {
  border: none;
  background: none;
  box-shadow: none;
  opacity: 0.8;
  width: auto;
}

.pp-help .popover-content {
  background: #FE2E9A !important;
  padding: 7px spaces.$s-space-small;
  color: white;
  border-radius: 6px;
  border: 1px solid rgba(black, .2);
}

.pp-help.left .popover-content {
  margin-top:  - (spaces.$s-space-tiny);
}

.pp-help.right .popover-content {
  margin-top:  - (spaces.$s-space-tiny);
}

.pp-help .arrow {
  border-width: 8px;
}

.pp-help .arrow:after {
  display: none;
}

.pp-help.ptop .arrow {
  border-top-color: #FE2E9A !important;
  bottom: -6px;
  margin-left: -7px;
}

.pp-help.bottom .arrow {
  border-bottom-color: #FE2E9A !important;
  top: -6px;
  margin-left: -7px;
}

.pp-help.left .arrow {
  border-left-color: #FE2E9A !important;
  right: -6px;
}

.pp-help.right .arrow {
  border-right-color: #FE2E9A !important;
  left: -6px;
}

.overlay-pp-help {
  top: 0;
  bottom: 0;
  width: 100%;
}

.popover.custom-link {
  max-width: 350px;
  bottom: 40px;
  right: 40px;
  display: inline;
  top: auto;
  left: auto;
}

.popover.custom-link .popover-content {
  transition: all 0.3s ease-in-out 0s;
}

.popover.custom-link .popover-content > i {
  transition: all 0.3s ease-in-out 0s;
  display: block;
  text-align: center;
  margin: 0 auto;
  font-size: fonts.$s-font-size-big;
}

a.popover-link:hover .popover.custom-link .popover-content {
  background-color: #861851 !important;
}

a.popover-link:hover .popover.custom-link .popover-content > i::before {
  content: "\f06e";
}

.popover-alt {
  position: relative;
  display: inline-block;
}

.popover-alt .popover-alt-text {
  position: absolute;
  bottom: 125%;
  left: 50%;
  width: 130px;
  visibility: hidden;
  background-color: white;
  color: initial;
  text-align: center;
  border-radius: 6px;
  padding: spaces.$s-space-tiny 0;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 1px 4px 6px colors-general.$s-color-gray-dark !important;
}

.popover-alt .popover-alt-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left:  - (spaces.$s-space-tiny);
  border-width: 5px;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.popover-alt:hover .popover-alt-text {
  visibility: visible;
  opacity: 1;
}

.close-button {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: black;
    cursor: pointer;
    z-index: 1001;
}

/* Tutorial Controls */
.tutorial-controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255,255,255,1);
    display: none;
    z-index: 1002;
    text-align: center;
    padding: 26px;
}

body.tutorial-active .tutorial-controls {
    display: block;
}

.tutorial-controls button {
    margin: 0 10px;
    padding: 10px 20px;
    font-size: 16px;
}

/* CSS to style the disabled Previous button */
#tutorial-prev.disabled,
#tutorial-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
