/* FloatingGlassPanel Component Styles */

.floating-glass-panel {
    --panel-top-offset: 80px; /* Default, can be overridden via JS */

    position: fixed;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Position variants */
.floating-glass-panel.position-top-right {
    top: var(--panel-top-offset);
    right: 24px;
    transform: translateY(-20px);
}

.floating-glass-panel.position-top-left {
    top: var(--panel-top-offset);
    left: 24px;
    transform: translateY(-20px);
}

.floating-glass-panel.position-top-center {
    top: var(--panel-top-offset);
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
}

.floating-glass-panel.position-bottom-right {
    bottom: 24px;
    right: 24px;
    transform: translateY(20px);
}

.floating-glass-panel.position-bottom-left {
    bottom: 24px;
    left: 24px;
    transform: translateY(20px);
}

.floating-glass-panel.position-bottom-center {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
}

/* Visible state */
.floating-glass-panel.visible {
    opacity: 1;
    pointer-events: auto;
}

.floating-glass-panel.visible.position-top-right,
.floating-glass-panel.visible.position-top-left {
    transform: translateY(0);
}

.floating-glass-panel.visible.position-top-center {
    transform: translateX(-50%) translateY(0);
}

.floating-glass-panel.visible.position-bottom-right,
.floating-glass-panel.visible.position-bottom-left {
    transform: translateY(0);
}

.floating-glass-panel.visible.position-bottom-center {
    transform: translateX(-50%) translateY(0);
}

/* Glass content styling */
.floating-glass-content {
    padding: 12px 16px;
    border-radius: 12px;

    /* Glass morphism effect */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Button enhancements inside the panel */
.floating-glass-content .e-btn.e-primary {
    font-weight: 600;
    padding: 10px 24px;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
    transition: all 0.2s ease;
}

.floating-glass-content .e-btn.e-primary:hover {
    box-shadow: 0 6px 16px rgba(0, 120, 212, 0.4);
    transform: translateY(-1px);
}

.floating-glass-content .e-btn.e-outline {
    background: rgba(255, 255, 255, 0.5);
}

/* Multiple buttons layout */
.floating-glass-content .button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .floating-glass-content {
        background: rgba(30, 30, 30, 0.85);
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 2px 8px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(59, 130, 246, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .floating-glass-content .e-btn.e-primary {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    }

    .floating-glass-content .e-btn.e-primary:hover {
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
    }

    .floating-glass-content .e-btn.e-outline {
        background: rgba(255, 255, 255, 0.08);
    }
}

[data-theme="dark"] .floating-glass-content {
    background: rgba(30, 30, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .floating-glass-content .e-btn.e-primary {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .floating-glass-content .e-btn.e-primary:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
}

[data-theme="dark"] .floating-glass-content .e-btn.e-outline {
    background: rgba(255, 255, 255, 0.08);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-glass-panel.position-top-right {
        right: 16px;
    }

    .floating-glass-panel.position-top-left {
        left: 16px;
    }

    .floating-glass-panel.position-bottom-right {
        right: 16px;
    }

    .floating-glass-panel.position-bottom-left {
        left: 16px;
    }

    .floating-glass-content {
        padding: 10px 14px;
    }

    .floating-glass-content .e-btn.e-primary {
        padding: 8px 16px;
        font-size: 14px;
    }
}
