/*!
 * -------------------------------------------------------------------------
 * glpiai plugin for GLPI
 * -------------------------------------------------------------------------
 *
 * MIT License
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 * -------------------------------------------------------------------------
 * @copyright Copyright (C) 2023 by the glpiai plugin team.
 * @license   MIT https://opensource.org/licenses/mit-license.php
 * @link      https://github.com/pluginsGLPI/glpiai
 * -------------------------------------------------------------------------
 */

/* Styles for the summarization modal */

.writing {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.writing div {
    position: absolute;
    top: 33px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #5f5f5f4d;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.writing div:nth-child(1) {
    left: 8px;
    animation: writing1 0.6s infinite;
}

.writing div:nth-child(2) {
    left: 8px;
    animation: writing2 0.6s infinite;
}

.writing div:nth-child(3) {
    left: 32px;
    animation: writing2 0.6s infinite;
}

.writing div:nth-child(4) {
    left: 56px;
    animation: writing3 0.6s infinite;
}

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

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

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

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

@keyframes writing2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}

.hidden {
    opacity: 0;
    transition: opacity 0.5s;
}

.zero-height {
    height: 0px !important;
    transition: height 0.5s;
}

.anim_container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    transition: height 0.5s;
}

.content-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Styles for the summarization button */

.action-summarize {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: radial-gradient(
        farthest-corner at 50% 100%,
        #4417b4 5%,
        #060b27 80%
    );
    font-size: 1rem;
    line-height: 1.5rem;
    border-color: #8958af !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.action-summarize:hover {
    scale: 1;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.07), 0 0 10px 0 #9917ff;
}

.action-summarize::before,
.action-summarize::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    transition: all 0.2s ease;
}

.buttonLayer {
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    color: white;
}

.buttonLayer::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    transition: all 0.2s ease;
    bottom: 0px;
    left: 0;
    transition: all 0.2s ease;
}

#generateButton__icon {
    margin-right: 0.5rem;
}

.action-summarize svg path {
    fill: white;
}

.action-summarize:hover #generateButton__mediumSparkle {
    transform-origin: center center;
    animation: mediumSparkle 2s ease infinite;
}

@keyframes mediumSparkle {
    5% {
        transform: scale(1);
    }

    12% {
        transform: scale(1.14);
        opacity: 1;
    }

    18% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.action-summarize:hover #generateButton__smallSparkle {
    transform-origin: center center;
    animation: smallSparkle 2s ease infinite;
}

@keyframes smallSparkle {
    14% {
        transform: scale(1);
        opacity: 0.4;
    }

    20% {
        transform: scale(1.1);
        opacity: 1;
    }

    28% {
        transform: scale(1);
        opacity: 0.4;
    }
}

.action-summarize:hover #generateButton__bigSparkle {
    transform-origin: center center;
    animation: bigSparkle 2s cubic-bezier(0.17, 0.68, 0.51, 0.94) infinite;
}

@keyframes bigSparkle {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    6% {
        transform: scale(0.9);
    }

    28% {
        opacity: 0.4;
        transform: scale(0.9);
    }

    38% {
        transform: scale(1.14);
        opacity: 1;
    }

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

#generateButton__mediumSparkle {
    opacity: 0.5;
}

#generateButton__smallSparkle {
    opacity: 0.4;
}