/**
 * Mobile Phone Specifications - Filters CSS
 * Styling for the phone filters feature
 */

/* Filter Container */
.mps-filters-container {
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
    background-color: #f9f9f9;
    overflow: hidden;
    direction: rtl;
}

.mps-filters-toggle {
    padding: 15px 20px;
    background-color: #f0f0f0;
    color: #333;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.mps-filters-toggle:hover {
    background-color: #e8e8e8;
}

.mps-filters-toggle i {
    margin-left: 8px;
    color: #d32f2f;
}

.mps-filters-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fff;
    padding: 0 20px;
}

.mps-filters-container.active .mps-filters-panel {
    max-height: 2000px;
    padding: 20px;
    border-top: 1px solid #e1e1e1;
    transition: max-height 0.5s ease-in;
}

/* Filter Groups */
.mps-filter-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mps-filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.mps-filter-group h4 {
    margin: 0 0 12px;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.mps-filter-group h4 i {
    margin-left: 8px;
    color: #d32f2f;
    font-size: 18px;
}

/* Filter Options */
.mps-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Radio Buttons */
.mps-filter-radio {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mps-filter-radio label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 5px;
}

.mps-filter-radio input[type="radio"] {
    margin-left: 8px;
    accent-color: #d32f2f;
}

/* Checkboxes */
.mps-filter-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mps-filter-checkbox label {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mps-filter-checkbox label:hover {
    background-color: #efefef;
}

.mps-filter-checkbox input[type="checkbox"] {
    margin-left: 8px;
    accent-color: #d32f2f;
}

.mps-filter-checkbox input[type="checkbox"]:checked + label {
    background-color: #ffebee;
    border-color: #d32f2f;
}

/* Select Dropdowns */
.mps-filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
}

.mps-filter-select:focus {
    border-color: #d32f2f;
    outline: none;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

/* Filter Actions */
.mps-filter-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.mps-filter-actions button {
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    border: none;
}

.mps-filter-actions button i {
    margin-left: 6px;
    font-size: 18px;
}

.mps-apply-filters {
    background-color: #d32f2f;
    color: white;
}

.mps-apply-filters:hover {
    background-color: #b71c1c;
}

.mps-reset-filters {
    background-color: #f5f5f5;
    color: #666;
}

.mps-reset-filters:hover {
    background-color: #e0e0e0;
}

/* Filtered Results Section */
.mps-filtered-phones-container {
    margin: 20px 0;
}

.mps-filtered-phones-heading {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.mps-filtered-phones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.mps-filtered-phone-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mps-filtered-phone-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.mps-filtered-phone-image {
    height: 150px;
    display: block;
    position: relative;
    overflow: hidden;
    background-color: #f9f9f9;
}

.mps-filtered-phone-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.mps-filtered-phone-item:hover .mps-filtered-phone-image img {
    transform: scale(1.05);
}

.mps-filtered-phone-info {
    padding: 12px;
    position: relative;
}

.mps-filtered-phone-title {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    text-decoration: none;
    line-height: 1.3;
    height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mps-filtered-phone-add {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #d32f2f;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mps-filtered-phone-add:hover {
    background-color: #b71c1c;
}

.mps-filtered-phone-add.added {
    background-color: #757575;
}

.mps-filtered-phone-add.added:hover {
    background-color: #616161;
}

.mps-filtered-phone-add i {
    font-size: 18px;
}

/* Loading State */
.mps-filtered-phones-loading {
    padding: 30px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* No Results */
.mps-filtered-no-results {
    padding: 30px;
    text-align: center;
    color: #666;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .mps-filter-options {
        flex-direction: column;
    }
    
    .mps-filtered-phones-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* Active Filters Badge */
.mps-active-filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #d32f2f;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: 6px;
} 