/**
 * JT WooCommerce Category Widget Styles
 * Matches the design of sakeyoi.mjitec.tw
 */

.jt-woo-category-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.jt-woo-category-widget .widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #005d97;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.jt-woo-category-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.jt-woo-category-separator {
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 4px,
        #d0d0d0 4px,
        #d0d0d0 8px
    );
    margin: 8px 0;
}

.jt-woo-category-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    text-decoration: none;
    color: #005d97 !important;
    font-size: 14px;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 0;
    position: relative;
}

.jt-woo-category-item * {
    color: #005d97 !important;
}

.jt-woo-category-item:hover {
    background-color: #f5f5f5;
    color: #005d97;
}

.jt-woo-category-item.jt-woo-category-all {
    font-weight: 500;
}

.jt-woo-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    color: #005d97;
    flex-shrink: 0;
}

.jt-woo-category-icon svg {
    width: 16px;
    height: 16px;
}

.jt-woo-category-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    color: #005d97;
    flex-shrink: 0;
    transition: color 0.2s ease;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.jt-woo-category-arrow:hover {
    color: #004a7a;
}

.jt-woo-category-arrow-plus,
.jt-woo-category-arrow-minus {
    /* Styles for + and - symbols */
}

.jt-woo-category-item.jt-woo-category-has-children {
    cursor: default;
}

.jt-woo-category-item.jt-woo-category-has-children .jt-woo-category-text {
    cursor: pointer;
}

/* Arrow direction is controlled by JavaScript, not CSS transform */

.jt-woo-category-text {
    flex: 1;
    line-height: 1.5;
    color: #005d97 !important;
}

.jt-woo-category-wrapper {
    position: relative;
}

.jt-woo-category-children {
    display: none;
    padding-left: 0;
    margin-top: 2px;
    background-color: #f8f8f8;
    border-radius: 4px;
    padding: 4px 0;
    margin-left: 28px;
}

.jt-woo-category-children.expanded {
    display: block;
}

.jt-woo-category-item.jt-woo-category-child {
    padding: 8px 12px 8px 28px;
    font-size: 13px;
    color: #005d97 !important;
    background-color: transparent;
}

.jt-woo-category-item.jt-woo-category-child .jt-woo-category-text {
    color: #005d97 !important;
}

.jt-woo-category-item.jt-woo-category-child:hover {
    background-color: #eeeeee;
    color: #005d97;
}

/* Active state for current category */
.jt-woo-category-item.current-category {
    background-color: #e8f4f8;
    font-weight: 500;
    color: #005d97;
}

.jt-woo-category-item.current-category .jt-woo-category-arrow,
.jt-woo-category-item.current-category .jt-woo-category-icon {
    color: #005d97;
}

/* Responsive design */
@media (max-width: 768px) {
    .jt-woo-category-item {
        padding: 12px 10px;
        font-size: 15px;
    }
    
    .jt-woo-category-children {
        margin-left: 20px;
    }
    
    .jt-woo-category-item.jt-woo-category-child {
        padding: 10px 12px 10px 28px;
    }
}

/* Smooth animations */
.jt-woo-category-children {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

