/* Enhanced floating-menu.css */
.floating-menu-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999; /* Ensure it's above other elements but below modals */
}

.floating-menu-button {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: var(--primary-color, #ff6700);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000; /* Higher than container */
}

.floating-menu-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.floating-menu-button:active {
    transform: scale(0.95);
}

.floating-menu {
    position: fixed;
    /* Top and right positioning will be set by JS */
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    z-index: 9999;
    overflow: hidden; /* Ensure contents don't overflow */
}

.floating-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: var(--primary-color-light-bg, rgba(255, 103, 0, 0.05));
}

.menu-header h3 {
    margin: 0;
    color: var(--primary-color, #ff6700);
    font-size: 16px;
    font-weight: 600;
}

.close-menu {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.close-menu:hover {
    color: var(--primary-color, #ff6700);
}

.menu-items {
    padding: 10px 0;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    /* Improve scrollbar appearance */
    scrollbar-width: thin;
    scrollbar-color: var(--gray-medium, #cccccc) transparent;
}

.menu-items::-webkit-scrollbar {
    width: 6px;
}

.menu-items::-webkit-scrollbar-track {
    background: transparent;
}

.menu-items::-webkit-scrollbar-thumb {
    background-color: var(--gray-medium, #cccccc);
    border-radius: 6px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 12px;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: var(--primary-color-light-bg, rgba(255, 103, 0, 0.05));
    color: var(--primary-color, #ff6700);
}

.menu-item.active {
    background: var(--primary-color-light-bg, rgba(255, 103, 0, 0.1));
    color: var(--primary-color, #ff6700);
    border-left: 3px solid var(--primary-color, #ff6700);
    font-weight: 500;
}

/* Stijl voor menu-knoppen (zoals de uitlogknop) */
.menu-button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    outline: none;
}

.menu-button:hover {
    background: var(--primary-color-light-bg, rgba(255, 103, 0, 0.05));
    color: var(--primary-color, #ff6700);
}

/* Speciale stijl voor de uitlogknop */
#logout-button {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    color: #e74c3c; /* Rood voor uitlog actie */
}

#logout-button:hover {
    background: rgba(231, 76, 60, 0.15);
}

.menu-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    transition: transform 0.2s ease;
}

.menu-item:hover .menu-icon {
    transform: scale(1.1);
}

.hidden {
    display: none !important;
}

/* Animation for menu opening */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation for menu button */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-menu {
        position: fixed;
        top: 70px !important; /* Override JS positioning */
        right: 10px !important; /* Override JS positioning */
        left: 10px;
        width: auto;
        max-width: calc(100% - 20px);
    }
    
    .floating-menu-button {
        top: 10px;
        right: 10px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .floating-menu {
        background: #2d2d2d;
        border: 1px solid #3d3d3d;
    }

    .menu-header {
        border-bottom-color: #3d3d3d;
        background-color: rgba(255, 103, 0, 0.15);
    }

    .menu-header h3 {
        color: var(--primary-color, #ff6700);
    }

    .menu-item {
        color: #fff;
    }

    .menu-item:hover {
        background: #3d3d3d;
    }

    .menu-item.active {
        background: rgba(255, 103, 0, 0.2);
    }

    .close-menu {
        color: #fff;
    }
    
    #logout-button {
        border-top-color: #3d3d3d;
    }
    
    #logout-button:hover {
        background: rgba(231, 76, 60, 0.15);
    }
}

/* Floating Meditation Icon */
.floating-meditation-container {
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 9998; /* Below main floating menu but above content */
}

.floating-meditation-button {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
    overflow: hidden;
}

.floating-meditation-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floating-meditation-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-meditation-button:hover::before {
    opacity: 1;
}

.floating-meditation-button:active {
    transform: scale(0.95);
}

.floating-meditation-button.active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    animation: meditation-pulse 2s infinite;
}

.meditation-icon {
    transition: transform 0.3s ease;
}

.floating-meditation-button:hover .meditation-icon {
    transform: rotate(10deg) scale(1.1);
}

@keyframes meditation-pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(76, 175, 80, 0.4);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

/* Mobile responsive for meditation button */
@media (max-width: 768px) {
    .floating-meditation-container {
        bottom: 120px; /* Above mobile navigation if any */
        right: 15px;
    }
    
    .floating-meditation-button {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}