/**
 * Filter Bar Styles for Artha Properti.
 */

:root {
    --apt-primary-cyan: #1DB2C9;
    --apt-cyan-hover: #148ea1;
    --apt-midnight-navy: #06323E;
    --apt-steel-blue: #1D4656;
    --apt-border-soft: #E5E7EB;
    --apt-font-heading: 'Montserrat', -apple-system, sans-serif;
    --apt-font-body: 'Lato', -apple-system, sans-serif;
}

.apt-filter-container {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 20px 25px -5px rgba(6, 50, 62, 0.05), 0 8px 10px -6px rgba(6, 50, 62, 0.02);
    border: 1px solid rgba(229, 231, 235, 0.9);
    margin-bottom: 36px;
    font-family: var(--apt-font-body);
}

.apt-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.apt-filter-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    flex-wrap: wrap;
}

.apt-filter-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

input[type=text],
input[type=number],
input[type=search],
input[type=email],
input[type=tel],
select,
textarea {
    border-radius: 12px !important;
}

.apt-filter-tab {
    padding: 10px 20px;
    border: none !important;
    border-radius: 12px !important;
    background: #f3f4f6 !important;
    font-family: var(--apt-font-heading);
    font-size: 13px;
    font-weight: 600;
    color: #4b5563 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
}

.apt-filter-tab:hover,
.apt-filter-tab:focus {
    background: #e5e7eb !important;
    color: var(--apt-midnight-navy) !important;
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
}

.apt-filter-tab:active {
    background: #d1d5db !important;
    color: var(--apt-midnight-navy) !important;
    border: none !important;
    outline: none !important;
}

.apt-filter-tab.active,
.apt-filter-tab.active:hover,
.apt-filter-tab.active:focus,
.apt-filter-tab.active:active {
    background: var(--apt-primary-cyan) !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 2px 4px rgba(29, 178, 201, 0.25);
}

.apt-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 260px;
}

.apt-search-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px !important;
    background: #f9fafb;
    color: #111827;
    font-family: var(--apt-font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.apt-search-input:focus {
    background: #ffffff;
    border-color: var(--apt-primary-cyan);
    box-shadow: 0 0 0 3px rgba(29, 178, 201, 0.2);
}

.apt-filter-count {
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
    white-space: nowrap;
}

.apt-filter-count strong {
    color: var(--apt-midnight-navy);
    font-weight: 700;
}

.apt-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 16px;
    align-items: end;
}

.apt-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.apt-filter-group label {
    font-family: var(--apt-font-heading);
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: none;
    letter-spacing: 0.2px;
}

.apt-filter-select {
    width: 100%;
    height: 44px;
    padding: 0 36px 0 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 12px !important;
    background-color: #f9fafb !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px 16px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    color: #1f2937 !important;
    font-family: var(--apt-font-body);
    font-size: 13px !important;
    outline: none !important;
    transition: all 0.2s ease;
}

.apt-filter-input {
    width: 100%;
    height: 44px;
    padding: 0 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 12px !important;
    background-color: #f9fafb !important;
    color: #1f2937 !important;
    font-family: var(--apt-font-body);
    font-size: 13px !important;
    outline: none !important;
    transition: all 0.2s ease;
}

.apt-filter-select:focus,
.apt-filter-input:focus {
    background-color: #ffffff !important;
    border-color: var(--apt-primary-cyan) !important;
    box-shadow: 0 0 0 3px rgba(29, 178, 201, 0.15) !important;
}

.apt-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.apt-filter-submit {
    height: 44px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--apt-midnight-navy) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-family: var(--apt-font-heading);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    white-space: nowrap;
    outline: none !important;
}

.apt-filter-submit:hover,
.apt-filter-submit:focus,
.apt-filter-submit:active {
    background: var(--apt-steel-blue) !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 4px 6px -1px rgba(6, 50, 62, 0.2);
}

.apt-filter-reset {
    height: 44px;
    width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
}

.apt-filter-reset:hover,
.apt-filter-reset:focus,
.apt-filter-reset:active {
    background: #e5e7eb !important;
    color: var(--apt-midnight-navy) !important;
    border: none !important;
    outline: none !important;
}

@media (max-width: 1024px) {
    .apt-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .apt-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .apt-filter-container {
        padding: 20px;
        border-radius: 20px;
    }

    .apt-filter-top-row {
        flex-direction: column;
        align-items: stretch;
    }

    .apt-search-input-wrap {
        width: 100%;
        min-width: 100%;
    }

    .apt-filter-grid {
        grid-template-columns: 1fr;
    }
}
