/**
 * Category Menu Modal Component Styles
 * Slide-in Left Modal for Categories
 */

/* Modal Overlay */
.category-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: none;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Modal Panel */
.category-modal-panel {
    background: #fff;
    height: 100%;
    width: 85vw;
    max-width: 340px;
    min-width: 260px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.category-modal-panel.open {
    transform: translateX(0);
}

/* Modal Header */
.category-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(to right, #f8f9fa, #ffffff);
}

.category-modal-header img {
    max-width: 120px;
    height: auto;
}

.category-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-modal-close:hover {
    background: #7A8769;
    color: #fff;
    transform: rotate(90deg);
}

/* Modal Content */
.category-modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.25rem;
}

/* Section Title */
.category-modal-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #7A8769;
    display: inline-block;
}

/* Category List */
.category-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Category Item */
.category-menu-item {
    margin-bottom: 4px;
}

/* Category Link/Button */
.category-menu-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-menu-btn:hover {
    background: #7A8769;
    transform: translateX(4px);
}

.category-menu-btn:hover .category-menu-name,
.category-menu-btn:hover .category-menu-icon {
    color: #fff;
}

/* Category Name */
.category-menu-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-menu-name:hover {
    text-decoration: none;
}

/* Category Icon (chevron) */
.category-menu-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.category-menu-btn[aria-expanded="true"] .category-menu-icon {
    transform: rotate(180deg);
}

/* Subcategory List */
.category-submenu {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0.5rem 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* Subcategory Item */
.category-submenu-item {
    border-bottom: 1px solid #f5f5f5;
}

.category-submenu-item:last-child {
    border-bottom: none;
}

/* Subcategory Link */
.category-submenu-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem 0.6rem 1.5rem;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.category-submenu-link:hover {
    background: #f8f9fa;
    color: #7A8769;
    padding-left: 2rem;
}

.category-submenu-link i {
    font-size: 0.7rem;
    margin-right: 0.5rem;
    color: #ccc;
    transition: color 0.25s ease;
}

.category-submenu-link:hover i {
    color: #7A8769;
}

/* "View All" Link */
.category-submenu-all {
    font-weight: 500;
    color: #7A8769;
    background: #f4f5f2;
}

.category-submenu-all:hover {
    background: #e8edff;
    color: #5a67d8;
}

/* Modal Footer (optional) */
.category-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.category-modal-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: #7A8769;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-modal-footer-link:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(122, 135, 105, 0.4);
    color: #fff;
}

.category-modal-footer-link i {
    margin-right: 0.5rem;
}

/* Scrollbar styling */
.category-modal-content::-webkit-scrollbar {
    width: 6px;
}

.category-modal-content::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.category-modal-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.category-modal-content::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Animation for subcategories */
.category-submenu.collapsing {
    transition: height 0.3s ease;
}

/* Badge for subcategory count */
.category-count-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: #e9ecef;
    color: #666;
    border-radius: 20px;
    margin-left: 0.5rem;
}

.category-menu-btn:hover .category-count-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Additional Navigation Links Section */
.category-modal-nav-links {
    padding: 1rem 1.25rem;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}

.category-modal-nav-links .category-modal-title {
    margin-bottom: 0.75rem;
}

/* Navigation Links inside scrollable content */
.category-modal-nav-links-inner {
    margin-top: 0.25rem;
    padding-top: 0;
    border-top: none;
}

.category-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-nav-list li {
    margin-bottom: 2px;
}

.category-nav-list li:last-child {
    margin-bottom: 0;
}

.category-nav-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    background: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.category-nav-link:hover {
    background: #7A8769;
    color: #fff;
    transform: translateX(4px);
    border-color: transparent;
}

.category-nav-link i {
    width: 24px;
    font-size: 1rem;
    margin-right: 0.75rem;
    color: #7A8769;
    transition: color 0.3s ease;
}

.category-nav-link:hover i {
    color: #fff;
}

/* Active state for current page */
.category-nav-link.active {
    background: #7A8769;
    color: #fff;
    border-color: transparent;
}

.category-nav-link.active i {
    color: #fff;
}

/* Expandable Categories Section */
.category-expandable-section {
    margin-top: 0.25rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-bottom: none;
    overflow: hidden;
}

.category-expandable-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-expandable-header:hover {
    background: linear-gradient(135deg, #7A8769 0%, #5d6b50 100%);
    color: #fff;
    transform: translateX(4px);
    border-color: transparent;
}

.category-expandable-header .category-modal-title {
    color: #444;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: none;
    border-bottom: none;
    display: flex;
    align-items: center;
}

.category-expandable-header .category-modal-title i {
    width: 24px;
    font-size: 1rem;
    margin-right: 0.75rem;
    color: #7A8769;
    transition: color 0.3s ease;
}

.category-expandable-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 50%;
    color: #7A8769;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-expandable-header[aria-expanded="true"] .category-expandable-icon {
    transform: rotate(180deg);
}

.category-expandable-header:hover .category-modal-title,
.category-expandable-header:hover .category-modal-title i,
.category-expandable-header:hover .category-expandable-icon {
    color: #fff;
}

.category-expandable-section .category-menu-list {
    padding: 0.75rem;
    margin: 0;
    border-top: 1px solid #f0f0f0;
}

.category-expandable-section .collapse,
.category-expandable-section .collapsing {
    background: #fff;
}

/* Footer inside expandable section */
.category-expandable-footer {
    padding: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.category-expandable-footer .category-modal-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    background: #fff;
    color: #7A8769;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.category-expandable-footer .category-modal-footer-link:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, #7A8769 0%, #5d6b50 100%);
    box-shadow: 0 4px 15px rgba(122, 135, 105, 0.25);
    color: #fff;
    border-color: transparent;
}

.category-expandable-footer .category-modal-footer-link i {
    margin-right: 0.5rem;
}

