/* WooCommerce Attribute Filter Widget Styles */

.wcaf-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

/* Modern Style */
.wcaf-style-modern {
  
}

.wcaf-style-modern .wcaf-step h4 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.wcaf-style-modern .wcaf-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wcaf-style-modern .wcaf-option:hover {
    background: #e0fbdb;
    border-color: #4c983f33;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.wcaf-style-modern .wcaf-option.wcaf-selected {
    background: #4c983f;
    border-color: #4c983f;
    color: white;
}

.wcaf-style-modern .wcaf-back-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcaf-style-modern .wcaf-back-btn:hover {
    background: #5a6268;
}

.wcaf-style-modern .wcaf-archive-link {
    background: #4c983f;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    padding: 9px 3px 13px 3px;
    display: inline-block;
    font-weight: 500;
    transition: background 0.3s ease;
    text-align: center;
    font-size: 22px;
    line-height: 1;
    width: 100%;
}

.wcaf-style-modern .wcaf-archive-link:hover {
    background: #218838;
    color: white;
}

/* Classic Style */
.wcaf-style-classic {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 20px;
}

.wcaf-style-classic .wcaf-step h4 {
    color: #333;
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 15px 0;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.wcaf-style-classic .wcaf-option {
    background: white;
    border: 1px solid #ccc;
    padding: 10px 15px;
    margin: 5px 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wcaf-style-classic .wcaf-option:hover {
    background: #f0f0f0;
}

.wcaf-style-classic .wcaf-option.wcaf-selected {
    background: #0073aa;
    color: white;
    border-color: #005a87;
}

.wcaf-style-classic .wcaf-back-btn {
    background: #666;
    color: white;
    border: 1px solid #555;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
}

.wcaf-style-classic .wcaf-back-btn:hover {
    background: #555;
}

.wcaf-style-classic .wcaf-archive-link {
    background: #0073aa;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    display: inline-block;
    border: 1px solid #005a87;
}

.wcaf-style-classic .wcaf-archive-link:hover {
    background: #005a87;
    color: white;
}

/* Minimal Style */
.wcaf-style-minimal {
    background: transparent;
    padding: 15px;
}

.wcaf-style-minimal .wcaf-step h4 {
    color: #666;
    font-size: 14px;
    font-weight: normal;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wcaf-style-minimal .wcaf-option {
    background: transparent;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
    margin: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.wcaf-style-minimal .wcaf-option:hover {
    color: #0073aa;
}

.wcaf-style-minimal .wcaf-option.wcaf-selected {
    color: #0073aa;
    font-weight: bold;
    border-bottom-color: #0073aa;
}

.wcaf-style-minimal .wcaf-back-btn {
    background: transparent;
    color: #666;
    border: none;
    padding: 5px 0;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
}

.wcaf-style-minimal .wcaf-back-btn:hover {
    color: #333;
}

.wcaf-style-minimal .wcaf-archive-link {
    background: transparent;
    color: #0073aa;
    text-decoration: none;
    padding: 5px 0;
    display: inline-block;
    border-bottom: 1px solid #0073aa;
}

.wcaf-style-minimal .wcaf-archive-link:hover {
    color: #005a87;
    border-bottom-color: #005a87;
}

/* Common Styles */
.wcaf-steps {
    margin-bottom: 20px;
}

.wcaf-step {
    display: none;
}

.wcaf-step.wcaf-active {
    display: block;
}

.wcaf-options {
    max-height: 300px;
    overflow-y: auto;
}

.wcaf-option {
    user-select: none;
}

.wcaf-option-count {
    font-size: 12px;
    opacity: 0.7;
}

.wcaf-navigation {
    margin: 15px 0;
}

.wcaf-back-icon {
    font-size: 16px;
}

.wcaf-result {

}

.wcaf-selected-path {
    font-weight: bold;
    margin: 20px 0px 20px 0px;
    line-height: 1.2;
 
}

.wcaf-result-buttons {
    display: flex    ;
        gap: 18px;
        flex-wrap: wrap;
        justify-content: center;
}

.wcaf-btn-secondary {
    background: #a1a1a1;
    color: white;
    border: 1px solid #a1a1a1;
    width: 100%;
    padding: 7px;
}

.wcaf-btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.wcaf-final-option {
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcaf-final-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wcaf-no-options {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.wcaf-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.wcaf-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: wcaf-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes wcaf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wcaf-widget {
        padding: 15px;
    }
    
    .wcaf-style-modern {
        padding: 16px;
        border-radius: 8px;
    }
    
    .wcaf-style-modern .wcaf-option {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .wcaf-step h4 {
        font-size: 16px;
    }
}

/* WooCommerce Compatibility */
.woocommerce .wcaf-widget {
    margin-bottom: 30px;
}

.woocommerce .wcaf-style-modern {

}

/* Accessibility */
.wcaf-option:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.wcaf-back-btn:focus,
.wcaf-archive-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wcaf-option {
        border-width: 2px;
    }
    
    .wcaf-option.wcaf-selected {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wcaf-option,
    .wcaf-back-btn,
    .wcaf-archive-link {
        transition: none;
    }
    
    .wcaf-loading::after {
        animation: none;
    }
}
