/* Title: Transparent Team Global Stylesheet
   Description: Global CSS styles for Transparent Team website
   Date: 2025-10-15 */

/* Variables */

:root {
    --primary-color: cornflowerblue;
    --secondary-color: white;
    --hover-color: darkblue;
    --font-family: Arial, sans-serif;
    --nav-text-color: white;
    --border-size: 2px;
    --border-radius: 2rem;
    --border-color: cornflowerblue;
}

a, a:visited {
    color: var(--primary-color);
}

a:hover, a:active {
    color: var(--hover-color);
    transition: color 0.3s ease, color 0.3s ease;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;

    background-image: radial-gradient( farthest-corner at 40px 40px, rgb(10, 16, 26) 5%, #000000 90% );
    color: var(--secondary-color);
    font-family: Verdana, Geneva, Tahoma, sans-serif;

    display: grid;
    grid-template-areas: 
        "navigation"
        "body";
    grid-template-rows: auto 1fr;
}

/* Header styles */
.topbar {
    grid-area: navigation;
    background: var(--primary-color);
}

.header {
    display: flex;
    width: 100%;
    padding: 10px 0px;
    margin: 0;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-conic-gradient(#d0d0d0 0 25%, #ffffff 0 50%) 
    50% / 20px 20px; /* Gray checkerboard pattern from https://css-tricks.com/background-patterns-simplified-by-conic-gradients/#checkerboard */
    mask-image: linear-gradient(
        to right, /* gradient direction */
        rgba(0,0,0,0) 3%, /* transparent left */
        rgba(0,0,0,1) 35%, /* visible in the middle start */
        rgba(0,0,0,1) 65%, /* visible in the middle end */ 
        rgba(0,0,0,0) 97% /* transparent right */ 
    );
}

.header img {
    margin-right: 10px;
    height: 36px;
    filter: drop-shadow(2px 2px 5px var(--primary-color));
}

.header h1 {
    padding: 0px;
    margin: 0px;
    color: black;
    text-shadow:
        0px 0px 16px var(--primary-color),
        0 0 8rem var(--primary-color),
        0 0 1.6rem var(--primary-color);
}

/* Navigation bar styles - sticky nav */

.nav-links {
    position: sticky;
    top: 0;
    padding: 0;
    background: var(--primary-color);
}

.nav-links ul {
    overflow: hidden;
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links ul li a {
    display: block;
    color: var(--nav-text-color);
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

.nav-links ul li a.current {
    font-weight: bold;
}

.nav-links ul li:last-child {
    border-right: none;
}

.nav-links a {
    color: var(--nav-text-color);
}

.nav-links ul li a:hover {
    background-color: var(--hover-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}   

/* Navbar responsive design for smaller screens */
.nav-menu {
    display: none;
}


@media screen and (max-width: 600px) {
    .nav-links ul {
        flex-direction: column;
        display: none;
    }
    .nav-links ul.show {
        display: block;
        background: black;
    }
    .nav-links ul li {
        border-right: none;
        border-bottom: 1px solid white;
        padding: 10px 0;
        max-width: 60%
    }
    .nav-links ul li:last-child {
        border-bottom: none;
    }
    .nav-menu {
        display: block;
        padding: 10px;
        text-align: center;
    }
}

.content {
    grid-area: body;
    justify-self: center;

    width: 100%;

    display: grid;
    grid-template-areas: 
        "info content options"
        ". content .";
    grid-template-columns: 27.5fr 45fr 27.5fr;
    grid-template-rows: auto 1fr;
}

.info_container {
    grid-area: info;

    border: calc(var(--border-size)/2) solid var(--border-color);
    border-top: none;
    border-bottom: var(--border-size) solid var(--border-color);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);

    padding: 1.5rem;
    margin-right: 2rem;
    margin-left: 2rem;
    height: fit-content;
    justify-self: end;
    background-color: rgba(0, 0, 0, 0.5);

    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .info_container:not(:has(*)) {
        display: none;
    }

    .profile_header {
        display: grid;
        grid-template-areas:
            "image name"
            "image github"
            "image extra";
        gap: 0.5rem 1rem;
        align-items: center;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .profile_header:only-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .profile_image {
        grid-area: image;
        width: 4rem;
        height: 4rem;
        border-radius: var(--border-radius);
        object-fit: cover;
        vertical-align: middle;
    }

    .profile_name, .info_title, .like-count {
        grid-area: name;
        font-size: 150%;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .profile_github, .info_subtitle, .like-button {
        grid-area: github;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
    }

    .profile_extra {
        grid-area: extra;
        justify-self: start;
        margin-top: 0.5rem;
    }

    .profile_extra button {
        width: 100%;
    }

    .info_image {
        grid-area: image;

        width: 4rem;

        filter: brightness(0) invert(1);
    }

    .follow-requests-box fieldset, .friends-box fieldset {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
        background-color: rgba(0, 0, 0, 0.3);
    }

    .follow-requests-box legend, .friends-box legend {
        padding: 0 0.5rem;
        font-weight: bold;
        color: var(--primary-color);
    }

    .follow-requests-box ul, .friends-box ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }

    .follow-requests-box li, .friends-box li {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        border-radius: 4px;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .follow-requests-box .profile_image, .friends-box .profile_image {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: var(--border-radius);
        margin: 0;
        flex-shrink: 0;
    }

    .follow-requests-box .profile_name, .friends-box .profile_name {
        flex-grow: 1;
        font-size: 1rem;
        margin: 0;
        overflow: hidden;
    }

    .follow-requests-box form {
        display: flex;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .follow-requests-box button {
        padding: 0.25rem 0.5rem;
        min-width: 2rem;
    }

    .no-requests, .no-friends, .no-followers, .no-followings {
        text-align: center;
        padding: 1rem;
    }

.options_container {
    grid-area: options;

    border: calc(var(--border-size)/2) solid var(--border-color);
    border-top: none;
    border-bottom: var(--border-size) solid var(--border-color);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);

    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    margin-left: 2rem;
    margin-right: 2rem;
    font-size: 150%;
    width: fit-content;
    height: fit-content;
    background-color: rgba(0, 0, 0, 0.5);

    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
}

    .options_container:not(:has(*)) {
        display: none;
    }

    .options_container a {
        text-decoration: none;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }

    .options_container a:hover, .options_container a:active {
        background-color: var(--hover-color);
        color:inherit;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .options_container .active {
        font-weight: bold;
        color: var(--secondary-color);
        text-shadow:
            1px 1px 2px var(--primary-color),
            0 0 1rem var(--primary-color),
            0 0 0.2rem var(--primary-color);
    }

    .suboption {
        font-style: italic;
        font-size: 66%;
    }

.content_container {
    grid-area: content;

    border: calc(var(--border-size)/2) solid var(--border-color);
    border-top: none;
    border-bottom: none;
    background-color: rgba(0, 0, 0, 0.5);

    padding: 1.5rem;
    padding-top: 0;
}

    .entries_header {
        border-bottom: calc(var(--border-size)/2) solid var(--border-color);
    }

    .entry {
        border-bottom: calc(var(--border-size)/2) solid var(--border-color);
    }

    .entry_description {
        white-space: pre-wrap;
    }

    .entry-content {
        white-space: pre-wrap;
    }

    .entry:after {
        content: '';
        display: block;
        clear: both;
    }

    .entry_footer {
        float: right;
    }

#image_preview {
    max-width: 100%;
    max-height: 500px;
    margin: auto;
    margin-top: 10px;
    object-fit: contain;
    display: block;
}

.form-group{
    display: flex;
    flex-direction: column;
    margin-left: 10vw;
    margin-right: 10vw;
    gap: 10px;
}

input {
    border-radius: 4px;
    padding: 4px;
    border: 1px solid var(--primary-color);
}

input[type='submit'] {
    transition: background-color 0.3s ease, color 0.3s ease;

}

button {
    border-radius: 4px;
    padding: 5px;
    border: 1px solid var(--primary-color);
    cursor: pointer;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

button:hover, input[type='submit']:hover {
    background-color: var(--hover-color);
    color: white;
}

textarea {
    border-radius: 4px;
    padding: 4px;
    border: 1px solid var(--primary-color);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.comment-like-count {
    font-size: 1rem;
    float: left;
    margin-bottom: 1rem;

}

.comment-like-button {
    font-size: 0.9rem;
    margin-left: 1rem;
    float: right;
}

.comment-divider {
    float: none;
    width: 100%;
}

.author_list_li {
    min-height: 4rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.author_list_link {
    display: list-item;
}

small {
    font-size: 0.5em;
}