/* Section Breadcrumbs */
.breadcrumb {
    margin: 0.5rem;
    color: var(--font-color);

    & a:hover {
        color: #f3d377;
    }
}

/* Section Search Bar */
.search-bar {
    width: 100%;
    display: flex;
    flex-direction: row;
    padding: 0.5rem 1rem;
    background-color: #1d202a;
    border-radius: var(--border-radius-md);
    box-shadow: rgba(0, 0, 0, 0.1) 0 8px 12px, rgba(0, 0, 0, 0.15) 0 4px 6px;
}

.search-bar .search-bar-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;

    & label {
        margin: 0 0.5rem;
    }

    & #search-button, #clear-button, input {
        padding: 0.25rem 1rem;
        margin-right: 0.5rem;
        background-color: var(--color-opacity-light-1);
        color: var(--font-color);
        border: 1px solid #6c757d;
        font-size: inherit;
    }

    & input:focus {
        outline: none !important;
    }

    & #search-button, #clear-button {
        &:hover {
            background-color: #2b303d;
            color: #f3d377;
        }
    }

    & p {
        color: var(--font-color);
    }
}

.search-bar .search-bar-right {
    margin: 0 0 0 auto;
    color: var(--font-color);
}

/* Section Projects */
.projects-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    margin: 2rem auto;
    gap: 1rem;
    justify-items: center;

    & .content-card {
        max-width: 500px;
    }
}

.project-preview-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0.5rem 0 0.5rem;
    height: 100%;
}

.project-preview-body {
    & .preview-repo-tags {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 0 1rem 0.5rem 1rem;
    }
    & .tag {
        color: lightgray;
        padding: 0 0.5rem;
        border-radius: var(--border-radius-sm);
        margin: 0;
    }
    & .tag:hover {
        cursor: help;
    }
    & .tag-public {
        background-color: #42496e;
    }

    & .tag-forked {
        background-color: #385b76;
    }

    & .tag-stars i {
        color: darkgoldenrod;
    }

    & .tag-forks i {
        color: #53836a;
    }

    & .tag-language i {
        color: #627c7f;
    }

    & .tag-archived {
        background-color: darkred;
    }
}

.project-preview-body .preview-repo-summary {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-bottom: 1px solid var(--color-opacity-light-1);
    border-top: 1px solid var(--color-opacity-light-1);
    margin-bottom: 0.5rem;
    padding: 0.5rem;

    & h5 {
        font-size: 1.2rem;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        text-align: center;
        padding: 0;
        margin: 1rem 0 0 0;
    }
    & .repo-description {
        opacity: 0.5;
        margin: 0 1rem;
        font-size: 0.9rem;
        text-align: center;
        max-height: 150px;
        overflow: auto;
    }

    & .muted {
        color: var(--font-color);
        opacity: 0.5;
        font-size: 0.9rem;
        margin: 0 0 1rem 0;
        text-align: center;
    }
}

.project-preview-body .preview-repo-summary .categories-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;

    & .category-badge {
        color: goldenrod;
        padding: 0 0.35rem;
        opacity: 0.8;
        font-size: 0.8rem;
        text-align: center;
        background-color: var(--color-opacity-light-1);
        border-radius: var(--border-radius-lg);
        margin: 0;
    }
}

.project-preview-body .repo-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;

    & a {
        text-decoration: none;
        font-weight: bold;
        border: 1px solid var(--color-purple);
        color: var(--font-color);
        padding: 0.5rem 1rem;
        border-radius: var(--border-radius-sm);
        transition: all 0.3s ease-in-out;
    }

    & a:hover {
        background-color: var(--color-purple);
        color: #fff;
    }

    & .btn.disabled {
        opacity: 0.5;
        cursor: not-allowed !important;
        filter: grayscale(100%);
        pointer-events: unset;
    }
}


.project-preview-body .preview-repo-license {
    display: flex;
    flex-direction: row;
    justify-content: space-around;

    & p {
        display: inline-block;
        margin: 0.5rem 1rem;
    }
}

.project-preview-body .preview-repo-dates {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-top: 1px solid var(--color-opacity-light-1);
    padding: 0.5rem 0.5rem 0 0.5rem;

    & p {
        color: var(--font-color);
        opacity: 0.5;
        font-size: 0.8rem;
    }
}


/* Modal */
.projects-container {
    & .modal {
        overflow: scroll;
    }

    & button {
        background-color: lightgray !important;
    }

    & button:hover {
        opacity: 0.75;
    }

    & .modal-content {
        backdrop-filter: blur(3px);
        background-color: rgba(125, 125, 125, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
        color: lightgray;
        width: 80vw;
        height: 100%;
        margin: auto;
    }

    & .modal-header {
        height: 30px;
        padding: 2rem;
    }

    & .modal-title {
        font-size: 16px;
    }

    & .modal-body {
        padding: 5px 35px 20px;

        & h3 {
            text-align: center;
        }

        & p {
            padding-top: 10px;
            font-size: 1.1em;
        }

        &::-webkit-scrollbar {
            width: 6px;
        }

        &::-webkit-scrollbar-thumb {
            background-color: var(--color-purple);
            border-radius: 3px;
        }

        &::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
        }
    }
}

