/* --- ESTILOS DEL EXPLORADOR DE ARCHIVOS --- */

#popup-explorer {
    border: none;
    background-color: transparent;
    box-shadow: none;
    width: 650px !important;
    height: 450px !important;
    display: flex;
    flex-direction: column;
}

/* Specialized Header for Explorer */
#draggable-explorer {
    background-image: url('../PopupLinks/Assets/barra superior.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    height: 66px;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
}

/* Hide default title elements (inherited from shared window classes) */
#draggable-explorer .powershell-header,
#draggable-explorer .web-link-display {
    display: none;
}

/* Custom positioning for navigation controls */
#draggable-explorer .explorer-nav {
    position: absolute;
    top: 55%;
    left: 24px;
    right: 180px;
    transform: translateY(-50%);
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

#draggable-explorer .nav-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #444;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

#draggable-explorer .nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

#draggable-explorer #explorer-address {
    flex: 1;
    background: transparent;
    border: none;
    box-shadow: none;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    color: #333;
    padding: 5px 10px;
    margin-left: 10px;
    margin-top: -2px;
    pointer-events: none;
    user-select: none;
    cursor: default;
}

/* Window controls adjustments */
#draggable-explorer .window-controls-group {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 10;
}

.explorer-body {
    display: flex;
    flex: 1; /* Ocupa todo el espacio restante sin dejar huecos */
    background-color: white;
    color: black;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0px;
}

.explorer-footer {
    height: 40px;
    background-image: url('../PopupLinks/Assets/barra inferior.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    margin: 0;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.explorer-sidebar {
    width: 150px;
    background-color: #f0f0f0;
    border-right: 1px solid #d9d9d9;
    padding: 10px 0;
    font-size: 13px;
    overflow-y: auto;
}

.sidebar-item {
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sidebar-item:hover {
    background-color: #cce8ff;
    border: 1px solid #99d1ff;
    padding: 4px 9px;
}

.explorer-content {
    flex: 1;
    padding: 10px;
    background-color: white;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    grid-auto-rows: 110px;
    gap: 5px;
    align-content: start;
}

/* File/Folder Items in Grid */
.explorer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    padding: 5px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 3px;
}

.explorer-item:hover {
    background-color: #e5f3ff;
    border-color: #cce8ff;
}

.explorer-item.selected {
    background-color: #cce8ff;
    border-color: #99d1ff;
}

.explorer-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 5px;
    object-fit: contain;
}

.explorer-item span {
    font-size: 12px;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
    max-height: 3em;
    overflow: hidden;
}

.explorer-nav {
    margin-left: -10px;
    gap: 0px;
}