﻿/* FLOATING SIDEBAR DOCK */
#floating-dock {
    position: fixed;
    top: 50%;
    right: 20px;
    width: 60px;
    background: var(--header-bg);
    border: 1px solid var(--grid-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 10px 0;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    height: auto;
}

#floating-dock:not(.dragging):hover {
    width: 160px;
    align-items: stretch;
}

#floating-dock.dragging {
    width: 160px;
    align-items: stretch;
    cursor: grabbing;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    transition: none !important;
}

#floating-dock.dragging .dock-label {
    opacity: 1;
}

.dock-handle {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.05);
    cursor: grab;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--grid-color);
    margin-bottom: 5px;
    flex-shrink: 0;
}

.dock-handle:active {
    cursor: grabbing;
}

.dock-handle-icon {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--grid-color);
}

.dock-handle:hover .dock-handle-icon {
    background: var(--accent-color);
}

.dock-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 5px 0;
    flex-shrink: 0;
}

.dock-item {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 18px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: var(--text-color);
    white-space: nowrap;
}

.dock-item:hover {
    background: rgba(128, 128, 128, 0.1);
}

.dock-item.active {
    color: var(--accent-color);
    position: relative;
}

.dock-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 4px;
    background: var(--accent-color);
    border-radius: 0 4px 4px 0;
}

.dock-label {
    margin-left: 15px;
    opacity: 0;
    transition: opacity 0.2s 0.1s;
    font-size: 0.95rem;
    font-weight: 500;
}

#floating-dock:not(.dragging):hover .dock-label {
    opacity: 1;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    font-size: 0.85rem;
}

.control-group input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}

.toggle-icon {
    padding: 5px;
    border: 1px solid var(--grid-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
}

.toggle-icon.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}


/* Icon styling for img elements */
.dock-item img.icon {
    opacity: 0.7;
    transition: opacity 0.2s, filter 0.3s;
}

.dock-item:hover img.icon,
.dock-item.active img.icon {
    opacity: 1;
}

/* Invert icon colors for dark themes */
body.dark-mode .dock-item img.icon,
body.midnight-mode .dock-item img.icon {
    filter: invert(1) brightness(1.2);
}
