/* Progress bar */
.progress {
    height: 4px;
    width: 100%;
    border-radius: 2px;
    background-clip: padding-box;
    overflow: hidden;
    position: relative;
}

.progress {
    opacity: 0;
}

.htmx-request .progress {
    opacity: 1;
}

.htmx-request.progress {
    opacity: 1;
}

.progress .indeterminate {
    background-color: rgba(239, 232, 224, 0.5);
}

.progress .indeterminate:before {
    content: '';
    position: absolute;
    background-color: inherit;
    top: 0;
    left: 0;
    bottom: 0;
    will-change: left, right;
    -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
    animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

.progress .indeterminate:after {
    content: '';
    position: absolute;
    background-color: inherit;
    top: 0;
    left: 0;
    bottom: 0;
    will-change: left, right;
    -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
    animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
    -webkit-animation-delay: 1.15s;
    animation-delay: 1.15s;
}

@keyframes indeterminate {
    0% {
        left: -35%;
        right: 100%;
    }

    60% {
        left: 100%;
        right: -90%;
    }

    100% {
        left: 100%;
        right: -90%;
    }
}

@keyframes indeterminate-short {
    0% {
        left: -200%;
        right: 100%;
    }

    60% {
        left: 107%;
        right: -8%;
    }

    100% {
        left: 107%;
        right: -8%;
    }
}

/* tables */


select {
    background-image: none;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

#modal {
    /* Underlay covers entire screen. */
    position: fixed;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    will-change: transform;
}

#modal>.modal-underlay {
    /* underlay takes up the entire viewport. This is only
	required if you want to click to dismiss the popup */
    position: absolute;
    z-index: -1;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    will-change: transform;
}

.modal-content {
    /* Sizing for visible dialog */
    width: 100%;
    max-width: 600px;
}

[id*="toast"] {
    animation-name: pullUpToast;
    animation-duration: 350ms;
    animation-timing-function: ease;
    will-change: transform;
}

[id*="toast"].closing {
    animation-name: pullDownToast;
    animation-duration: 350ms;
    animation-timing-function: ease;
    will-change: transform;
}


@media screen and (min-width: 641px) {
    #modal {
        /* Animate when opening */
        animation: fadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    }

    .modal-content {
    
        /* Animate when opening */
        animation-name: zoomIn;
        animation-duration: 250ms;
        animation-timing-function: ease;
    }

    #modal.closing {
        /* Animate when closing */
        animation-name: fadeOut;
        animation-duration: 250ms;
        animation-timing-function: ease;
    }
    
    #modal.closing>.modal-content {
        /* Animate when closing */
        animation-name: zoomOut;
        animation-duration: 250ms;
        animation-timing-function: ease;
    }

}
    

/* only on mobile */
@media (max-width: 640px) {
    #modal {
        animation: pullUpTransparency 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    }

    .modal-height {
        animation-name: pullUp;
        animation-duration: 650ms;
        animation-timing-function: ease;
        will-change: transform;
    }


    #modal.closing .modal-content {
        animation-name: pullDown;
        animation-duration: 550ms;
        animation-timing-function: ease;
    }

    #modal.closing {
        animation: pullDownTransparency 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    }

}

/* create animation that goes from 0.5 transparency background to transparent */

@keyframes pullUpToast {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0%);
        opacity: 1;
    }
}


@keyframes pullDownToast {
    
    0% {
        transform: translateY(0px);
        opacity: 1;
    }


    100% {
        transform: translateY(84px);
        opacity: 0;
    }
}


@keyframes pullUpTransparency {
    0% {
        background-color: rgba(0, 0, 0, 0);
    }

    100% {
        background-color: rgba(0, 0, 0, 0.5);
    }
}

@keyframes pullDownTransparency {
    0% {
        background-color: rgba(0, 0, 0, 0.5);
    }

    100% {
        background-color: rgba(0, 0, 0, 0);
    }
}

@keyframes pullUp {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateY(0%);
    }
}

@keyframes pullDown {
    0% {
        transform: translateY(0%);
    }

    100% {
        transform: translateY(100%);
    }
}


@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes zoomOut {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.9);
    }
}

form.htmx-request {
    opacity: .5;
    transition: opacity 300ms linear;
}

/* add transition for the tables */
.table-container table {
    transition: opacity 300ms linear;
}

/* filedrop */
.file-drop-area {
    position: relative;
    padding: 1rem 1rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    border: 2px dashed #dae1e7;
    background-color: #fff;
    text-align: center;
    cursor: pointer;
}

.file-drop-area .file-drop-icon {
    margin-bottom: 0.75rem;
    color: #aeb4be;
    font-size: 1.625rem;
}

.file-drop-area .file-drop-message {
    display: block;
    word-wrap: break-word;
    font-size: .875rem;
    margin-bottom: 1.25rem;
}

.file-drop-area .file-drop-input {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    opacity: 0;
    outline: none;
    cursor: pointer;
    z-index: 2;
}

.file-drop-area .btn {
    position: relative;
    z-index: 3;
}

.file-drop-area .file-drop-preview {
    max-width: 16rem;
    margin-right: auto;
    margin-bottom: 0.75rem;
    margin-left: auto;
}

img,
figure {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* filedrop */
.main-wrapper {
    height: calc(100% - 3.5rem);
}

.table-image {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.highcharts-title {
    font-weight: 400!important;
    fill: #000!important;
    font-size: 1rem!important;
}

/* daterangepicker */
.daterangepicker .ranges li.active {
    background-color: #d5d3d1!important;
    color: #000!important;
}

.daterangepicker td.active, .daterangepicker td.active:hover {
    background-color: #d5d3d1!important;
    color: #000!important;
}

.daterangepicker td.in-range {
    background-color: #d5d3d14a!important;
}

/* daterangepicker */


.select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 16px!important;
    height: 25px!important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: transparent!important;
    border-style: solid;
    border-width: 0px!important;
    height: 21px!important;
    left: 50%;
    width: 5px;
    margin-left: -4px;
    margin-top: -2px;
    position: absolute;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    top: 50%;
    width: 21px!important;
    background-repeat: no-repeat;
}



/* christmas egg start */
:root {
    --glow-rgb: 255 247 159;
  }
  
  .glow-point {
    position: absolute;
    box-shadow: 0rem 0rem 2rem 0.6rem rgb(var(--glow-rgb));
    z-index: 1000;
    pointer-events: none;
  }
  
  .holiday-element {
    position: absolute;
    z-index: 1002;
    color: white;
    font-size: 1rem;
    animation-duration: 1500ms;
    animation-fill-mode: forwards;
    pointer-events: none;
  }
  
  @keyframes fall-1 {
    0% {
      transform: translate(0px, 0px) rotateX(45deg) rotateY(30deg) rotateZ(0deg) scale(0.25);
      opacity: 0;
    }
    
    5% {
      transform: translate(10px, -10px) rotateX(45deg) rotateY(30deg) rotateZ(0deg) scale(1);
      opacity: 1;
    }
    
    100% {
      transform: translate(25px, 200px) rotateX(180deg) rotateY(270deg) rotateZ(90deg) scale(1);
      opacity: 0;
    }
  }
  
  @keyframes fall-2 {
    0% {
      transform: translate(0px, 0px) rotateX(-20deg) rotateY(10deg) scale(0.25);
      opacity: 0;
    }
    
    10% {
      transform: translate(-10px, -5px) rotateX(-20deg) rotateY(10deg) scale(1);
      opacity: 1;
    }
    
    100% {
      transform: translate(-10px, 160px) rotateX(-90deg) rotateY(45deg) scale(0.25);
      opacity: 0;
    }
  }
  
  @keyframes fall-3 {
    0% {
      transform: translate(0px, 0px) rotateX(0deg) rotateY(45deg) scale(0.5);
      opacity: 0;
    }
    
    15% {
      transform: translate(7px, 5px) rotateX(0deg) rotateY(45deg) scale(1);
      opacity: 1;
    }
    
    100% {
      transform: translate(20px, 120px) rotateX(-180deg) rotateY(-90deg) scale(0.5);
      opacity: 0;
    }
  }
/* christmas egg end */