/* ===========================================
   Properties Page Custom CSS
   Moved from inline <style> to separate file 
   to avoid Vue.js template conflicts
   =========================================== */

/* Mobile-first responsive design */
.search-box-wrap-v2 {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-box-header {
    text-align: center;
    margin-bottom: 1rem;
}

.search-box-header h3 {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.search-box-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    color: #34495e;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    display: block;
}

.form-control,
.form-select {
    height: 50px;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    border: 2px solid #e9ecef;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #343a40;
    box-shadow: 0 0 0 0.25rem rgba(52, 58, 64, .15);
    outline: none;
}

/* Mobile-optimized property type buttons */
.property-type-buttons {
    margin: 1.5rem 0;
    text-align: center;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-type {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
    background: #fff;
    color: #495057;
    min-width: 120px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-type:hover,
.btn-type:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-type.btn-primary {
    background: #343a40;
    border-color: #343a40;
    color: #fff;
}

/* Advanced filters with mobile-friendly collapse */
.advanced-filters-toggler {
    text-align: center;
    margin-bottom: 1rem;
}

.advanced-filters-toggler .btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border: 2px solid #6c757d;
    background: #fff;
    color: #6c757d;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.advanced-filters-toggler .btn:hover {
    background: #6c757d;
    color: #fff;
    transform: translateY(-1px);
}

.advanced-filters-body {
    padding: 1rem;
    background-color: #fff;
    border-top: 3px solid #343a40;
    border-radius: 0 0 0.5rem 0.5rem;
    margin-top: 0.5rem;
}

/* Mobile-optimized search actions */
.search-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-direction: column;
}

.search-actions .btn {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
}

.search-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-clear-filters {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-clear-filters:hover {
    background: #c82333;
    border-color: #bd2130;
}

.location-input {
    position: relative;
}

.location-input .spinner-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    display: none;
    z-index: 2;
}

.location-input.loading .spinner-icon {
    display: block;
}

/* Tablet optimizations */
@media (min-width: 576px) {
    .search-box-wrap-v2 {
        padding: 1.5rem;
    }

    .search-box-header h3 {
        font-size: 1.5rem;
    }

    .search-box-header p {
        font-size: 1rem;
    }

    .search-actions {
        flex-direction: row;
        justify-content: space-between;
    }

    .search-actions .btn {
        width: auto;
        min-width: 150px;
    }

    .property-type-buttons {
        gap: 1rem;
    }

    .btn-type {
        min-width: 140px;
    }
}

/* Desktop optimizations */
@media (min-width: 768px) {
    .search-box-wrap-v2 {
        padding: 2rem;
    }

    .search-box-header {
        margin-bottom: 1.5rem;
    }

    .search-box-header h3 {
        font-size: 1.75rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .advanced-filters-body {
        padding: 1.5rem;
    }
}

/* Large desktop optimizations */
@media (min-width: 992px) {
    .search-actions {
        margin-top: 2rem;
    }

    .search-actions .btn {
        padding: 0.75rem 2rem;
    }

    .btn-type {
        padding: 0.75rem 2rem;
        margin: 0 0.5rem;
    }

    .property-type-buttons {
        margin: 1.5rem 0;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {

    .form-control,
    .form-select {
        height: 55px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .btn-type,
    .search-actions .btn {
        min-height: 50px;
        font-size: 16px;
    }

    .advanced-filters-toggler .btn {
        min-height: 48px;
        font-size: 16px;
    }
}

/* Accessibility improvements */
.btn:focus-visible {
    outline: 2px solid #343a40;
    outline-offset: 2px;
}

.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid #343a40;
    outline-offset: 2px;
}

/* Animation for smooth transitions */
.collapse {
    transition: height 0.35s ease;
}

.collapsing {
    transition: height 0.35s ease;
}

/* Estilos Redesenhados do Filtro de Preços */
.price-filter-section {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(52, 58, 64, 0.1);
    box-shadow: 0 8px 25px rgba(52, 58, 64, 0.08), 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.price-filter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #343a40, #495057, #343a40);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 200% 0;
    }

    50% {
        background-position: -200% 0;
    }
}

.price-filter-toggle {
    margin-bottom: 0;
}

.btn-price-filter {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(52, 58, 64, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 70px;
}

.btn-price-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 58, 64, 0.2), 0 4px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #343a40, #495057);
}

.btn-price-filter:hover .btn-title,
.btn-price-filter:hover .btn-subtitle {
    color: white;
}

.btn-price-filter:hover .btn-main-icon,
.btn-price-filter:hover .btn-secondary-icon,
.btn-price-filter:hover .toggle-arrow {
    color: white;
}

.btn-price-filter:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Estado Expandido */
.btn-price-filter.expanded {
    background: linear-gradient(135deg, #27ae60, #229954);
    border-color: #27ae60;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.25);
}

.btn-price-filter.expanded:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.35);
}

.btn-price-filter.expanded .btn-main-icon {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.btn-price-filter.expanded .btn-secondary-icon {
    color: rgba(255, 255, 255, 0.8);
}

.btn-price-filter.expanded .btn-title {
    color: #ffffff;
}

.btn-price-filter.expanded .btn-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.btn-price-filter.expanded .toggle-arrow {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(180deg);
}

.btn-price-filter[aria-expanded="true"] {
    background: linear-gradient(135deg, #343a40, #495057);
    box-shadow: 0 6px 20px rgba(52, 58, 64, 0.3);
}

/* Estados de foco e hover melhorados */
.btn-price-filter:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 58, 64, 0.25);
}

.btn-price-filter:hover:not(.expanded) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #343a40;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

@keyframes pulse-border {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0;
    }
}

.btn-price-filter[aria-expanded="true"] .btn-title,
.btn-price-filter[aria-expanded="true"] .btn-subtitle,
.btn-price-filter[aria-expanded="true"] .btn-main-icon,
.btn-price-filter[aria-expanded="true"] .btn-secondary-icon,
.btn-price-filter[aria-expanded="true"] .toggle-arrow {
    color: white;
}

.btn-price-filter[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    width: 100%;
}

.btn-icon-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    margin-right: 1rem;
}

.btn-main-icon {
    font-size: 1.4rem;
    color: #343a40;
    transition: all 0.3s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(52, 58, 64, 0.1), rgba(0, 86, 179, 0.1));
    flex-shrink: 0;
}

.btn-secondary-icon {
    font-size: 0.9rem;
    color: #28a745;
    position: absolute;
    top: -2px;
    right: -8px;
    background: white;
    border-radius: 50%;
    padding: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-text-wrapper {
    flex: 1;
    text-align: left;
    margin-right: 1rem;
}

.btn-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.btn-subtitle {
    display: block;
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.btn-arrow-wrapper {
    display: flex;
    align-items: center;
}

.toggle-arrow {
    font-size: 1rem;
    color: #343a40;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-filter-content {
    padding: 1.5rem 0.5rem 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.price-filter-content .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2d3748;
    background-color: #f7fafc;
    transition: all 0.3s ease;
}

.price-filter-content .form-control:focus {
    border-color: #343a40;
    box-shadow: 0 0 0 3px rgba(52, 58, 64, 0.1);
    background-color: #ffffff;
    outline: none;
}

.price-filter-content .form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.price-filter-content label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.price-filter-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.price-filter-header h4 {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.price-filter-subtitle {
    color: #4a5568;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    color: #495057;
    font-weight: 600;
    z-index: 2;
    background: white;
    padding: 0 4px;
}

.price-input {
    padding-left: 35px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 500;
    color: #2d3748;
    background-color: #f7fafc;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.price-input:focus {
    border-color: #343a40;
    box-shadow: 0 0 0 3px rgba(52, 58, 64, 0.1);
    background-color: #ffffff;
    outline: none;
}

.price-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.price-suggestions {
    margin-top: 1.5rem;
    text-align: center;
}

.suggestion-label {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.price-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.price-suggestion {
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    background: #f7fafc;
    color: #4a5568;
}

.price-suggestion:hover {
    background-color: #343a40;
    border-color: #343a40;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 58, 64, 0.25);
}

.price-suggestion:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(52, 58, 64, 0.2);
}

/* Responsividade Aprimorada do Filtro de Preços */

/* Mobile First - Smartphones */
@media (max-width: 576px) {
    .price-filter-section {
        padding: 0.75rem;
        margin: 0.75rem 0;
        border-radius: 12px;
    }

    .btn-price-filter {
        min-height: 70px;
        border-radius: 10px;
        padding: 0.75rem 1rem;
    }

    .btn-content {
        padding: 0.5rem 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .btn-icon-wrapper {
        margin-right: 0.75rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .btn-text-wrapper {
        margin-right: auto;
        text-align: left;
        flex: 1;
    }

    .btn-title {
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.2;
        margin-bottom: 0.25rem;
    }

    .btn-subtitle {
        font-size: 0.8rem;
        line-height: 1.3;
        opacity: 0.85;
    }

    .btn-arrow-wrapper {
        position: relative;
        top: auto;
        right: auto;
        flex-shrink: 0;
    }
}

/* Tablets */
@media (min-width: 577px) and (max-width: 768px) {
    .price-filter-section {
        padding: 1.1rem;
        margin: 1.25rem 0;
    }

    .btn-price-filter {
        min-height: 75px;
    }

    .btn-content {
        padding: 1rem 1.25rem;
    }

    .btn-title {
        font-size: 1.05rem;
    }

    .btn-subtitle {
        font-size: 0.82rem;
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .btn-price-filter {
        min-height: 60px;
        -webkit-tap-highlight-color: transparent;
    }

    .btn-price-filter:hover {
        transform: none;
    }

    .btn-price-filter:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .btn-content {
        padding: 1rem;
    }

    .btn-title {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .btn-price-filter,
    .toggle-arrow,
    .btn-main-icon,
    .btn-secondary-icon,
    .btn-title,
    .btn-subtitle {
        transition: none;
    }

    .price-filter-section::before {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .price-filter-section {
        background: linear-gradient(145deg, #2c3e50, #34495e);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .btn-price-filter {
        background: linear-gradient(135deg, #34495e, #2c3e50);
    }

    .btn-title {
        color: #ecf0f1;
    }

    .btn-subtitle {
        color: #bdc3c7;
    }
}

/* Legacy Mobile Support */
@media (max-width: 480px) {
    .price-filter-section {
        padding: 0.75rem;
        margin: 1rem 0;
    }

    .btn-toggle-price {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .price-filter-content {
        padding: 1rem 0.25rem 0.25rem;
    }

    .price-filter-header h4 {
        font-size: 1.1rem;
    }

    .price-quick-buttons {
        flex-direction: column;
        align-items: center;
    }

    .price-suggestion {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .price-filter-content .row {
        margin: 0;
    }

    .price-filter-content .col-md-6 {
        padding: 0.25rem;
    }

    .price-input {
        font-size: 0.9rem;
    }

    .currency-symbol {
        font-size: 0.9rem;
    }
}