﻿/* menu-toggle.css */

/* Container cho menu features - ẩn mặc định */
.features-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    padding: 30px;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    overflow: auto;
}

    .features-container.active {
        display: block;
    }

/* Overlay cho menu - DISABLED to prevent gray overlay issue */
.menu-overlay {
    display: none !important;
}

/* Nút đóng menu */
.close-menu {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f1f1;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

    .close-menu:hover {
        background: #e0e0e0;
    }

/* Menu buttons group */
.menu-buttons-group {
    display: flex;
    gap: 8px;
    margin-left: 20px;
    position: relative;
    z-index: 1;
}

/* Category buttons - Styled like action buttons */
.menu-category-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius-sm, 8px);
    font-size: var(--font-size-md, 14px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.03em;
    box-shadow: none; /* Removed shadow */
    position: relative;
    overflow: hidden;
    color: var(--white, #fff);
}

    .menu-category-btn:hover {
        transform: translateY(-2px);
        box-shadow: none; /* Removed shadow on hover */
    }

    .menu-category-btn:active {
        transform: translateY(0);
        box-shadow: none; /* Removed shadow on active */
    }

    .menu-category-btn.active {
        box-shadow: none; /* Removed shadow on active state */
    }

    /* Category-specific colors matching action button style */
    .menu-category-btn[data-category="minh"] {
        background-color: #36C6EB; /* Light Blue */
    }

        .menu-category-btn[data-category="minh"]:hover {
            background-color: #2BB3D6;
        }

    .menu-category-btn[data-category="fai"] {
        background-color: var(--primary-color); /* Primary Color */
    }

        .menu-category-btn[data-category="fai"]:hover {
            opacity: 0.9;
        }

    .menu-category-btn[data-category="co"] {
        background-color: var(--secondary-color); /* Secondary Color */
    }

        .menu-category-btn[data-category="co"]:hover {
            opacity: 0.9;
        }

    .menu-category-btn[data-category="ve"] {
        background-color: var(--accent-color); /* Accent Color */
    }

        .menu-category-btn[data-category="ve"]:hover {
            opacity: 0.9;
        }

    .menu-category-btn[data-category="goc"] {
        background-color: red; /* Red */
    }

        .menu-category-btn[data-category="goc"]:hover {
            background-color: #E60000;
        }

    .menu-category-btn[data-category="pho"] {
        background-color: #8B5CF6; /* Purple - complements the palette */
    }

        .menu-category-btn[data-category="pho"]:hover {
            background-color: #7C3AED;
        }

    /* Ripple effect on click */
    .menu-category-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .menu-category-btn:active::before {
        width: 300px;
        height: 300px;
    }

/* Feature cards - Hidden by default when in menu */
.features-container .feature-card {
    display: none;
    transition: all 0.3s ease;
}

/* Show feature cards for active category */
.features-container.show-category .feature-card {
    display: none;
}

    .features-container.show-category .feature-card.show {
        display: block;
    }

/* Category title in menu */
.menu-category-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 12px;
}

/* Feature grid adjustments for menu */
.features-container .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

/* Animation for showing cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card.show {
    animation: fadeInUp 0.3s ease forwards;
}

/* Hiệu ứng cho feature cards khi cần highlight */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    }

/* Hiệu ứng highlight cho feature cards */
.feature-highlight::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid transparent;
    border-radius: 10px;
    animation: border-pulse 2s infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes border-pulse {
    0% {
        border-color: rgba(8, 102, 255, 0.7);
        box-shadow: 0 0 0 0 rgba(8, 102, 255, 0.7);
    }

    70% {
        border-color: rgba(8, 102, 255, 0.9);
        box-shadow: 0 0 0 6px rgba(8, 102, 255, 0);
    }

    100% {
        border-color: rgba(8, 102, 255, 0.7);
        box-shadow: 0 0 0 0 rgba(8, 102, 255, 0);
    }
}

/* Hiệu ứng highlight bằng glow */
.feature-glow {
    box-shadow: 0 0 10px rgba(8, 102, 255, 0.7);
}

    .feature-glow:hover {
        box-shadow: 0 5px 15px rgba(8, 102, 255, 0.7);
    }

/* Hiệu ứng rung nhẹ khi hover */
@keyframes slight-shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    50% {
        transform: translateX(0);
    }

    75% {
        transform: translateX(2px);
    }

    100% {
        transform: translateX(0);
    }
}

.feature-shake:hover {
    animation: slight-shake 0.5s ease;
}

/* Hiệu ứng shine - ánh sáng chạy qua */
.feature-shine {
    position: relative;
    overflow: hidden;
}

    .feature-shine::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -60%;
        width: 20%;
        height: 200%;
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(30deg);
        animation: shine-effect 3s infinite;
    }

@keyframes shine-effect {
    0% {
        left: -60%;
    }

    100% {
        left: 160%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .features-container {
        width: 90%;
        padding: 20px 15px;
        max-height: 90vh;
    }

    .menu-buttons-group {
        flex-wrap: wrap;
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }

    .menu-category-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .features-container .feature-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
