@import url('https://fonts.googleapis.com/css2?family=Sniglet&display=swap');

:root {
    --transparent-text: rgb(32, 32, 32);
    --bg: rgb(161, 161, 189);
    --chill-black: rgb(18 18 39);
    --delete-red: rgb(193 110 110);
    --card-transparency: rgba(161, 161, 189, 0.35);
    font-size: 20px;
}

.card_name {
    animation: shrink-name linear both;
    animation-timeline: scroll(nearest);
    animation-range: 0 80px;
}
@keyframes shrink-name {
    to { font-size: 20px; }
}

/*
    focus none for all elements
*/

/* base styles */
@layer base {

    *, *::before, *::after {
        box-sizing: border-box;
    }

    * {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    }

    button, a {
        outline: none;
        border: none;
        border-radius: 2px;
        color: inherit;
        text-align: center;
        padding: 0;
    }

    button:hover {
        background-color: var(--card-transparency);
        
    }

    button, input, select, textarea, dialog {
        background-color: transparent;
        font: inherit;
    }

    h1, h2, h3, h4, h5, h6 {
        font-weight: inherit;
    }

    .dropdown .content {
        padding: 6px 8px;
    }

    .dropdown .content * {
        display: block;
        width: 100%;
        padding: 3px 6px;
        border-radius: 2px;
    }

    .dropdown .content *:hover {
        background-color: color-mix(in srgb, var(--bg), black 5%);
    }
}



.bg-themed {
    background-color: var(--card-transparency);
}


/* DROPDOWN LOGIC */
.dropdown {
    position: relative;
}

.dropdown.open .content {
    display: block;
}

.dropdown .content {
    display: none;
    position: absolute;
    top: 100%;
    right:0;
    border-radius: 4px;
    width: max-content;
    white-space: nowrap;
    /* override transparency intensity */
    background-color: var(--bg);
}


.dropdown * {
    user-select: none;
    font-size: .8rem;
}


.minus_ninety_rot{
    rotate: -90deg;
}

html {
    overflow: clip;
}

/*
html *{
    border: 2px green solid;
}
*/


/*.singular_card, 
.card_nav {
    backdrop-filter: blur(3px);
    background-color: var(--card-transparency);
}
*/

body {
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100% 100%;
    font-family: "Sniglet", system-ui;
    font-weight: 400;
    font-style: normal;
}

.delete_button {
    border: none;
    color: rgba(121, 66, 66, 0.8);
}

.delete_button:hover {
    background-color: var(--delete-red);
}

.disclaimer {
    background-color: rgba(121, 66, 66, 0.8);
    border-radius: 4px;
}

button {
    outline: none;
}


h2 {
    margin-left:10px;
}

h3  {
    margin-left:25px;
}

h4 {
    margin-left: 30px;
}

ul li{
    margin-left: 40px;
    list-style-type: square;
}

.card_in_nav:hover {
    cursor: pointer;
}

.unsorted_cards {
    height: auto;
    min-height: 100px;
}

.unsorted_cards:last-child {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card_in_nav {
    margin-left: 25px;
    padding: 5px;

    font-size: 0.9rem;
    border: solid 1px rgba(20,20,20,12%);
    border-radius: 12px;
}

.folder_details {
    display: flex;
    flex-direction: column;
}

.folder_details .folder_details {
    margin-left: 1rem;
}

.folder_root {
    padding-bottom: 1rem;
}

.space_between_card {
    width: 100%;
    height: 5px;
    flex-shrink: 0;
}

details .space_between_card:last-child {
    padding-bottom: 10px;
}

.folder {
    font-size: 1rem;
    margin-left: 10px;
}

h5  {
    margin-left:55px;
}


a {
    text-decoration: none;
}


.logout_button {
    border: none;
    cursor: pointer;
}


.bin_icon {
    max-width: 15px;
    max-height: 15px;
}

.card_nav {
    /*left: 0;
    border: 1px solid var(--chill-black);
    border-radius: 20px;
    min-width: 15%;
    max-width: 15%;
    max-height: 93vh;
    user-select: none;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
    align-self: start;
    */
}

/*
.singular_card {
    border: 1px solid var(--chill-black);
    max-height: 93%;
    width: 40%;


    border-radius: 20px;


    overflow-y: auto;
    overflow-x: clip;
}
    */


.singular_card::-webkit-scrollbar {
    display: none;
}

.card_header {
    display: flex;
    height: fit-content;
    justify-content: space-evenly;
    align-items: center;
    padding: 0 12px 12px 12px;

    border-bottom: var(--chill-black) 1px solid;


    width: 100%;
    box-sizing: border-box;
    gap: 20px;
}

.card_image {
    height: auto;
    max-width: 100%;

    cursor: pointer;
}

.card_image_container {

}

.card_margin {
    display: flex;
    flex-direction: row;
    justify-content: end;
    align-items: start;
}

.card_titles {
    display: flex;
    flex-direction: column;
    align-items: start;
    align-self: start;

    flex: 1;
    /* long words no longer go over the container */
    min-width: 0;
}

.card_type_select {
    font-style: italic;
    color: var(--transparent-text);
    opacity: 1;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
    border: none;
    outline: none;

    flex-grow: 0.9;

    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    cursor: pointer;
}

.card_type_select option {
    font-style: italic;
}


#card_container {
    /*
    height: 100vh;
    display: flex;
    flex-direction: row;
    overflow: clip;
    box-sizing: border-box;

    gap: 2px;
    */
}

.card_name {
    width: 100%;
    font-size: 30px;
    padding: 0;


    box-sizing: border-box;

    white-space: normal;
    word-wrap: break-word;

    field-sizing: content;

    resize: none;
    overflow-y: auto;

}

.section {
    display: flex;
    flex-direction: column;
}

.section_name {
    font-size: 24px;
    margin-left: 5px;
    width: 100%;
}

.section_content {
    font-size: 16px;
    field-sizing: content; /* box is exactly as big as its content */
    resize: none;
}


.add_section {
    box-sizing: border-box;
    text-align: center;
    border: 1px black solid;
    cursor: pointer;
    border-radius: 12px;
    width: 99%;
}

.section_content, .section_name {
}

.section_content::placeholder, .section_name::placeholder, .card_name::placeholder {
    color: var(--transparent-text);
    font-style: italic;
}

.card_name::placeholder {
    text-decoration: underline;
}

input, textarea, input:focus, textarea:focus{
    border: none;
    outline: none;
}


textarea {
    padding: 20px
}

.section_name_row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.top_align_row {
    /*
    max-height: 100vh;
    display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: start;
    gap: 2px;
    */
}

/* button for adding new folder / new card */
.utility_button:hover {
    #border: 1px rgba(0,0,0,0.1) solid;
}

.utility_title {
    margin: 15px 0 0 0;
    padding: 0;
    text-align: center;
    font-size: 0.85rem;
}

.utility_row {

    margin-bottom: 15px;
}

.basic_row, .utility_row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.basic_column {
    display: flex;
    flex-direction: column;
    align-items: start;
}


.nav_separator {
    height: 2px;
    flex-shrink: 0;
    background: linear-gradient(to right, transparent, rgba(5, 5, 5, 0.65), transparent);
    width: 100%;
}

.binder_name {
    margin: 10px;
    padding: 0;

    word-break: break-word;
    text-align: center;
}


/* LOGIN APP */

.login_column {
    gap: 2px;
    margin-inline: auto;
}

.login_input {
    font-size: 1.5rem;
    border: 1px solid var(--chill-black);
    border-radius: 4px;
}


.login_button {
    font-size: 1.5rem;
    border: 2px solid var(--chill-black);
    border-radius: 10px;
}

.form_input_element *{
    align-self: center;
}

/* ------- */


@media (orientation: portrait){

    .login_column {
        display: flex;
        flex-direction: column;
        max-width: fit-content;
        align-items: center;
    }

    .login_button {
        width: 100%;
    }

    .card_nav {
        flex: 0 0 30%;
        width: 35%;
        max-width: 35%;
        max-height: 90dvh; /* dynamic viewport height -> somehow better for mobile */
    }
/*
    .singular_card {
        flex: 1;
        min-width: 80%;
        align-self: start;
    }
*/
/*
    #card_container {
        justify-content: center;
        padding: 0;
        margin: 0;
    }
*/
}
