@import url("./social/network/channel-list-item.css");
@import url("./social/network/group-item.css");

app-ui {
    display: block;
    padding: 10px;
    margin: auto;
    max-width: 1500px; /* specific setting for feed with sidebars - general setting: 900px */
}


h1 {
    display: none;
}
profile-progress {
    .wrap {
        display: flex;
        align-items: center;
        justify-content: flex-start;

        &:not(:last-child) {
            margin-bottom: var(--gutter-small);
        }
        h5,
        p {
            margin: 0;
        }
    }

    .progress {
        width: 50px;
        height: 50px;
        border-radius: 100%;
        background: var(--color-primary-100);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;
        font-weight: 600;
        font-size: 14px;
        border: 4px solid var(--color-accent-400);
    }

    .progress-wrap {
        min-width: 240px;
        width: 100%;
        background: var(--color-primary-100);
        border-radius: 100px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 10px 0 10px 20px;
        height: 60px;
        margin-bottom: 0;

        b {
            margin: 0 10px 0 0;
        }

        progress-indicator,
        .progress {
            margin-left: auto;
            height: 60px;
            width: 60px;
            margin-right: 0;
        }
        .progress {
            background: var(--color-primary-200);
        }
    }
    a.progress-wrap {
        font-style: normal;
        text-decoration: none;
        color: var(--color-text-000);

        &:hover {
            filter: brightness(90%);
            will-change: filter;
            transition: all 0.2s ease;
        }
    }

    button {
        margin-top: var(--gutter-small);
    }
}

ui-widget.news {
    ul {
        margin-top: 0.5rem;
        list-style: circle;
        margin-left: 1rem;

        li {
            small {
                display: block;
            }
        }
    }
}

main {
    lit-virtualizer {
        display: grid;
    }

    video {
        max-height: 90vh;
        margin: auto;
        margin-bottom: 1rem;
    }

    article {
        width: 100%;
        border-radius: var(--gutter-small);
        background-color: var(--color-white);
        margin-bottom: 0.5rem;
        position: relative;

        &.option {
            padding: 1rem;
            blockquote {
                margin: 1rem;
                border: none;
                font-style: italic;
                font-size: x-large;
                color: var(--color-darkgray);
                text-align: center;
                font-weight: 200;
                opacity: 0.7;
                nav {
                    text-align: right;
                    color: unset;
                    font-size: unset;
                    color: unset;
                }
            }
        }

        [data-item-type] > .card {
            margin-bottom: 0;
        }

        &:has(.carousel) {
            background-color: transparent;
        }

        &.preview::after {
            position: absolute;
            top: 5px;
            right: 5px;
            content: "preview content";
            border: 2px solid var(--color-red);
            background-color: inherit;
            filter: brightness(105%);
            border-radius: 20px;
            color: var(--color-red);
            font-size: small;
            padding: 0.2rem 0.4rem;
        }
    }

    
}

[data-viewport="menubar"],[data-viewport="mobile"]{
    feed-list {
        article:first-child {
            margin-top: 40px;
        }
    }
}

/* @media screen and (max-width: 900px) {
    body {
        scroll-snap-type: y mandatory;

        main {
            display: block;
        }

        article {
            scroll-snap-align: start;
            scroll-behavior: smooth;
        }
    }
} */

/* aside{
    background-color: var(--color-panel);
    --label-color: white;
} */

@media screen and (min-width: 901px) and (max-width: 1239px) {
    main {
        display: grid;
        grid-template-columns: 300px 1fr;
        grid-template-areas: "left feed";
        grid-gap: 1rem;
        position: relative;
    }

    aside.right {
        grid-area: left;
        position: relative;
    }

    aside.left {
        max-width: 300px;
        overflow: hidden;
        position: absolute;
        top: var(--ic-height, 1230px);
        left: 0;
        width: 100%;
        margin-top: 1rem;
    }

    lit-virtualizer {
        grid-area: feed;

        article {
            min-width: 500px;
            max-width: 800px;
        }
    }
}

@media only screen and (min-width: 1240px) {
    main {
        display: grid;
        grid-template-columns: 300px 1fr 300px;
        grid-template-areas: "left feed right";
        grid-gap: 1rem;
    }

    aside.left {
        grid-area: left;
    }

    aside.right {
        grid-area: right;
    }

    lit-virtualizer {
        grid-area: feed;

        article {
            max-width: 800px;
        }
    }
}

aside.right .contacts {
    --label-color: var(--color-red);
    --label-text-color: white;
}

article.recipes {
    --widget-body-background: transparent;
    --label-color: var(--color-orange);
    --label-text-color: black;
}

[data-scroll="down"]:not([data-viewport="mobile"]) {
    aside.right .contacts {
        top: 10px;
        position: sticky !important;
        box-shadow: 0 0 15px rgba(127, 127, 127, 0.4);
        z-index: 2;
    }
}

image-carousel {
    max-height: 200px;
}

post-entry figure.article-image img {
    margin: unset;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.network-details {
    margin-bottom: 0.5rem;
    div > small {
        display: block;
        opacity: 0.7;
    }
}

[data-event-type] {
    margin-bottom: 0.5rem;

    .event {
        gap: 0;

        small {
            opacity: 0.7;
        }
    }
}

[data-event-type="videocall"] {
    color: var(--color-accent-200);
}

@keyframes articlehighlight {
    from {
        outline: 2px solid red;
    }
    to {
        outline: 2px solid transparent;
    }
}

article {
    &:hover {
        box-shadow: 0 0 15px rgba(127, 127, 127, 0.4);
    }

    &.in-view:first {
        animation: articlehighlight 2s linear;
        animation-delay: 1s;
    }

    &.reel {
        background-color: transparent;
        padding: 0;
    }
}

page-ui[viewport="mobile"] {
    display: block;
}

#main-tabs {
    display: block;
    position: fixed;
    z-index: 2;
    top: 0;
    right: 0;
    left: 0;
    border-radius: 0 0 0.5rem 0.5rem;

    ~ * {
        margin-top: 35px;
    }
}

[data-scroll="down"] {
    #main-tabs {
        box-shadow: 0 0 10px rgba(127, 127, 127, 0.7);
    }
}

[data-viewport="menubar"] {
    #main-tabs {
        left: 70px;
    }

    &[data-menu-appearance="full"] {
        #main-tabs {
            left: 260px;
        }
    }
}

page-ui[viewport="mobile"] {
    article.reel {
        video {
            max-height: unset;
            width: 100%;
        }
    }
}

/* tabstrip shown*/
main:has(#main-tabs) {
    lit-virtualizer {
        article {
            scroll-margin-top: 50px;
        }
    }
}

/* Program Events Widget Styles */
.program-events-preview {
    .meal-section {
        margin-bottom: var(--gutter-small);

        &:last-child {
            margin-bottom: 0;
        }
    }

    .meal-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--color-primary-400);
        margin: 0 0 var(--gutter-tiny) 0;
        text-transform: uppercase;

        .date-label {
            font-weight: 400;
            text-transform: none;
            color: var(--color-primary-300);
        }
    }

    .events-list {
        display: flex;
        flex-direction: column;
        gap: var(--gutter-tiny);
    }

    .event-preview {
        display: flex;
        align-items: center;
        gap: var(--gutter-tiny);
        padding: var(--gutter-tiny) var(--gutter-small);
        background: var(--color-surface-400);
        border-radius: var(--radius-small);
        border-left: 3px solid;
        font-size: 14px;

        .event-name {
            flex: 1;
            font-weight: 500;
        }

        .duration {
            color: var(--color-primary-400);
            font-size: 12px;
        }
    }

    .more-events {
        text-align: center;
        padding: var(--gutter-tiny);
        color: var(--color-primary-400);
        font-style: italic;
    }

    .view-more-section {
        margin-top: var(--gutter-small);
        padding-top: var(--gutter-small);
        border-top: 1px solid var(--color-surface-300);
    }
}

[data-viewport="menubar"],[data-viewport="mobile"]{
    feed-list {
        article:first-child {
            margin-top: 40px;
        }
    }
}
