/* Home Cards */
:root  > * {
    --fh-home-card-shadow: 0px 1px 2px #0208140f, 0px 2px 8px #02081414;
}

.md-typeset ul.fh-home-cards {
    display: grid;
    grid-template-columns: auto auto;
    list-style: none;

    li.fh-home-card {
        min-height: 182px;
        max-height: 182px;
        border: var(--fh-border);
        border-radius: var(--fh-border-radius);
        border-color: var(--fh-color-border);

        a {
            color: var(--md-typeset-color);

            height: 100%;
            overflow: hidden;
            display: grid;
        }

        a > * {
            margin-left: 8px;
        }

        .fh-home-card-icon {
            display: flex;
            justify-content: center;
            align-items: center;
            width: fit-content;
            height: fit-content;

            padding: 10px;
            margin-top: 10px;

            border: var(--fh-border);
            border-radius: 50%;

            i {
                font-size: 28px;
            }   
        }

        .fh-small-text {
            font-size: 14px;
        }
    }

    li.fh-home-card:hover {
        box-shadow: var(--fh-home-card-shadow);
        border-color: var(--md-typeset-a-color);

        .fh-home-card-icon {
            color: var(--md-typeset-a-color);
            border-color: var(--md-typeset-a-color);
        }
    }
}

/* Title with Image */
.md-typeset {
    h1.fh-title-with-image {
        position: absolute;
        margin: 20px 0;
    }

    p:has(.fh-image-of-title) {
        display: flex;
        justify-content: flex-end;

        img {
            max-height: 60px;
        }
    }
}

/* Title tag */
.md-typeset .fh-version-tag {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 0.5rem;
    padding: 0.15em 0.8em;
    border-radius: 999px;
    background: var(--fh-identity-color);
    color: var(--fh-color-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

.md-typeset .fh-version-tag:hover {
    filter: brightness(1.08);
}

/* Video Wrapper */
.md-typeset .video-wrapper {
    position: relative;
    display: block;
    height: 0;
    padding: 0;
    overflow: hidden;
    padding-bottom: 56.25%;

    > iframe {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }
}

/* Warning cards */
.md-typeset .fh-warning-card {
    background: #fdf3cf;
    margin-top: 0.6em;
    margin-bottom: 0.6em;
    padding: 0.4em 0.9em;
    color: #9b7203;
    border: 1px solid #e5dcba;
    border-radius: 8px;

    &::before {
        font-variant: normal;
        text-transform: none;
        display: inline-block;
        font: normal normal normal 14px / 1 Flexygo-icons;
        font-family: 'Flexygo-icons' !important;
        font-size: 16px;
        text-rendering: auto;
        margin-right: 8px;
        content: 'i';
        border: 1px solid #9b7203;
        height: 20px;
        width: 20px;
        text-align: center;
        font-weight: bold;
        border-radius: 50%;
        padding-top: 1px;
    }
}

.md-typeset .fh-info-card {
    background-color: color-mix(in hsl, #d6ebfd, transparent 65%);
    margin-top: 0.6em;
    margin-bottom: 0.6em;
    padding: 0.4em 0.9em;
    border: 1px solid #c7e1f8;
    border-radius: 8px;
}

[data-md-color-scheme="darkmode"] .md-typeset .fh-info-card {
    background-color: color-mix(in hsl, #2a3b50, transparent);
    border-color:#3e3e3f;
}

/* Buttons */
.button, .md-typeset a.button, .md-typeset .md-button {
    display: inline-block;
    cursor: pointer;
    background-color: var(--md-default-bg-color);
    color: var(--fh-identity-color);
    padding: 10px 15px;
    border-radius: 50px;
    border: .1rem solid var(--fh-identity-color);
    font-weight: 500;
    transition: color 125ms, background-color 125ms, border-color 125ms;

    &.md-button--primary {
        background-color: var(--fh-identity-color);
        color: var(--fh-color-text);
        border: .1rem solid var(--fh-identity-color);
    }

    &:hover {
        background-color: var(--fh-identity-color);
        color: var(--fh-color-text);
    }
}

/* Links */
.link, fh-copy:not([class]) {
    color: var(--fh-identity-color-accent);
    cursor: pointer;
}

/* Modals */
dialog {
    padding: 30px 50px;
    border-radius: var(--fh-border-radius);
    border: 1px solid var(--fh-identity-color);

    p.input-group {
        display: flex;
        flex-direction: column;
        margin-bottom: 28px;
        
        label {
            font-size: 18px;
            margin-bottom: 5px;
        }

        input {
            font-size: 18px;
            border-bottom: 1px solid gainsboro;
        }
    }

    div.button-container {
        font-size: 20px;
        text-align: center;
        color: white;

        button {
            color: white;
            background: var(--fh-identity-color);
            padding: 10px 20px;
            border-radius: 20px;
        }
    }
}

/* Small Messages */
[dir=ltr] .md-dialog {
    transform: translateY(0);
    bottom: 25px;
    right: -270px;
    opacity: 1;
    
    min-width: 0;
    border-radius: var(--fh-border-radius) 0 0 var(--fh-border-radius);
    padding: 10px 12px 10px 18px;
    
    background-color: var(--fh-identity-color);
    transition: right .3s cubic-bezier(0, 0, 0.18, 0.92);

    &.md-dialog--active {
        right: 0px; 
    }

    .md-dialog__inner {
        font-size: 18px;
        color: var(--fh-color-text);
        line-height: normal;
    }
}

/* EXAMPLES DIRECTLY COMING FROM OLD HELP */
/* Module Example Table */
#module-table-node1 {
    background-color: #ffffff;
    height: 550px;
    padding: 0px;
}

#module-table-node2 {
    background-color: #A0A0A0;
    height: 510px;
    padding: 10px;
}

#module-table-node3 {
    background-color: #A0A0A0;
    height: 216px;
    padding: 10px;
    margin-bottom: 10px;
    border: dashed 1px #FFF;
}

#module-table-node4 {
    float: left;
    width: 49%;
    background-color: #A0A0A0;
    height: 244px;
    border: dashed 1px #FFF;
}

#module-table-node5 {
    float: right;
    width: 49%;
    background-color: #A0A0A0;
    height: 244px;
    border: dashed 1px #FFF;
}

#module-table-node6 {
    background-color: #000000;
    color: #fff;
    height: 32px;
}

#module-table-node7 {
    background-color: #FFFFFF;
    height: 166px;
    border: solid 1px #000;
}

#module-table-node8 {
    background-color: #E0E0E0;
    height: 40px;
    padding: 4px;
}

#module-table-node9 {
    background-color: #d0dada;
    height: 32px;
    width: 180px;
    float: right;
}

/* SparkLine Examples */
.md-typeset {
    .sparkline-large {
        height: 100px;
    }

    .sparkline-medium {
        height: 50px;
    }

    .sparkline-small {
        height: 20px;
    }
}

/* Skeleton */
.skeletonElementContainer {
    position: relative;
    overflow: hidden;
    background-color: #f6f6f6;
    border-radius: 5px;
    height: 28px;
}

.skeletonElement {
    display: block;
    position: absolute;
    background: linear-gradient(90deg, transparent, #dfdfdf, transparent);
    width: 110%;
    height: 100%;
    animation: skeletonEffect 1.2s infinite linear;
    filter: blur(8px);
}

@keyframes skeletonEffect {
    0% {
        transform: translateX(-150%);
    }

    100% {
        transform: translateX(150%);
    }
}