/**
 * Selection Studio — Explorer Sidebar
 * Location: /studio/css/explorer.css
 */

.timeline-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px;
    background: var(--bg-panel, #121a21);
}

#cms-blocks-list {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: visible;
}

.studio-identity-anchor {
    display: flex;
    align-items: center;
    gap: var(--space-3, 12px);
    flex: 0 0 auto;
    width: 100%;
    margin-top: var(--space-3, 12px);
    padding: var(--space-3, 12px) var(--space-1, 4px) var(--space-1, 4px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--studio-text-accent);
}

.studio-identity-anchor__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--color-accent-soft, rgba(212, 180, 131, 0.1));
    color: var(--studio-text-accent);
    font-size: var(--studio-type-ui-label-size);
    font-weight: var(--studio-font-weight-label);
}

.studio-identity-anchor__avatar img { width: 100%; height: 100%; object-fit: cover; }
.studio-identity-anchor__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-identity-anchor__button { display:flex; align-items:center; gap:var(--space-3,12px); width:100%; padding:0; border:0; background:none; color:inherit; text-align:left; cursor:pointer; font:inherit; }
.studio-identity-anchor__copy { display:grid; min-width:0; gap:2px; }
.studio-identity-anchor__role { color:var(--studio-text-muted); font-size:11px; text-transform:capitalize; }
.studio-profile-panel { position:fixed; left:20px; bottom:20px; z-index:80; width:min(360px,calc(100vw - 40px)); max-height:calc(100dvh - 40px); overflow-y:auto; padding:20px; border:1px solid rgba(255,255,255,.12); border-radius:12px; background:var(--bg-panel,#121a21); box-shadow:0 20px 60px rgba(0,0,0,.4); }
.studio-profile-panel__head { position:sticky; top:-20px; z-index:1; display:flex; justify-content:space-between; align-items:center; min-height:44px; margin-bottom:16px; background:var(--bg-panel,#121a21); }
.studio-profile-panel__head h2 { margin:0; color:var(--studio-text-primary); font-size:20px; }
.studio-profile-panel__head button { flex:0 0 44px; min-height:44px; border:0; background:none; color:var(--studio-text-muted); font-size:22px; cursor:pointer; }
.studio-profile-panel__body { display:grid; gap:12px; }
.studio-profile-panel__body label { display:grid; gap:6px; color:var(--studio-text-muted); font-size:12px; }
.studio-profile-panel__body input, .studio-profile-panel__body select { width:100%; min-height:40px; padding:8px 10px; border:1px solid var(--color-border-default); border-radius:6px; background:var(--color-bg-input); color:var(--studio-text-primary); font:inherit; }
.studio-profile-panel__photo { display:flex; align-items:center; gap:10px; }
.studio-profile-panel__photo-action, .studio-profile-panel__photo button { color:var(--studio-text-accent); cursor:pointer; }
.studio-profile-panel__photo > button { border:0; background:none; color:var(--studio-text-muted); cursor:pointer; }
.studio-profile-panel__save { min-height:40px; border:1px solid var(--studio-gold,#d4b483); border-radius:6px; background:transparent; color:var(--studio-text-accent); cursor:pointer; }
.studio-profile-panel__logout { margin-top:8px; padding-top:12px; border-top:1px solid var(--color-border-default); }
.studio-profile-panel__logout button { border:0; background:none; padding:0; color:var(--studio-text-muted); cursor:pointer; }
.studio-profile-panel__body [data-profile-error] { min-height:1.2em; margin:0; color:#efaaa0; }

.explorer-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.explorer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    min-height: 48px;
    padding: 4px 4px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.explorer-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--muted, rgba(255, 255, 255, 0.4));
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.explorer-title {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 670;
    letter-spacing: -0.015em;
}

.explorer-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    font-weight: 600;
}

/* Tree list container — Uklonjen stari padding od 99px! */
.explorer-tree {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

/* Individual Tree Nodes */
.explorer-node {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    /* 👈 Zategnuto na kompaktnih 40px */
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font: inherit;
    text-align: left;
    cursor: pointer;
    user-select: none;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.explorer-node:hover {
    background: rgba(255, 255, 255, 0.035);
}

.explorer-node.is-active {
    background: rgba(212, 180, 131, 0.08);
    border-color: rgba(212, 180, 131, 0.25);
    color: #ffffff;
}

.explorer-foundation-node {
    margin-bottom: 4px;
}

.explorer-node-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.explorer-node-index {
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    font-family: monospace;
    font-weight: 600;
}

.explorer-node-icon {
    color: var(--gold, #d4b483);
    font-size: 13px;
}

.explorer-node-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.explorer-node-title {
    overflow: hidden;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-node.is-active .explorer-node-title {
    color: #ffffff;
    font-weight: 600;
}

.explorer-node-meta {
    font-size: 10px;
    color: var(--muted, rgba(255, 255, 255, 0.4));
}

.explorer-node-fixed {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold, #d4b483);
    padding: 2px 6px;
    background: rgba(212, 180, 131, 0.1);
    border-radius: 4px;
}

.explorer-drag-handle {
    color: rgba(255, 255, 255, 0.2);
    font-size: 12px;
    cursor: grab;
    padding: 0 4px;
}

.explorer-capsule-node:hover .explorer-drag-handle {
    color: rgba(255, 255, 255, 0.5);
}

.explorer-capsule-node.is-dragging {
    opacity: 0.4;
}

.explorer-archive-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease;
}

.explorer-capsule-node:hover .explorer-archive-button {
    color: rgba(255, 255, 255, 0.5);
}

.explorer-archive-button:hover {
    background: rgba(255, 105, 97, 0.15);
    color: #ff6961;
}

/* Drag Drop Zones */
.explorer-drop-zone {
    height: 4px;
    position: relative;
    margin: 2px 0;
}

.explorer-drop-zone.is-active::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--gold, #d4b483);
    border-radius: 999px;
}

.explorer-empty-state {
    padding: 32px 16px;
    text-align: center;
    color: var(--muted, rgba(255, 255, 255, 0.4));
    font-size: 12px;
}
