﻿* {
    box-sizing: border-box;
    position: relative;
    /*overflow: auto;*/
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
blog-page
{
    h2,h3,h4 
    {
        font-family: Montserrat, sans-serif;
        outline-color: unset;
        text-shadow: none;
        color: #000;
        font-weight: 400;
        text-transform: uppercase;
        margin-top: 0;
    }
}

image-picker{
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
    image-picker, link-picker {
        display: grid;
        gap: 1rem;
        padding: 1rem;
        background: #f5f5f5;
        border-radius: 8px;
    }

    link-picker {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }

image-picker > article, link-picker > article {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    cursor: pointer;
}

image-picker > article:hover, link-picker > article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

image-picker > article > img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

link-picker > article > span {
    font-family: monospace;
    color: rgba(255, 0, 0, 0.5);
    background-color: #f8f8f8;
    display: inline-block;
    margin-right: auto;
    padding: 1px 3px;
    font-size: 0.8em;
    border: solid 1px #e8e8e8;
    border-radius: 3px;
    margin: 0.5em auto 0 0;
}

image-picker > article > span:nth-child(2) {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
    line-height: 1em;
}

image-picker > article > span:nth-child(3) {
    font-size: 0.8rem;
    color: #aaa;
    display: flex;
    line-height: 1em;
    margin: 1em 0 0 0;
    font-family: monospace;

    > :nth-child(2) {
        margin-left: auto;
    }
}

image-picker > article > span:nth-child(4) {
    font-size: 0.5em;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.2em 0.3em 0 0.3em;
    display: inline-block;
    border-radius: 4px;
    line-height: 1em;
    height: 1.3em;
    overflow: hidden;
    color: #888;
    position: absolute;
    right: 0.4rem;
    top: 0.4rem;
    margin: 0;
    line-height: 1em;

    &[image-type="png"] {
        background-color: #f00;
    }

    &[image-type="svg"] {
        background-color: #007cff;
    }

    &[image-type="jpg"], &[image-type="jpeg"] {
        background-color: #d6ff00;
        color: #000;
    }

    &[image-type="gif"] {
        background-color: #000;
    }

    &[image-type="bmp"] {
        background-color: #000;
    }

    &[image-type="webp"] {
        background-color: #40ff35;
        color: #000;
    }
}

a {
    cursor: pointer;
}
/* Animations styles */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;

    &.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-left {
    transform: translateX(-40px);
}

.fade-in-right {
    transform: translateX( 40px);
}

.fade-in-up {
    transform: translateY( 40px);
}

.fade-in-down {
    transform: translateY(-40px);
}

    .fade-in-left.visible,
    .fade-in-right.visible,
    .fade-in-up.visible,
    .fade-in-down.visible {
        transform: translate(0,0);
    }

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translate(var(--from-x, 0), var(--from-y, 30px));
    }

    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}
/* 2. Base: any element with data-animate */
[data-animate] {
    opacity: 0;
    --from-x: 0;
    --from-y: 30px; /* default: slide up */
    --duration: 0.6s;
    --delay: 1s;
    animation: fade-in var(--duration) ease-out forwards;
    animation-delay: var(--delay);
    animation-play-state: paused;
}
    /* 3. Trigger */
    [data-animate].visible {
        animation-play-state: running;
    }
/* 4. Direction variants — using attribute *contains* */
[data-animate*="|left"] {
    --from-x: -40px;
    --from-y: 0;
}

[data-animate*="|right"] {
    --from-x: 40px;
    --from-y: 0;
}

[data-animate*="|up"] {
    --from-x: 0;
    --from-y: 40px;
}

[data-animate*="|down"] {
    --from-x: 0;
    --from-y: -40px;
}

[data-animate*="|left|big"] {
    --from-x: -360px;
    --from-y: 0;
}

[data-animate*="|right|big"] {
    --from-x: 360px;
    --from-y: 0;
}

[data-animate*="|up|big"] {
    --from-x: 0;
    --from-y: 360px;
}

[data-animate*="|down|big"] {
    --from-x: 0;
    --from-y: -360px;
}
/* 5. Delay via number after | */
[data-animate*="|.1"] {
    --delay: 0.1s;
}

[data-animate*="|.2"] {
    --delay: 0.2s;
}

[data-animate*="|.3"] {
    --delay: 0.3s;
}

[data-animate*="|.4"] {
    --delay: 0.4s;
}

[data-animate*="|.5"] {
    --delay: 0.5s;
}

[data-animate*="|.6"] {
    --delay: 0.6s;
}
/* Optional: default direction if none specified */
[data-animate]:not([data-animate*="|"]) {
    --from-y: 30px; /* default up */
}

[data-animate="pop"] {
    animation-name: none;
    opacity: 1;

    & > * {
        scale: 0;
        opacity: 0;
        animation: pop-in 0.6s ease-out forwards;
        animation-delay: calc(var(--delay, 0) * 0.15s);
        animation-play-state: paused;

        &:nth-child(1) {
            --delay: 1;
        }

        &:nth-child(2) {
            --delay: 2;
        }

        &:nth-child(3) {
            --delay: 3;
        }

        &:nth-child(4) {
            --delay: 4;
        }

        &:nth-child(5) {
            --delay: 5;
        }

        &:nth-child(6) {
            --delay: 6;
        }

        &:nth-child(7) {
            --delay: 7;
        }

        &:nth-child(8) {
            --delay: 8;
        }

        &:nth-child(9) {
            --delay: 9;
        }
    }

    &[data-animate].visible {
        animation-play-state: paused;

        > * {
            animation-play-state: running;
        }
    }
}

@keyframes pop-in {
    from {
        scale: 0;
        opacity: 0;
    }

    to {
        scale: 1;
        opacity: 1;
    }
}