/**
 * Property Filters - Frontend Styles
 * Clean, modern styling for AJAX property filtering
 */

/* ========================================
   Filter Wrapper & Container
======================================== */


.pm-filters-container {}

.pm-filters-header {}

.property-filter-title {
    margin-top: 30px;
}
.property-filter-title h1 {
    font-size: 2.5rem;
    text-align: center;
    color: var(--e-global-color-secondary);
    margin: 0px !important;
}
.filter-reset-group{
    flex-direction: inherit !important;
}
/* ========================================
   Reset Button
======================================== */

.pm-reset-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pm-reset-filters:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #1f2937;
}

.pm-reset-filters .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ========================================
   Filter Form & Groups
======================================== */

.pm-filter-form {
    display: block;
}

.pm-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0px;
    border: 1px solid var( --e-global-color-secondary );
}

.pm-filter-group {
    display: flex;
    flex-direction: column;
}
.pm-filter-inner-group{
   position: relative;
   width: 100%;
}

.pm-filter-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color:#000;
    text-transform: uppercase;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.pm-filter-title:hover {
    background: transparent !important;
    color: #000 !important;
}
.pm-filter-title:focus{
    background-color:transparent !important;
    color: #000 !important;
}
.pm-filter-arrow {
    width: 10px;
    transition: transform 0.3s ease;
    color: #9ca3af;
}
.pm-filter-toggle {
    width: 100%;
    border: 1px solid var(--e-global-color-secondary);
    border-left-width: 0;
    border-top-width: 0;
    border-bottom-width: 0;
    border-radius: 0;
    background: tr;
}
.possession-btn{
    border: 0px !important;
}
.pm-filter-toggle.active .pm-filter-arrow {
    transform: rotate(180deg);
}


/* Checkbox Group Styles - Accordion */
.pm-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #ffffff;
    position: absolute;
    top: 61px;
    left: 0;
    right: 0;
    z-index: 1;
    min-width: 100%;
    box-shadow: 0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);
}

.pm-checkbox-group.active {
    max-height: 300px;
    padding: 15px 20px;
    overflow-y: auto;
}

.pm-checkbox-group::-webkit-scrollbar {
    width: 6px;
}

.pm-checkbox-group::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.pm-checkbox-group::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.pm-checkbox-group::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.pm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.pm-checkbox-label:hover {
    background: #f9fafb;
}

.pm-filter-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
    accent-color: #2C6A3D;
}

.pm-checkbox-text {
    font-size: 14px;
    color: #000;
    line-height: 1.4;
    font-weight: 500;
}
.pm-checkbox-label:has(.pm-filter-checkbox:checked) .pm-checkbox-text {
    color: #1f2937;
    font-weight: 500;
}

#pm-reset-filters {
    background: #3b2518;
    color: #fff;
    font-size: .75rem;
    line-height: 1rem;
    text-transform: uppercase;
    border: 0;
    border-radius: 0;
}
.pm-reset-group{
    display: flex;
    align-items: center;
    padding-right: 12px;
}
/* ========================================
   Results Info
======================================== */

.pm-results-info {
    margin-bottom: 20px;
}

.pm-results-count {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.pm-loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var( --e-global-color-secondary );
    font-weight: 500;
}

.pm-loading-spinner .dashicons {
    animation: pm-spin 1s linear infinite;
}

@keyframes pm-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.pm-count-text {
    font-weight: 600;
    color: #1f2937;
}

/* ========================================
   Properties Grid
======================================== */

.pm-properties-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
    transition: opacity 0.3s ease;
}

.pm-grid-columns-1 {
    grid-template-columns: 1fr;
}

.pm-grid-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pm-grid-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pm-grid-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ========================================
   Property Card
======================================== */

.pm-property-card {
    background: #ffffff;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.pm-property-card:hover .pm-property-content{
    background-image: linear-gradient(to right, #2C6A3D, #47A448) !important;
}
.pm-property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--tw-ring-offset-shadow,0 0 #0000),var(0 0 #0000 ,0 0 #0000),var(0px 0px 14px #00000080);
}
.pm-property-card:hover .brand_name ,.pm-property-card:hover .property-card-main-title a , .pm-property-card:hover .property-card-place-metaInfo span{
    color: #fff !important;
}
 
/* Property Thumbnail */

.pm-property-thumbnail {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
    max-height: 400px;
    height: 100%;
}
.brand_name {
    font-size: 14px;
    color: #77787b;
    font-weight: 500;
}
.pm-property-thumbnail a {
    display: block;
    height: 100%;
}
.property-card-place-metaInfo {
    font-size: 14px;
    color: #000;
    font-weight: 500;
}
.pm-property-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pm-property-card:hover .pm-property-thumbnail img {
    transform: scale(1.05);
}

.pm-property-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pm-property-no-image .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: rgba(255, 255, 255, 0.8);
}

.pm-property-status {
    opacity: 0;
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 14px;
    background: var( --e-global-color-secondary );
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Property Content */

.pm-property-content {
    padding: 20px;
    background: #f3f4f6;
    height: 100%;
}

.pm-property-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.pm-property-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pm-property-title a:hover {
    color: #2563eb;
}

.pm-property-address {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0px 15px 4px;
    color: #ffffff;
    writing-mode: sideways-lr;
    background-color: #231f207d;
    padding: .1rem .2rem;
    font-size: .5rem;
    position: absolute;
    bottom: 0;
}

/* Property Meta */

.pm-property-meta {
    display: flex;
    flex-wrap: wrap;
}

.pm-meta-item {
    display: inline-block;
    color: #000;
    font-size: 14px;
}
.property-card-main-title a{
    font-size: 18px;
    font-weight: 700;
    color: #000 !important;
}
/* Property Excerpt */

.pm-property-excerpt {
    margin-bottom: 15px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* Property Link */

.pm-property-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pm-property-link:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateX(3px);
}

.pm-property-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ========================================
   No Results / Error Messages
======================================== */

.pm-no-results,
.pm-error-message {
    padding: 60px 20px;
    text-align: center;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
}

.pm-no-results p,
.pm-error-message p {
    margin: 0;
    font-size: 18px;
    color: #6b7280;
}

.pm-error-message p {
    color: #dc2626;
}

/* ========================================
   Pagination
======================================== */

.pm-pagination-wrapper {
    margin-top: 40px;
    transition: opacity 0.3s ease;
}

.pm-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pm-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 35px;
    height: 35px;
    padding: 6px 13px;
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0px 5px;
}

.pm-pagination-btn:hover {
    background: #f3f4f6;
    color: #2c6a3d;
}
.pm-pagination-btn:focus{
    background: #2c6a3d !important;
    color: #ffffff !important;
    border-color:#2c6a3d !important;
}
.pm-pagination-btn.pm-pagination-active {
    background:#2c6a3d;
    color: #ffffff;
    border-color:#2c6a3d;
}

.pm-pagination-btn.pm-pagination-active:hover {
    background: #2c6a3d;
}

.pm-pagination-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.pm-pagination-dots {
    padding: 0 8px;
    color: #9ca3af;
    font-weight: 600;
}


/* ========================================
   Responsive Design
======================================== */

@media screen and (max-width: 1024px) {

    .pm-grid-columns-4,
    .pm-grid-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .pm-notifications-table-block{
        overflow: auto;
    }
}

@media screen and (max-width: 768px) {
    .pm-filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

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

    .pm-grid-columns-4,
    .pm-grid-columns-3,
    .pm-grid-columns-2 {
        grid-template-columns: 1fr;
    }

    .pm-pagination {
        gap: 5px;
    }

    .pm-pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 12px;
        font-size: 13px;
    }
    .custom-form-wrapper .form-row {
        flex-direction: column;
        gap: 0px !important;
    }
    .custom-form-wrapper .form-field{
        width: 100% !important;
    }
    .custom-form-wrapper input[type=date], .custom-form-wrapper input[type=email], .custom-form-wrapper input[type=number], .custom-form-wrapper input[type=password], .custom-form-wrapper input[type=search], .custom-form-wrapper input[type=text], .custom-form-wrapper input[type=url], .custom-form-wrapper select, .custom-form-wrapper textarea{
        padding: .8rem !important;
    }
}

@media (max-width: 480px) {
    .property-filter-title h1
    {
        font-size: 1.6rem !important;
    }

    .pm-filters-title ,.pm-filter-title {
        font-size: 12px !important;
    }

    .pm-property-title {
        font-size: 18px !important;
    }
}