* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Doto", sans-serif;
}

:root {
    --green: rgb(0, 160, 0);
    --darkGreen: rgb(0, 105, 0);
    --container-radius: 2rem;
    --box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

a{
    text-decoration: none;
}

button {
    background-color: transparent;
}

/* ------ styles bg of header and footer  */
.fluid-container {
    /* background-color: var(--green); */
    background-image: radial-gradient(var(--green), var(--darkGreen));
    color: white;
    border-radius: 100%;
}

header, footer {
    pointer-events: none;
}

/* Enable clicks on actual interactive elements inside header/footer */
header * , footer * {
    pointer-events: auto;
}


/* -----------------------------------header-- */

header {
    position: absolute;
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: 2;
}

.header-content {
    transform: translateY(-55%);
}

#title {
    font-weight: 750;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 128px 82px 50px 82px;
    color: white;
    text-align: center;
}

/* -----------------------------------header-- */

main {
    position: relative;
    z-index: 1;
    font-weight: 700;
}

/* -------------graph container--------------- */

.graph-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
}


.input-container,
.output-container {
    padding: 1rem;
    color: var(--darkGreen);
}

.input-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100vh;
    width: 30vw;
}

.output-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    height: 100vh;
    width: 70vw;
}

label {
    cursor: pointer;
}

button {
    cursor: pointer;
}

input[type="radio"]:checked {
    accent-color: var(--darkGreen);
}

.error {
    border: 2px solid red;
    border-radius: 1rem;
}

.input-container h2, .output-container h2 {
    padding: 1rem 3rem;
    background-color: var(--green);
    color: white;
    border-top-left-radius: 3rem;
    border-top-right-radius: 3rem;
    box-shadow: var(--box-shadow);
}

.graph-input-outer-container, .graph-output-outer-container {
    display: flex;
    flex-direction: column;
    /* border: 2px solid var(--green); */
    width: 100%;
    flex: 1;
    padding: 1rem;
    border-bottom-left-radius: var(--container-radius);
    border-bottom-right-radius: var(--container-radius);
    box-shadow: var(--box-shadow);
}

.graph-input-outer-container {
    border-top-right-radius: var(--container-radius);
}

.graph-output-outer-container {
    align-items: flex-end;
    border-top-left-radius: var(--container-radius);
}

.graph-input-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.graph-input-form-btn {
    background-color: var(--green);
    box-shadow: var(--box-shadow);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    font-weight: 800;
    outline: none;
    border: none;
    border-radius: 1rem;
    transition: background-color 0.5s ease;
}

.graph-input-form-btn:hover {
    background-color: var(--darkGreen);
}

.graph-input-form-btn:focus {
    outline: 2px solid black;
}

.graph-input-wrapper {
    width: 60%;
    border-radius: 1.25rem;
    overflow: hidden;
    padding-right: 0.1rem;
}

#graph-input {
    width: 100%;
    height: 100%;

    
    background-color: var(--green);
    box-shadow: var(--box-shadow);
    color: white;

    font-size: 1rem;
    font-weight: 650;
    padding: 1rem;

    border: none;
    resize: none;
    overflow-y: auto;

    border-radius: 1.25rem;
}

#graph-input::placeholder {
    color: white;
}

#graph-input::-webkit-scrollbar {
    width: 0.5rem;
}

#graph-input::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 1rem;
}

#graph-input::-webkit-scrollbar-thumb {
    background: rgb(240, 240, 240);
    border-radius: 1rem;
}

#graph-input::-webkit-scrollbar-thumb:hover {
    cursor: pointer;
}

#graph-input::-webkit-scrollbar-button {
    background: transparent;
}

.graph-display-area {
    height: 90%;
    width: 100%;
    background-color: #b8ffb83b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    padding: 1rem;
}

.no-graph {
    font-size: 2rem;
    letter-spacing: 2px;
    text-align: center;
}

.download-btn {
    border: none;
    color: var(--darkGreen);
    font-size: 1.5rem;
    padding: 4px 8px;
    border-radius: 8px;
}

.download-btn:disabled {
    background-color: darkgrey;
    padding: 4px;
    opacity: 0.5;
    cursor: not-allowed;
}

/* -------------graph container--------------- */

/* -------------error div ---------- */

#error.active {
    background-color: #ffa7a7a6;
    border-radius: 1rem;
    padding: 1rem;
    color: #930000;
    margin-top: 1rem;
}

#error.active ul {
    padding-left: 1rem;
}

#error.active ul li a {
    color: red;
}

#error.active ul li a:hover {
    text-decoration: underline;
}

/* -------------error div ---------- */


/* -------------graph canvas--------------- */

.weight-label {
    cursor: pointer;
}

.edge.highlight {
    stroke: red;
    stroke-width: 3px;
}

/* -------------graph canvas--------------- */

/* -----------------------------------footer-- */

footer {
    position: fixed;
    bottom: 0;
    width: 100vw;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.footer-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 3rem;
    padding: 50px 92px 128px 92px;
    transform: translateY(55%);
}

.footer-content i {
    font-size: 1.75rem;
}

.source-code a {
    text-decoration: none;
    color: white;
}

.footer-form-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#footer-form-open-button {
    border: none;
    background-color: transparent;
    color: inherit;
    cursor: pointer;
}

.footer-form {
    background-color: var(--green);
    color: white;
    padding: 1rem;
    /* height: 60vh; */
    width: 70vw;
    border-radius: 16px;
    font-weight: 700
}

.footer-form-header {
    display: flex;
    justify-content: space-between;
}

.footer-form-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 10px 0px 0px;
}

#footer-form-divider {
    background-color: rgb(200, 200, 200, 0.5);
    height: 2px;
    width: 50%;
    margin-top: 1rem;
    border-radius: 1rem;
}

.footer-form-header-content {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.footer-form-item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.footer-form-item label {
    font-size: 1.2rem;
    padding-bottom: 0.5rem;
}

#footer-form-title, #footer-form-description {
    padding: 8px;
    border-radius: 12px;
    border: 1px solid white;
    background-color: transparent;
    outline: none;
    caret-color: white;
    color: white;
    font-size: 1rem;
    font-weight: 700;
}

#footer-form-title::placeholder, #footer-form-description::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.footer-form button {
    color: white;
    border: none;
}

.footer-form-close {
    font-size: 1.25rem;
    padding: 0.25rem 1.25rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.footer-form-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.footer-form-submit {
    padding: 1rem;
    width: 50%;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
    transition: background-color 0.5s ease-in-out;
}

.footer-form-submit:hover {
    /* background-color: rgba(255, 255, 255, 0.3); */
    background: linear-gradient(to top, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

/* -----------------------------------footer-- */



/* mobile styles */
@media (max-width: 1024px) {
    .graph-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 8rem;
        height: max-content;
    }
    .input-container, .output-container {
        width: 100%;
    }
    .output-container {
        margin-bottom: 6rem;
    }
    .graph-form-btn-container {
        display: flex;
        justify-content: flex-start;
        gap: 1rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 500px) {
    #title {
        padding-top: 140px;
        padding-bottom: 30px;
    }
    .graph-input-wrapper {
        width: 100%;
    }
    .graph-form-btn-container {
        justify-content: center;
    }
    .node-label, .weight-label {
        font-size: 1rem;
    }
}