/* /home/dibamehr/public_html/assets/advertisements/pages/index-styles.css */
.ad-grid {
    display: grid;
    gap: 1rem;
    margin: 0 10px;
}

.ad-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    position: relative;
    z-index: 3;
}

.ad-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
    transition: box-shadow 0.3s ease;
    opacity: 0;
}

.ad-card.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.ad-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ad-image {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin: 8px;
    position: relative;
}

.ad-image .bg-green-500 {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-align: center;
}

.ad-info {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.filter-display {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 5rem;
    margin-bottom: 1rem;
    padding: 0.5rem 10px;
    position: relative;
    z-index: 4;
    background: white;
    border-radius: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.filter-display::-webkit-scrollbar {
    height: 6px;
}

.filter-display::-webkit-scrollbar-thumb {
    background: #1E40AF;
    border-radius: 3px;
}

.filter-display::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.neighborhood-filter, .transaction-filter, .area-filter, .price-filter, .document-filter, .payment-filter, .others-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #1E3A8A;
    color: #E5E7EB;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.neighborhood-filter:hover, .transaction-filter:hover, .area-filter:hover, .price-filter:hover, .document-filter:hover, .payment-filter:hover, .others-filter:hover {
    background: #1E40AF;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.neighborhood-filter:active, .transaction-filter:active, .area-filter:active, .price-filter:active, .document-filter:active, .payment-filter:active, .others-filter:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.neighborhood-filter i.bi-geo-alt, .transaction-filter i.bi-list, .area-filter i.bi-rulers, .price-filter i.bi-currency-dollar, .document-filter i.bi-file-earmark-text, .payment-filter i.bi-credit-card, .others-filter i.bi-three-dots {
    color: #E5E7EB;
    font-size: 0.9rem;
}

.neighborhood-filter i.bi-x, .transaction-filter i.bi-x, .area-filter i.bi-x, .price-filter i.bi-x, .document-filter i.bi-x, .payment-filter i.bi-x, .others-filter i.bi-x {
    color: #E5E7EB;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.neighborhood-filter i.bi-x:hover, .transaction-filter i.bi-x:hover, .area-filter i.bi-x:hover, .price-filter i.bi-x:hover, .document-filter i.bi-x:hover, .payment-filter i.bi-x:hover, .others-filter i.bi-x:hover {
    color: #D1D5DB;
    transform: scale(1.2);
}

.neighborhood-filter .selected-count, .transaction-filter .selected-count, .document-filter .selected-count, .payment-filter .selected-count, .others-filter .selected-count {
    background: #2563EB;
    color: #E5E7EB;
    border-radius: 50%;
    width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
}

.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.confirm-modal.show {
    display: flex;
}

.confirm-modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 90%;
    width: 400px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.confirm-modal-content p {
    font-size: 1rem;
    color: #1F2937;
    margin-bottom: 1.5rem;
}

.confirm-modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.confirm-modal-buttons button {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.confirm-modal-buttons .confirm-btn {
    background: #EF4444;
    color: white;
}

.confirm-modal-buttons .confirm-btn:hover {
    background: #B91C1C;
}

.confirm-modal-buttons .cancel-btn {
    background: #2563EB;
    color: white;
}

.confirm-modal-buttons .cancel-btn:hover {
    background: #1E40AF;
}

.ad-visits {
    display: flex;
    align-items: center;
    font-size: 0.68rem; /* 15% کوچک‌تر از 0.8rem */
    font-weight: 500;
}

.ad-visits i.bi-eye {
    color: #4B5563;
    font-size: 0.85rem; /* 15% کوچک‌تر از 1rem */
    margin-left: 0.3rem;
}

.ad-meta span:not(.ad-visits) {
    font-size: 0.68rem; /* 15% کوچک‌تر از 0.8rem */
}

.ad-image .bg-black.bg-opacity-60 {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.ad-info .flex.items-center.text-gray-600 {
    font-size: 0.8rem;
}

.location-font-normal {
    font-size: 0.75rem;
}

.location-font-ellipsis {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .ad-grid {
        grid-template-columns: repeat(3, 1fr);
        padding-top: 18px;
    }
    .ad-container {
        max-width: calc(100% - 240px);
        margin-right: 240px;
    }
    .ad-card {
        height: 150px;
    }
    .ad-info {
        font-size: 0.85rem;
    }
    .ad-info .ad-title-bar {
        font-size: 0.675rem; /* 10% کوچک‌تر از 0.75rem */
        padding: 0.3rem 0.5rem;
    }
    .ad-info .text-lg {
        font-size: 0.9rem;
    }
    .ad-info .text-xs {
        font-size: 0.65rem;
    }
    .ad-info img.w-8.h-8 {
        width: 1.5rem;
        height: 1.5rem;
    }
    .ad-visits {
        font-size: 0.553rem; /* 15% کوچک‌تر از 0.65rem */
    }
    .ad-visits i.bi-eye {
        font-size: 0.723rem; /* 15% کوچک‌تر از 0.85rem */
    }
    .ad-meta span:not(.ad-visits) {
        font-size: 0.553rem; /* 15% کوچک‌تر از 0.65rem */
    }
    .filter-display {
        gap: 0.75rem;
        margin-top: 5rem;
    }
    .neighborhood-filter, .transaction-filter, .area-filter, .price-filter, .document-filter, .payment-filter, .others-filter {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .ad-grid {
        grid-template-columns: repeat(2, 1fr);
        padding-top: 18px;
    }
    .ad-card {
        flex-direction: row;
        height: auto;
    }
    .ad-image {
        width: 120px;
        height: 120px;
        margin: 8px;
    }
    .ad-info {
        padding: 10px;
        font-size: 0.9rem;
    }
    .ad-info .ad-title-bar {
        font-size: 0.72rem; /* 10% کوچک‌تر از 0.8rem */
        padding: 0.4rem 0.6rem;
    }
    .ad-info .text-lg {
        font-size: 1rem;
    }
    .ad-info .text-xs {
        font-size: 0.7rem;
    }
    .ad-info img.w-8.h-8 {
        width: 1.8rem;
        height: 1.8rem;
    }
    .ad-visits {
        font-size: 0.595rem; /* 15% کوچک‌تر از 0.7rem */
    }
    .ad-visits i.bi-eye {
        font-size: 0.765rem; /* 15% کوچک‌تر از 0.9rem */
    }
    .ad-meta span:not(.ad-visits) {
        font-size: 0.595rem; /* 15% کوچک‌تر از 0.7rem */
    }
    .filter-display {
        gap: 0.75rem;
        padding: 0.5rem 15px;
        margin-top: 5rem;
    }
    .neighborhood-filter, .transaction-filter, .area-filter, .price-filter, .document-filter, .payment-filter, .others-filter {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 767px) {
    .ad-grid {
        grid-template-columns: 1fr;
        padding-top: 10px;
        gap: 0.75rem;
        margin: 0 4px;
    }
    .ad-container {
        padding: 0 4px;
    }
    .ad-card {
        flex-direction: row;
        align-items: stretch;
        height: auto;
        max-width: 100%;
        margin-bottom: 12px;
    }
    .ad-image {
        width: 140px;
        height: 140px;
        flex-shrink: 0;
        margin: 8px;
        border-radius: 8px;
    }
    .ad-info {
        padding: 12px;
        font-size: 0.95rem;
        flex: 1;
    }
    .ad-info .ad-title-bar {
        font-size: 0.765rem; /* 10% کوچک‌تر از 0.85rem */
        padding: 0.5rem;
        text-align: right;
    }
    .ad-info .text-lg {
        font-size: 1.1rem;
    }
    .ad-info .text-xs {
        font-size: 0.75rem;
    }
    .ad-info img.w-8.h-8 {
        width: 2rem;
        height: 2rem;
    }
    .ad-visits {
        font-size: 0.638rem; /* 15% کوچک‌تر از 0.75rem */
    }
    .ad-visits i.bi-eye {
        font-size: 0.85rem; /* 15% کوچک‌تر از 1rem */
    }
    .ad-meta span:not(.ad-visits) {
        font-size: 0.638rem; /* 15% کوچک‌تر از 0.75rem */
    }
    .filter-display {
        gap: 0.5rem;
        padding: 0.5rem 8px;
        margin-top: 5rem;
        margin-bottom: 0.5rem;
    }
    .neighborhood-filter, .transaction-filter, .area-filter, .price-filter, .document-filter, .payment-filter, .others-filter {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}