/**
 * WooCommerce City Area Filter Frontend Styles
 */

/* Filter container */
.wc-city-area-filter {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f7f7f7;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wc-city-area-filter h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

/* Filter form */
.wc-city-area-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.wc-city-area-filter-form .filter-row {
    flex: 1;
    min-width: 200px;
    margin-bottom: 10px;
}

.wc-city-area-filter-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.wc-city-area-filter-form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
}

.wc-city-area-filter-form button {
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.wc-city-area-filter-form button:hover {
    background-color: #45a049;
}

.wc-city-area-filter-form .reset-filter {
    display: inline-block;
    margin-left: 10px;
    color: #666;
    text-decoration: none;
}

.wc-city-area-filter-form .reset-filter:hover {
    text-decoration: underline;
}

/* Menu filter */
.wc-city-area-filter-menu-item {
    position: relative;
}

.wc-city-area-filter-menu-item .sub-menu {
    min-width: 200px;
}

.wc-city-area-filter-menu-item .area-submenu {
    left: 100%;
    top: 0;
}

/* Loading spinner */
.wc-city-area-filter-loading {
    position: relative;
    min-height: 200px;
}

.wc-city-area-filter-loading:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.wc-city-area-filter-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive styles */
@media (max-width: 768px) {
    .wc-city-area-filter-form {
        flex-direction: column;
    }
    
    .wc-city-area-filter-form .filter-row {
        width: 100%;
    }
}