﻿html, body {
    height: 100%;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

hr {
    border: none;
    border-top: 1px solid #ddd;
    opacity: 0.3;
}

h1 {
    padding-top: 0px;
}

form {
    margin-top: 5px;
}

#centralMenu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    user-select: none;
}

#centralMenuFolder {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    user-select:none;
}

.centralMenuContent {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    min-width: 380px;
    max-width: 90vw;
    text-align: center;
    position: relative;
}

.menu-folder-name {
    font-weight: bold;
    font-size: 21px;
    padding: 8px;
    color: #CC5500;
    border-bottom: 1px solid #ddd;
    margin-bottom: 8px;
    text-transform: uppercase;
    border: none;
    padding-top: 20px;
}

.centralMenuContent nav a {
    display: block;
    margin: 0.6rem 0;
    font-size: 1.03rem;
    color: black;
    text-decoration: none;
    transition: color 0.2s ease;
    margin: 2px !important;
}

.disabled-link {
    pointer-events: none; /* bloqueia clique */
    opacity: 0.3; /* aparência desativada */
    cursor: not-allowed; /* cursor */
}

.centralMenuContent nav a:hover {
    color: gray;
}

#centralMenuFolder .menu-group:first-of-type {
    display: grid;
    grid-template-columns: repeat(2, auto); /* duas colunas */
        column-gap: 8px;
        align-items: start;
    }

#centralMenuFolder .menu-group:first-of-type h4 {
    grid-column: 1 / -1; /* o título ocupa as 2 colunas */
    margin-bottom: 4px;
}

/* Aparência dos links */
#centralMenuFolder .menu-group:first-of-type a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333; 
}

#centralMenuFolder .menu-group:first-of-type a i {
    margin-right: 5px;
}


#closeMenuBtn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 3rem;
    line-height: 1rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
}

#closeMenuBtn:hover {
    color: #CC5500;
}


#closeMenuBtnFolder {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 3rem;
    line-height: 1rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
}

#closeMenuBtnFolder:hover {
    color: #CC5500;
}

#treeRoot {
    width: 95%; /* ocupa quase toda largura da viewport */
    margin: 1rem auto; /* margem menor nas laterais */
    padding: 1rem 2rem;
    background: #f7f7f7;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    overflow-y: auto;
    box-sizing: border-box;
    margin-left: 1.2rem;
}

ul, ul ul {
    list-style: none;
    padding-left: 1rem;
    margin: 0;
}

.root-folder {
    margin: 0px;
    padding: 0px !important;
    border-radius: 0px;
    cursor: grab;
    user-select: none;
    box-shadow: none;
    transition: none;
}

    .root-folder ul {
        padding-left: 0px;
    }

.normal-folder{
    margin-top:10px;
}


li {
    margin: 0.4rem 0;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: grab;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

li > strong, li > span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: #222;
}

ul ul {
    border-left: none;
    margin-top: 0.75rem;
    padding-left: 1rem;
    display: none;
}


li.expanded > ul {
    display: block;
}
 

li:hover {
    background: #f2eded;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

strong, span {
    font-weight: 100;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #222;
}

folder-label {
    cursor: pointer;
    user-select: none;
} 

.folder-label:focus,
.folder-label:active {
    outline: none;
    box-shadow: none;
    transform: none;
}

form {
    padding-left: 20px;
    margin-bottom: 0px !important;
}

select {
    margin-bottom: 0px !important;
}

/* Ícones */
.folder-icon {
    width: 20px;
    height: 20px;
    fill: #CC5500;
    flex-shrink: 0;
}

.file-icon {
    width: 18px;
    height: 18px;
    fill: #8338ec;
    flex-shrink: 0;
}

li.dragging {
    opacity: 0.6;
    background-color: #d0e0ff;
    border: 2px dashed #3a86ff;
    box-shadow: none;
    transform: none !important;
}

button {
    background-color: #CC5500;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #265ed1;
}



.btn-warning {
    background-color: #CC5500;
    border-color: #CC5500;
}


.btn-warning:hover {
    background-color: #A64700;
    border-color: #A64700;
}



/* Context menu */
.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
}

.menu-btn:hover {
    background-color: #eee;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 150px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    padding: 0.5rem 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
}


.item-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer; /* mostra que pode clicar */
    padding: 5px 10px;
}

.item-container .options-icon {
    visibility: hidden; /* esconde por padrão */
    color: #666;
}

.item-container:hover .options-icon {
    visibility: visible; /* aparece só ao hover */
}

.menu-group h4 {
    margin: 12px 0 8px;
    font-weight: 600;
    font-size: 15px;
    color: #CC5500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    padding-top: 5px;
}

.menu-group a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 3px 0;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: left;
}

.menu-group a:hover {
    background-color: #f0f0f0;
    color: #007bff;
}

/* Por padrão, os ícones estão invisíveis */
.item-container .move-up-icon,
.item-container .move-down-icon,
.item-container .options-icon {
    opacity: 0;
    transition: opacity 0.2s;
}

/* Mostrar ícones ao hover ou se a pasta tiver a classe 'hovered' */
.item-container:hover .move-up-icon,
.item-container:hover .move-down-icon,
.item-container:hover .options-icon,
.item-container.hovered .move-up-icon,
.item-container.hovered .move-down-icon,
.item-container.hovered .options-icon {
    opacity: 1;
}
 

/* Todas as ações dos itens só aparecem ao hover do container */
.item-container .folder-actions {
    opacity: 0;
    transition: opacity 0.2s;
}

.item-container:hover .folder-actions {
    opacity: 1;
}
