/* ==========================================================================
   WINDOWS 11 DARK MODE FILE EXPLORER (Eksplorator Plików)
   1:1 Pixel-Perfect Replica based on Windows 11 23H2/24H2 Fluent Design System
   ========================================================================== */

/* Main Explorer Window Container */
.explorer-window {
    width: 1040px;
    max-width: calc(100vw - 28px);
    height: 640px;
    max-height: calc(100vh - 72px);
    background: rgba(25, 25, 25, 0.96);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 1px rgba(255, 255, 255, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #ffffff;
    font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    font-size: 12.5px;
    position: fixed;
    bottom: 54px;
    left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) translateY(24px) scale(0.94);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    z-index: 9995;
    user-select: none;
}

.explorer-window.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.explorer-window.is-dragged {
    transition: none !important;
}

/* ==========================================================================
   1. Titlebar & Tabs Row (Top)
   ========================================================================== */
.explorer-titlebar {
    height: 40px;
    min-height: 40px;
    background: #1f1f1f;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 0 0 8px;
    cursor: move;
    position: relative;
    z-index: 20;
}

.explorer-tabs-container {
    display: flex;
    align-items: flex-end;
    height: 100%;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.explorer-tabs-container::-webkit-scrollbar {
    display: none;
}

.explorer-tab {
    height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 12px;
    background: transparent;
    border-radius: 8px 8px 0 0;
    font-size: 12px;
    font-weight: 400;
    color: #a0a0a0;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
    border-bottom: none;
    position: relative;
    transition: background 0.12s, color 0.12s;
    min-width: 140px;
    max-width: 220px;
}

.explorer-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #f0f0f0;
}

.explorer-tab.active {
    background: #2c2c2c;
    color: #ffffff;
    font-weight: 400;
    border-color: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid #2c2c2c;
    margin-bottom: -1px;
    z-index: 2;
}

.explorer-tab-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.explorer-tab-icon svg,
.explorer-tab-icon img {
    width: 16px;
    height: 16px;
    display: block;
}

.explorer-tab-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-tab-close {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #888888;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.12s, color 0.12s;
}

.explorer-tab-close svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.explorer-tab-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.explorer-new-tab-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    margin-bottom: 3px;
    margin-left: 2px;
    transition: background 0.12s, color 0.12s;
}

.explorer-new-tab-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.explorer-new-tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

/* ==========================================================================
   2. Address Bar & Search Row (Row 2 in Win11 23H2+)
   ========================================================================== */
.explorer-address-bar {
    height: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    background: #2c2c2c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.explorer-nav-arrows {
    display: flex;
    align-items: center;
    gap: 2px;
}

.explorer-nav-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: #cccccc;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.explorer-nav-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.explorer-nav-btn.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.explorer-nav-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.explorer-breadcrumb-box {
    flex: 1;
    height: 32px;
    background: #383838;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 6px;
    font-size: 12px;
    color: #d8d8d8;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}

.explorer-breadcrumb-box:hover {
    background: #404040;
    border-color: rgba(255, 255, 255, 0.14);
}

.explorer-breadcrumb-box.focused,
.explorer-breadcrumb-box:focus-within {
    border-color: #0078d4;
    background: #1c1c1c;
}

.explorer-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s;
}

.explorer-breadcrumb-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.explorer-breadcrumb-chevron {
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
}

.explorer-breadcrumb-chevron svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.explorer-breadcrumb-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #cccccc;
}

.explorer-breadcrumb-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.explorer-search-box {
    width: 236px;
    height: 32px;
    background: #383838;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
    transition: border-color 0.15s, background 0.15s;
}

.explorer-search-box:hover {
    background: #404040;
    border-color: rgba(255, 255, 255, 0.14);
}

.explorer-search-box:focus-within {
    border-color: #0078d4;
    background: #1c1c1c;
}

.explorer-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 12px;
    width: 100%;
    font-family: inherit;
}

.explorer-search-box input::placeholder {
    color: #8a8a8a;
}

.explorer-search-icon {
    width: 14px;
    height: 14px;
    color: #8a8a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.explorer-search-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ==========================================================================
   3. Command Bar (Ribbon Tools - Row 3 in Win11 23H2+)
   ========================================================================== */
.explorer-command-bar {
    height: 44px;
    min-height: 44px;
    background: #191919;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
}

.explorer-command-bar::-webkit-scrollbar {
    display: none;
}

.explorer-cmd-btn {
    height: 32px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #d8d8d8;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.explorer-cmd-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.explorer-cmd-btn.is-active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.explorer-cmd-btn.disabled {
    opacity: 0.38;
    cursor: default;
    pointer-events: none;
}

.explorer-cmd-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.explorer-cmd-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.explorer-cmd-chevron {
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    margin-left: 2px;
}

.explorer-cmd-chevron svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.explorer-cmd-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 4px;
    flex-shrink: 0;
}

.explorer-cmd-spacer {
    flex: 1;
}

/* ==========================================================================
   4. Explorer Body (Sidebar + Content + Details Pane)
   ========================================================================== */
.explorer-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #191919;
}

/* 4.1 Left Navigation Sidebar */
.explorer-sidebar {
    width: 250px;
    min-width: 210px;
    background: #191919;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: auto;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.explorer-sidebar::-webkit-scrollbar {
    width: 5px;
}
.explorer-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.explorer-tree-item {
    height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 12.5px;
    color: #cccccc;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    position: relative;
    user-select: none;
}

.explorer-tree-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.explorer-tree-item.active {
    background: #333333;
    color: #ffffff;
    font-weight: 400;
}

.explorer-tree-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.explorer-tree-icon svg,
.explorer-tree-icon img {
    width: 18px;
    height: 18px;
    display: block;
}

.explorer-tree-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-tree-pin {
    margin-left: auto;
    width: 13px;
    height: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777777;
    opacity: 0.7;
}

.explorer-tree-pin svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.explorer-tree-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 6px 8px;
}

/* 4.2 Center Main Content & Column Headers */
.explorer-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #191919;
}

.explorer-column-headers {
    height: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    background: #191919;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 16px;
    font-size: 12px;
    color: #a0a0a0;
    user-select: none;
}

.explorer-col-head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: background 0.1s, color 0.1s;
}

.explorer-col-head:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.explorer-col-head.name-col {
    width: 240px;
    min-width: 180px;
}

.explorer-col-head.date-col {
    width: 160px;
    min-width: 130px;
}

.explorer-col-head.type-col {
    flex: 1;
    min-width: 100px;
}

.explorer-col-sort-icon {
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0a0a0;
}

.explorer-col-sort-icon svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.explorer-col-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 4px;
}

.explorer-main-view {
    flex: 1;
    background: transparent;
    overflow-y: auto;
    padding: 6px 12px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.explorer-main-view::-webkit-scrollbar {
    width: 5px;
}
.explorer-main-view::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.explorer-files-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.explorer-file-row {
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s, border-color 0.1s;
    border: 1px solid transparent;
    width: 100%;
}

.explorer-file-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.explorer-file-row.selected {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.explorer-row-name-wrap {
    width: 240px;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.explorer-row-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.explorer-row-icon svg {
    width: 18px;
    height: 18px;
}

.explorer-row-name {
    font-size: 12.5px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explorer-row-date {
    width: 160px;
    min-width: 130px;
    font-size: 12px;
    color: #8f8f8f;
    white-space: nowrap;
}

.explorer-row-type {
    flex: 1;
    font-size: 12px;
    color: #8f8f8f;
    white-space: nowrap;
}

/* 4.3 Right Details Pane */
.explorer-details-pane {
    width: 280px;
    min-width: 250px;
    background: #222222;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.explorer-details-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 280px;
    padding: 40px 20px;
    text-align: center;
    color: #888888;
    gap: 12px;
}

.explorer-empty-placeholder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
}

.explorer-empty-placeholder-icon svg {
    width: 44px;
    height: 44px;
    opacity: 0.35;
}

.explorer-empty-prompt {
    font-size: 12px;
    color: #888888;
    line-height: 1.4;
    max-width: 160px;
}

.explorer-details-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.explorer-details-preview-area {
    width: 100%;
    height: 170px;
    background: rgba(18, 18, 18, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.explorer-details-preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

.explorer-details-info-area {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
}

.explorer-details-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.explorer-details-file-mini-icon {
    flex-shrink: 0;
}

.explorer-details-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    word-break: break-all;
}

.explorer-details-share-btn {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    background: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background 0.12s;
}

.explorer-details-share-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.explorer-details-share-btn svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.explorer-details-section-label {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-top: 6px;
    margin-bottom: 2px;
}

.explorer-details-meta {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.explorer-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    line-height: 1.4;
}

.explorer-meta-row .meta-k {
    color: #8f8f8f;
    font-size: 12px;
    white-space: nowrap;
}

.explorer-meta-row .meta-v {
    color: #ffffff;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.explorer-details-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.explorer-details-props-btn {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.12s;
}

.explorer-details-props-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.explorer-details-props-btn svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.explorer-open-board-btn {
    width: 100%;
    padding: 8px 14px;
    background: #0078d4;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.35);
    margin-top: 4px;
}

.explorer-open-board-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.explorer-open-board-btn:hover {
    background: #1084d9;
    transform: translateY(-1px);
}

.explorer-open-board-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   5. Status Bar (Row 5 - Bottom)
   ========================================================================== */
.explorer-status-bar {
    height: 30px;
    min-height: 30px;
    background: #1c1c1c;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 11.5px;
    color: #888888;
    gap: 8px;
}

.explorer-status-sep {
    color: #555555;
}

.explorer-view-modes {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.explorer-view-mode-btn {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: #888888;
    cursor: pointer;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.explorer-view-mode-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.explorer-view-mode-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.explorer-view-mode-btn.is-active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* Responsive Rules */
@media (max-width: 900px) {
    .explorer-details-pane { display: none; }
    .explorer-sidebar { width: 180px; min-width: 160px; }
}

@media (max-width: 650px) {
    .explorer-sidebar { display: none; }
    .explorer-window { width: 100vw; height: calc(100vh - 48px); bottom: 48px; border-radius: 0; }
    .explorer-search-box { width: 140px; }
}
