/* Observatory Dock Styles */
/* Auto-hiding bottom dock with icon magnification */

#dock {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% - 8px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-dock);
    padding: 0;
}

#dock.visible {
    transform: translateX(-50%) translateY(0);
}

#dock.permanent {
    transform: translateX(-50%) translateY(0);
}

.dock-container {
    position: relative;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--spacing-md) var(--spacing-xl);
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-md);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

.dock-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 40px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px 4px 0 0;
    cursor: pointer;
}

.dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dock-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Glossy Apple-style icon container */
.dock-icon-glossy {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 22%;
    /* Squircle shape */
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 -2px 6px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Icon symbol inside */
.icon-symbol {
    width: 60%;
    height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.icon-symbol svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Glossy highlight overlay */
.glossy-overlay {
    position: absolute;
    top: 8%;
    left: 10%;
    right: 10%;
    height: 35%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 100%);
    border-radius: 40% 40% 50% 50% / 60% 60% 40% 40%;
    pointer-events: none;
    z-index: 3;
}

.dock-item:hover .dock-icon {
    transform: scale(1.35) translateY(-12px);
}

.dock-item:hover .dock-icon-glossy {
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 -2px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 6px rgba(255, 255, 255, 0.3);
}

.dock-item:active .dock-icon {
    transform: scale(1.25) translateY(-8px);
}

/* Legacy SVG/PNG support (remove after migration) */
.dock-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease;
}

/* PNG dock icons */
.dock-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    transition: transform 0.2s ease;
}

.dock-label {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.dock-item:hover .dock-label {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Dock hover area trigger */
#dock-trigger {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    z-index: calc(var(--z-dock) - 1);
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .dock-container {
        padding: var(--spacing-sm) var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .dock-icon {
        width: 40px;
        height: 40px;
    }

    .dock-icon svg {
        width: 24px;
        height: 24px;
    }
}