/*!
Theme: Minnie
Author: Mikkel Sørensen
Version: 1.0.2
*/

/* WRAPPER */
.wrapper {
    display: grid;
    gap: 0px 0px;
    grid-auto-flow: row;
    width: 100%;
    height: 100%;
}

/* CONTAINERS */
.editor { grid-area: editor; }
.footer { grid-area: footer; }
.sidebar-wrapper { grid-area: sidebar-wrapper; }

.editor,
.nav-wrapper,
.footer {
    padding: 20px;
}

#main {
    transition: margin-left .5s;
    margin-left: 2.5em; /* 2,5em */
}

/* MOBILE CHECKS */
.formatting,
.logo-mobile-wrapper, 
.nav-wrapper .logo,
.nav-wrapper .settings,
.menu-tags,
.menu-title,
#carousel {
    display: none;
}


/* NOTES MENU */
.nav-wrapper {
    max-height: 100%;
    overflow: auto;
    /* max-width: 250px; */
}

.nav ul {
    margin: 0 0 0 20px;
}

/* EDITOR */
.editor .note-editable {
    font-family: var(--font-family);
    font-size: 1em;
    max-width: 100%;
    overflow-y: auto;
    padding: 0 50px;
    background-color: transparent;
}

/* FOOTER */
.top-container {
    display: flex;
    
    align-items: center;

}

.footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 0px 0px;
    align-self: center;
}

.date {
    font-size: 0.8em;
    padding: 0 50px;
    margin: auto 0;
}

/* SIDEBAR */
.sidebar-wrapper ul li > * { /* Aligns icons and text */
    display: flex;
    align-items: center;
}

.sidebar-wrapper li {
    font-size: 0.9rem;
    max-width: 100%;
    line-height: 1rem;
    min-height: 1rem;
    padding: 5px 0;
}

/** NOTE DELETE MODAL **/
.modal-note-window {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.0);
}

.modal-note-content {
    background-color: var(--background-color-secondary);
    padding: 20px;
    font-size: 12.8px;
    border-radius: 8px;
}

/* EDITOR MODALS */

.note-modal-content {
    background-color: var(--background-color-secondary) !important;
    border-radius: 8px !important;
}

.note-modal-header { 
    display: none !important;
}

.note-form-label {
    border: 0 !important;
}

.checkbox .sn-checkbox-open-in-new-window label {
    font-size: 0.8em;
}

/* Link Popover */

.note-children-container {
    display: flex;
    align-items: stretch; /* Ensure all child elements stretch to the same height */
    gap: 2px; /* Optional: Adds space between elements */
  }
  
  .note-children-container span,
  .note-children-container .note-btn-group {
    display: flex;
    align-items: center; /* Vertically center the content inside */
    justify-content: center; /* Optional: Center horizontally if needed */
  }
  
  .note-btn-group button {
    margin: 0;
    padding: 5px 10px; /* Adjust padding as necessary */
    flex: 1 !important; /* Ensure buttons within the group stay uniform */
  }



.note-children-container > span {
    background-color: white;
    border: 1px solid #dae0e5;
    border-radius: 3px;
    max-width: 50%;
}
.note-children-container > span a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    padding: 5px;
}

.note-btn-group {
    margin: 0px !important;
}

/* Modal Options */
.modal-options {
display: flex;
flex-wrap: nowrap;
padding: 5% 0 0 0;
}

.modal-options a {
    color: var(--link-color);
    padding: 2%;
    width: 100%;
    text-align: center;
    border-radius: 8px;
    background-color: #FFD6A6;
}

.modal-options a:hover {
    background-color: #FFBA92;
    /* background-color: var(--background-color-red-hover); */
}


/* TAGS */
/** TAG DISPLAY **/ 
.tag-title {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    color: var(--font-color);
}

.tags-title-delete {
    display: inline-block;
    margin-left: 8px;
    cursor: pointer;
    color: var(--font-color);
}

/** TAG INPUT **/

.tags-input-container {
    display: flex;
    flex-wrap: nowrap;
    padding: 5px;
    border-radius: 5px;
    max-width: 600px;
    font-family: var(--font-family);
}

.tags-input-container ul {
    display: flex;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    list-style-type: none;
    font-family: var(--font-family);
    font-size: 0.8em;
}

.tags-input-container ul li {
    background-color: var(--background-color-secondary);
    padding: 5px 10px;
    margin: 2px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    color: var(--font-color);
    font-size: 0.9em;
}

.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
    background: transparent;
    border: 1px solid transparent;
    color: var(--font-color);
}

.tags-input-container ul li:hover {
    background-color: var(--background-color-secondary-hover);
}

.tags-input-container ul li span {
    margin-left: 8px;
    cursor: pointer;
}

.tags-input-container input {
    border: none;
    outline: none;
    flex-grow: 1;
    font-size: 0.8em;
    font-family: var(--font-family);
    background-color: transparent;
    color: var(--font-color); 

}

.ui-autocomplete {
    /* Custom positioning for the autocomplete suggestions */
    
    max-height: 22px;
    overflow-y: auto;
    overflow-x: hidden;
    position: absolute;
    
    bottom: 5px;
    left: 0;
    z-index: 1000;
    background-color: transparent;
    border: 0px solid #ccc;
    border-radius: 3px;
}

.ui-widget.ui-widget-content {
    border: 0;
}

.ui-menu .ui-menu-item {
    margin: 0 2px 0 0;
    padding: 2px 4px;
}

/** TAG DELETE **/
/** TAG DELETE MODAL **/
.nav-tag-wrapper ul {
    display: flex;
    flex-wrap: nowrap;

}

.nav-tag-wrapper ul li {
    margin-right: 10px;
    font-size: 0.8em;
}

.nav-tag-wrapper ul li:last-child {
    margin-right: 0;
}

.modal-tag-window {
    display: none; 
    z-index: 9999;
}

.modal-tag-content {
    background-color: var(--background-color-secondary);
    
}

.modal-tag-options { 
    display: flex;
    flex-wrap: nowrap;
    padding: 0;
}

.modal-tag-options a {
    color: var(--link-color);
    padding: 5px 10px;
    width: 100%;
    text-align: center;
    border-radius: 3px;
    background-color: #FFD6A6;
}

.modal-tag-options a:hover {
    background-color: #FFBA92;
    /* background-color: var(--background-color-red-hover); */
}

/* The Close Button */
.close {
    display: none;
}

/* LOGO */
.logo {
    grid-area: logo;
    display: flex;
    justify-content: center;
    width: 2.5em;
    transition: width 0.5s;
}

.logo svg,
.logo img {
    opacity: 50%;
    width: 50%;
    max-width: 2.5em;
}

@media screen and (min-width: 1500px) {
	/* WRAPPER */
	.wrapper {
		grid-template-columns: 30% 40% 30%;
		grid-template-rows: 5% 87% 8%;
		grid-template-areas:
			". . ."
			"nav editor ."
			". footer .";
	}

    /* CONTAINERS */
    .nav-wrapper { grid-area: nav; }
}

@media screen and (min-width: 769px) and (max-width: 1499px) {
    /* WRAPPER */
    .wrapper {
		grid-template-columns: 30% 70%; 
        grid-template-rows: 5% 87% 8%;
		grid-template-areas:
			". ."
			"nav editor"
			". footer";
	}

    /* CONTAINERS */
    .nav-wrapper { grid-area: nav; }
}

@media screen and (min-width: 769px) {
    /* ANIMATIONS */
    .fade {
        opacity: 0.5;
        transition: .5s;
    }

    .fade:hover {
        opacity: 1;
    }

    /* EDITOR */

    .editor { 
        overflow: scroll;
    }

    .editor .note-editable { 
        max-height: 100%;
    }

    /* SIDEBAR */
    .sidebar-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        display: grid;
        grid-template-rows: 5% auto 1fr auto;
        grid-template-areas:
            "logo"
            "controls"
            "tagslist"
            "settings";
        grid-auto-flow: row;
        gap: 0px 0px;
        width: 2.5em; /* 2,5em */
        height: 100%;
        border-right: 1px solid var(--accent-color);
        z-index: 1;	
        overflow-x: hidden;
        transition: 0.5s;
    }

    .sidebar-wrapper ul {
        --fa-li-width: 2.5em;
        white-space: nowrap;
    }

    .sidebar-wrapper > div {
        padding: 20px 0;
    }

    /* TAGS*/
    #tagslist { opacity: 0; }

    .tag-title {
    background-color: var(--background-color-secondary);
    
    } 

    /* DELETE NOTE MODAL */
    .modal-note-content {
        position: fixed;
        left: 11rem;
        top: 5%; 
    }

    
}

