/**
 * Viizor Floating Toolbar - Ultra Clean Icons Only
 * NO frames, NO containers, just pure floating icons
 */

/* Floating toolbar - just icons in a column */
.floating-toolbar {
    position: fixed;
    top: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    pointer-events: auto;
}

/* Individual tool buttons - clean floating icons */
.tool-button {
    width: 44px;
    height: 44px;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(64, 64, 64, 0.8);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tool-button:hover {
    background: rgba(74, 158, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
}

.tool-button.active {
    background: #4a9eff;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

/* Output button with content indicator */
.tool-button.has-output {
    background: rgba(74, 158, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
}

/* Tool button container for data with menu */
.tool-button-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Invisible bridge area to keep menu open */
.tool-button-container::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 0;
    width: 12px;
    height: 44px;
    z-index: 1000;
}

/* Measurement menu - horizontal fade in */
.measurement-menu {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Show measurement menu on hover with horizontal fade in */
.tool-button-container:hover .measurement-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* View menu - same as measurement menu */
.view-menu {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Show view menu on hover */
.tool-button-container:hover .view-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Elegant scale effect for pencil */
.tool-button-container:hover > .tool-button {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.25);
}

/* Measurement tool button (points icon) - clean like others */
.measurement-tool {
    width: 44px;
    height: 44px;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(64, 64, 64, 0.8);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.measurement-tool:hover {
    background: rgba(74, 158, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
}

/* View tool button - same as measurement tool */
.view-tool {
    width: 44px;
    height: 44px;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(64, 64, 64, 0.8);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.view-tool:hover {
    background: rgba(74, 158, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
}

/* Clouds menu - horizontal positioning */
.clouds-menu {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1001;
}

/* Show clouds menu on hover */
.tool-button-container:hover .clouds-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Cloud menu items - minimal style */
.cloud-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
    margin-bottom: 4px;
}

.cloud-item:hover {
    color: #4a9eff;
    transform: translateX(2px);
}

.cloud-item i {
    font-size: 14px;
    opacity: 0.6;
}

.cloud-item span {
    white-space: nowrap;
}

/* Point Description Modal - Minimalist */
.point-description-modal,
.vector3d-layer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(64, 64, 64, 0.8);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.description-input,
.layer-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    width: 200px;
    padding: 8px 0;
    outline: none;
    border-bottom: 1px solid rgba(74, 158, 255, 0.5);
    transition: border-color 0.3s ease;
}

.description-input::placeholder,
.layer-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.description-input:focus,
.layer-input:focus {
    border-bottom-color: #4a9eff;
}

/* Output menu - appears below the button */
.output-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1001;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(64, 64, 64, 0.8);
    border-radius: 8px;
    padding: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Show output menu on hover - only if it has content */
.tool-button-container:hover .output-menu.has-content,
.output-menu.has-content:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Show output menu when first vector is created (temporary auto-show) */
.tool-button-container.show-output .output-menu.has-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}


/* Bridge area to keep menu open */
.tool-button-container::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 8px;
    z-index: 1000;
}

/* Output sections */
.output-section {
    margin-bottom: 8px;
}

.output-section:last-child {
    margin-bottom: 0;
}

.output-header {
    padding: 6px 8px 4px 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(64, 64, 64, 0.3);
    margin-bottom: 4px;
}

/* Group items */
.group-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
    border-radius: 4px;
    margin-bottom: 1px;
}

.group-item:hover {
    background: rgba(74, 158, 255, 0.1);
}

/* Clickable group items with expand icon */
.group-item.clickable {
    position: relative;
}

.expand-icon {
    margin-left: auto;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
}

/* Vector group container */
.vector-group-container {
    margin-bottom: 2px;
}

/* Individual vectors list */
.vectors-list {
    margin-left: 16px;
    border-left: 1px solid rgba(74, 158, 255, 0.2);
    padding-left: 8px;
    max-height: 200px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.vectors-list.hidden {
    max-height: 0;
    overflow: hidden;
    padding-left: 0;
    margin-left: 0;
    border-left: none;
}

/* Individual vector items */
.vector-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    border-radius: 3px;
    margin-bottom: 1px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vector-item:hover {
    background: rgba(74, 158, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.vector-color {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vector-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-color {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.group-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.group-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .floating-toolbar {
        bottom: 24px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
    }

    .clouds-menu {
        left: 50%;
        top: calc(-100% - 12px);
        transform: translateX(-50%) translateY(8px);
    }

    .tool-button-container:hover .clouds-menu {
        transform: translateX(-50%) translateY(0);
    }
}