﻿/* Sneaker Filter Component Styles */

.size-tips {
    line-height: 1.3;
}

.size-container-hidden {
    display: none !important;
    transition: opacity 0.3s ease;
}

/* Size filter transitions */
#uk-size-container,
#eur-size-container,
#special-size-container {
    transition: opacity 0.3s ease, transform 0.2s ease;
}

/* Enhanced visual feedback for size inputs */
.size-filter-active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Women's toggle styling - Now wider and positioned above */
#womens-toggle-container {
    transition: opacity 0.3s ease;
}

/* Modern toggle switch for women's sizing - CLEANER VERSION */
.womens-toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.womens-toggle-label-text {
    margin-bottom: 4px;
    font-weight: 500;
}

.womens-toggle-label {
    position: relative;
    display: inline-block;
    width: 100px; /* Narrower since we only show one text at a time */
    height: 32px;
    background-color: #007bff;
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.womens-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
}

.womens-toggle-text {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    user-select: none;
}

.toggle-text-mens,
.toggle-text-womens {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.2s ease;
    z-index: 1;
}

/* Men's text positioning - appears on the right */
.toggle-text-mens {
    right: 12px;
}

/* Women's text positioning - appears on the left */
.toggle-text-womens {
    left: 12px;
}

/* Default state (Men's selected) */
.womens-toggle-input:not(:checked) + .womens-toggle-label {
    background-color: #007bff;
}

    .womens-toggle-input:not(:checked) + .womens-toggle-label .womens-toggle-slider {
        transform: translateX(0);
    }

    /* Show Men's text, hide Women's text */
    .womens-toggle-input:not(:checked) + .womens-toggle-label .toggle-text-mens {
        opacity: 1;
        transform: translateX(0);
    }

    .womens-toggle-input:not(:checked) + .womens-toggle-label .toggle-text-womens {
        opacity: 0;
        transform: translateX(-10px);
    }

/* Women's selected state */
.womens-toggle-input:checked + .womens-toggle-label {
    background-color: #e91e63;
}

    .womens-toggle-input:checked + .womens-toggle-label .womens-toggle-slider {
        transform: translateX(68px); /* Adjusted for narrower toggle */
    }

    /* Hide Men's text, show Women's text */
    .womens-toggle-input:checked + .womens-toggle-label .toggle-text-mens {
        opacity: 0;
        transform: translateX(10px);
    }

    .womens-toggle-input:checked + .womens-toggle-label .toggle-text-womens {
        opacity: 1;
        transform: translateX(0);
    }

/* Hover effects */
.womens-toggle-label:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.womens-toggle-input:not(:checked) + .womens-toggle-label:hover {
    background-color: #0056b3;
}

.womens-toggle-input:checked + .womens-toggle-label:hover {
    background-color: #c2185b;
}

/* Dynamic tips container */
#dynamic-tips {
    min-height: 2.5rem;
    transition: all 0.3s ease;
}

/* Size description styling */
#size-description {
    font-style: italic;
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .size-tips {
        font-size: 0.75rem;
    }

    #dynamic-tips {
        min-height: auto;
    }

    /* Adjust toggle for mobile */
    .womens-toggle-wrapper {
        align-items: center;
    }

    .womens-toggle-label {
        width: 90px;
        height: 28px;
    }

    .womens-toggle-slider {
        width: 22px;
        height: 22px;
        top: 3px;
        left: 3px;
    }

    .womens-toggle-input:checked + .womens-toggle-label .womens-toggle-slider {
        transform: translateX(65px);
    }

    .womens-toggle-text {
        font-size: 0.7rem;
    }

    .toggle-text-mens {
        right: 10px;
    }

    .toggle-text-womens {
        left: 10px;
    }

    /* Stack toggle below description on mobile */
    #womens-toggle-container {
        order: 2;
        margin-top: 15px;
    }

        #womens-toggle-container .d-flex {
            justify-content: center !important;
        }
}

@media (max-width: 576px) {
    .womens-toggle-label {
        width: 80px;
        height: 26px;
    }

    .womens-toggle-slider {
        width: 20px;
        height: 20px;
    }

    .womens-toggle-input:checked + .womens-toggle-label .womens-toggle-slider {
        transform: translateX(57px);
    }

    .womens-toggle-text {
        font-size: 0.65rem;
    }

    .toggle-text-mens {
        right: 8px;
    }

    .toggle-text-womens {
        left: 8px;
    }
}

/* Focus states for better accessibility */
#category-select:focus + * #uk-size-container,
#category-select:focus + * #eur-size-container,
#category-select:focus + * #special-size-container {
    transform: translateY(-1px);
}

/* Size input group styling */
.input-group-sm .input-group-text {
    font-weight: 600;
    color: #6c757d;
}

/* Animated size suffix */
#size-suffix {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.size-suffix-youth {
    background-color: #0dcaf0;
    color: white;
}

.size-suffix-child {
    background-color: #fd7e14;
    color: white;
}

/* Focus state for toggle */
.womens-toggle-input:focus + .womens-toggle-label {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Enhanced visual separation for size filter sections */
.card-body .row.mb-3 {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 12px;
}
