/* ============== ESTILOS WINDOWS EXPLORER XP ============== */

.explorer-container {
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    color: #000;
    height: 100%;
    background: #ECE9D8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============== BARRA DE MENÚ ============== */
.explorer-menu-bar {
    background: #ECE9D8;
    border-bottom: 1px solid #ACA899;
    padding: 4px 8px;
    display: flex;
    gap: 0px;
    font-size: 11px;
    min-height: 20px;
    align-items: center;
}

.explorer-menu-bar .menu-item {
    cursor: pointer;
    padding: 2px 8px;
    color: #000;
    white-space: nowrap;
    margin-right: 15px;
    border-radius: 2px;
    transition: background-color 0.2s;
    word-spacing: normal;
    letter-spacing: normal;
    display: inline-block;
}

.explorer-menu-bar .menu-item:hover {
    background: #D4D0C8;
}

.explorer-menu-bar .menu-item u {
    text-decoration: underline;
    display: inline;
    margin: 0;
    padding: 0;
    font-style: inherit;
    font-weight: inherit;
}

/* ============== BARRA DE HERRAMIENTAS ============== */
.explorer-toolbar {
    background: linear-gradient(to bottom, #F7F6F0, #E8E5D7);
    border-bottom: 1px solid #ACA899;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
}

.toolbar-group {
    display: flex;
    gap: 2px;
    align-items: center;
}

.toolbar-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 6px;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    white-space: nowrap;
    border-radius: 0;
}

.toolbar-btn:hover:not(:disabled) {
    background: linear-gradient(to bottom, #FEFEFE, #E8E5D7);
    border: 1px outset #ACA899;
}

.toolbar-btn:active:not(:disabled) {
    background: linear-gradient(to bottom, #E8E5D7, #FEFEFE);
    border: 1px inset #ACA899;
}

.toolbar-btn:disabled {
    color: #ACA899;
    cursor: default;
}

.toolbar-btn img {
    margin-right: 2px;
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: linear-gradient(to bottom, #ACA899, #F7F6F0, #ACA899);
    margin: 0 4px;
}

/* ============== BARRA DE DIRECCIONES ============== */
.explorer-address-bar {
    background: #ECE9D8;
    border-bottom: 1px solid #ACA899;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
}

.address-label {
    font-size: 11px;
    color: #000;
    min-width: 50px;
}

.address-input-container {
    flex: 1;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 2px inset #ECE9D8;
    padding: 2px;
}

.address-icon {
    margin: 0 4px;
}

.address-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    color: #000;
    outline: none;
    padding: 2px;
}

.address-dropdown {
    background: linear-gradient(to bottom, #F8F8F8, #E8E8E8);
    border: 1px outset #ACA899;
    width: 16px;
    height: 18px;
    cursor: pointer;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.address-dropdown:hover {
    background: linear-gradient(to bottom, #FEFEFE, #E8E8E8);
}

.address-dropdown:active {
    border: 1px inset #ACA899;
    background: linear-gradient(to bottom, #E8E8E8, #FEFEFE);
}

.address-go-btn {
    background: linear-gradient(to bottom, #F8F8F8, #E8E8E8);
    border: 1px outset #ACA899;
    padding: 2px 12px;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    cursor: pointer;
    color: #000;
}

.address-go-btn:hover {
    background: linear-gradient(to bottom, #FEFEFE, #E8E8E8);
}

.address-go-btn:active {
    border: 1px inset #ACA899;
    background: linear-gradient(to bottom, #E8E8E8, #FEFEFE);
}

/* ============== CONTENIDO PRINCIPAL ============== */
.explorer-main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ============== PANEL IZQUIERDO (ÁRBOL DE CARPETAS) ============== */
.explorer-left-panel {
    display: none;
}

.panel-header {
    background: linear-gradient(to bottom, #316AC5, #2158B5);
    color: #FFFFFF;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
}

.folder-tree {
    flex: 1;
    padding: 8px 4px;
    overflow-y: auto;
    background: #FFFFFF;
}

.tree-item {
    margin: 0;
    user-select: none;
}

.tree-item-content {
    display: flex;
    align-items: center;
    padding: 2px 4px;
    cursor: pointer;
    font-size: 11px;
    gap: 2px;
    min-height: 18px;
}

.tree-item-content:hover {
    background: #E5F3FF;
}

.tree-item.selected > .tree-item-content {
    background: #316AC5;
    color: #FFFFFF;
}

.tree-expand {
    width: 12px;
    text-align: center;
    font-family: monospace;
    font-size: 10px;
    cursor: pointer;
    margin-right: 2px;
}

.tree-icon {
    margin-right: 4px;
}

.tree-label {
    flex: 1;
}

.tree-children {
    margin-left: 16px;
    display: none;
}

.tree-item.expanded > .tree-children {
    display: block;
}

/* ============== SEPARADOR ============== */
.explorer-splitter {
    display: none;
}

.explorer-splitter:hover {
    background: #D6D3CE;
}

/* ============== PANEL DERECHO (CONTENIDO) ============== */
.explorer-right-panel {
    flex: 1;
    width: 100%;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    background: #ECE9D8;
    border-bottom: 1px solid #ACA899;
    padding: 4px 8px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 24px;
}

.content-view-options {
    display: flex;
    gap: 2px;
}

.view-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 2px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 22px;
}

.view-btn:hover {
    background: linear-gradient(to bottom, #FEFEFE, #E8E5D7);
    border: 1px outset #ACA899;
}

.view-btn.active {
    background: linear-gradient(to bottom, #E8E5D7, #FEFEFE);
    border: 1px inset #ACA899;
}

.content-area {
    flex: 1;
    padding: 8px;
    overflow: auto;
    background: #FFFFFF;
}

/* ============== VISTA DE CONTENIDO ============== */
.loading-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
    gap: 8px;
}

.loading-message p {
    margin: 0;
    font-size: 11px;
}

/* Vista de íconos */
.icons-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    padding: 8px;
}

.project-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 90px;
    padding: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 3px;
    user-select: none;
}

.project-item:hover {
    background: #E8F0FF;
    border: 1px solid #316AC5;
}

.project-item.selected {
    background: #316AC5;
    border: 1px solid #316AC5;
}

.project-item.selected .project-name {
    color: #FFFFFF;
}

.project-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}


.project-name {
    font-size: 11px;
    font-weight: normal;
    word-wrap: break-word;
    line-height: 1.2;
    margin-top: 4px;
}

.project-details {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.project-item.selected .project-details {
    color: #E0E0E0;
}

/* Vista de lista */
.list-view {
    display: table;
    width: 100%;
    font-size: 11px;
}

.list-header {
    display: table-header-group;
    background: #F0F0F0;
    border-bottom: 1px solid #ACA899;
}

.list-header-row {
    display: table-row;
}

.list-header-cell {
    display: table-cell;
    padding: 4px 8px;
    font-weight: bold;
    border-right: 1px solid #ACA899;
    cursor: pointer;
}

.list-header-cell:hover {
    background: #E0E0E0;
}

.list-body {
    display: table-row-group;
}

.list-row {
    display: table-row;
    cursor: pointer;
}

.list-row:hover {
    background: #E5F3FF;
}

.list-row.selected {
    background: #316AC5;
    color: #FFFFFF;
}

.list-cell {
    display: table-cell;
    padding: 2px 8px;
    border-right: 1px solid #E0E0E0;
    vertical-align: middle;
}

.list-cell-icon {
    width: 16px;
    text-align: center;
}

/* ============== BARRA DE ESTADO ============== */
.explorer-status-bar {
    background: #ECE9D8;
    border-top: 1px solid #ACA899;
    padding: 2px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    min-height: 20px;
}

.status-left {
    display: flex;
    align-items: center;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-separator {
    width: 1px;
    height: 12px;
    background: #ACA899;
}

/* ============== SCROLLBARS ESTILO WINDOWS XP ============== */
.folder-tree::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
    width: 16px;
}

.folder-tree::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track {
    background: #ECE9D8;
    border: 1px solid #ACA899;
}

.folder-tree::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ECE9D8, #D6D3CE);
    border: 1px solid #ACA899;
    min-height: 16px;
}

.folder-tree::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #D6D3CE, #B6B3AA);
}

.folder-tree::-webkit-scrollbar-button,
.content-area::-webkit-scrollbar-button {
    background: linear-gradient(to bottom, #ECE9D8, #D6D3CE);
    border: 1px solid #ACA899;
    height: 16px;
}

.folder-tree::-webkit-scrollbar-button:hover,
.content-area::-webkit-scrollbar-button:hover {
    background: linear-gradient(to bottom, #D6D3CE, #B6B3AA);
}

/* ============== VISTA DE ICONOS ============== */
.icons-view {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 8px;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 800px) {
    .explorer-left-panel {
        width: 150px;
        min-width: 120px;
    }
    
    .toolbar-btn {
        padding: 2px 4px;
        font-size: 10px;
    }
    
    .toolbar-btn img {
        margin-right: 1px;
    }
    
    .icons-view {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
    }
    
    .project-item {
        max-width: 80px;
    }
    
    .project-icon {
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .explorer-toolbar {
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .toolbar-group {
        gap: 1px;
    }
    
    .explorer-left-panel {
        width: 120px;
        min-width: 100px;
    }
}

/* ============== ANIMACIONES ============== */
.tree-item-content {
    transition: background-color 0.1s ease;
}

.view-btn {
    transition: all 0.1s ease;
}

.project-item {
    transition: background-color 0.1s ease;
}

.list-row {
    transition: background-color 0.1s ease;
}

/* ============== MENÚ CONTEXTUAL ============== */
.context-menu {
    position: absolute;
    background: #F0F0F0;
    border: 2px outset #F0F0F0;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-size: 11px;
    z-index: 1000;
    min-width: 120px;
}

.context-menu-item {
    padding: 4px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item:hover {
    background: #316AC5;
    color: #FFFFFF;
}

.context-menu-separator {
    height: 1px;
    background: #ACA899;
    margin: 2px 0;
}

/* ============== TOOLTIP ============== */
.tooltip {
    position: absolute;
    background: #FFFFE1;
    border: 1px solid #000;
    padding: 4px 8px;
    font-size: 11px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    z-index: 1001;
    white-space: nowrap;
    max-width: 300px;
    word-wrap: break-word;
}