/* ==========================================================================
   WP Property Manager - Frontend Styles
   ========================================================================== */

:root {
	--wpp-primary: #d4af37; /* Mustard/Gold primary color */
	--wpp-primary-hover: #b8952b;
	--wpp-dark: #2c3e50;
	--wpp-text: #5c687e;
	--wpp-bg-light: #f8f9fa;
	--wpp-border: #e2e8f0;
	--wpp-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	--wpp-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
	--wpp-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.wp-property-search-container {
	font-family: 'Inter', sans-serif;
	background: #ffffff;
	border-radius: 20px;
	padding: 30px;
	box-shadow: var(--wpp-shadow);
	margin-bottom: 40px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

/* Status Pills (All, For Sale, For Rent) */
.wp-property-status-pills {
	display: flex;
	background: #f1f3f6;
	padding: 5px;
	border-radius: 30px;
	width: max-content;
	margin: 0 auto 30px auto;
	gap: 5px;
}

.wp-property-status-pill {
	border: none;
	background: transparent;
	padding: 10px 24px;
	border-radius: 20px;
	font-weight: 600;
	font-size: 14px;
	color: var(--wpp-text);
	cursor: pointer;
	transition: var(--wpp-transition);
	outline: none;
}

.wp-property-status-pill:hover {
	color: var(--wpp-dark);
}

.wp-property-status-pill.active {
	background-color: var(--wpp-primary);
	color: #ffffff;
	box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

/* Search Form Grid */
.wp-property-search-form {
	display: grid;
	grid-template-columns: repeat(5, 1fr) auto;
	gap: 20px;
	align-items: flex-end;
}

/* Filter Groups */
.wp-property-filter-group {
	display: flex;
	flex-direction: column;
	position: relative;
}

.wp-property-filter-group label {
	font-size: 13px;
	font-weight: 700;
	color: var(--wpp-dark);
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.wp-property-label-icon {
	font-size: 14px;
	color: var(--wpp-primary);
}

/* Custom Dropdown Styling */
.wp-property-select-wrapper {
	position: relative;
	width: 100%;
}

.wp-property-select-wrapper select {
	width: 100%;
	padding: 14px 40px 14px 16px;
	font-size: 14px;
	font-weight: 500;
	color: var(--wpp-text);
	background-color: #ffffff;
	border: 1px solid var(--wpp-border);
	border-radius: 12px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	transition: var(--wpp-transition);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.wp-property-select-wrapper select:focus {
	outline: none;
	border-color: var(--wpp-primary);
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Custom Select Dropdown Arrow */
.wp-property-select-wrapper::after {
	content: '';
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 10px;
	height: 6px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235c687e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
	pointer-events: none;
	transition: var(--wpp-transition);
}

.wp-property-select-wrapper:focus-within::after {
	transform: translateY(-50%) rotate(180deg);
}

/* Search Button */
.wp-property-search-btn {
	background-color: var(--wpp-primary);
	color: #ffffff;
	border: none;
	border-radius: 12px;
	padding: 14px 28px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.8px;
	cursor: pointer;
	transition: var(--wpp-transition);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
	height: 48px;
	white-space: nowrap;
}

.wp-property-search-btn:hover {
	background-color: var(--wpp-primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}

.wp-property-search-btn:active {
	transform: translateY(0);
}

.wp-property-btn-icon {
	font-size: 14px;
}

/* Responsive Search Grid */
@media (max-width: 1200px) {
	.wp-property-search-form {
		grid-template-columns: repeat(3, 1fr);
	}
	.wp-property-search-btn-container {
		grid-column: span 3;
	}
	.wp-property-search-btn {
		width: 100%;
	}
}

@media (max-width: 768px) {
	.wp-property-search-form {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	.wp-property-search-btn-container {
		grid-column: span 1;
	}
	.wp-property-search-container {
		padding: 20px;
	}
	.wp-property-status-pills {
		width: 100%;
		justify-content: center;
	}
}


/* ==========================================================================
   Property Grid Listings
   ========================================================================== */

.wp-property-listings-wrapper {
	font-family: 'Inter', sans-serif;
	position: relative;
	width: 100%;
}

.wp-property-grid-inner {
	display: grid;
	gap: 30px;
	margin-bottom: 40px;
}

/* Dynamic Columns */
.wp-property-grid-columns-1 .wp-property-grid-inner {
	grid-template-columns: 1fr;
}
.wp-property-grid-columns-2 .wp-property-grid-inner {
	grid-template-columns: repeat(2, 1fr);
}
.wp-property-grid-columns-3 .wp-property-grid-inner {
	grid-template-columns: repeat(3, 1fr);
}
.wp-property-grid-columns-4 .wp-property-grid-inner {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
	.wp-property-grid-columns-3 .wp-property-grid-inner,
	.wp-property-grid-columns-4 .wp-property-grid-inner {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.wp-property-grid-columns-2 .wp-property-grid-inner,
	.wp-property-grid-columns-3 .wp-property-grid-inner,
	.wp-property-grid-columns-4 .wp-property-grid-inner {
		grid-template-columns: 1fr;
	}
}

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

.wp-property-card {
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--wpp-shadow-card);
	transition: var(--wpp-transition);
	display: flex;
	flex-direction: column;
	border: 1px solid var(--wpp-border);
	height: 100%;
}

.wp-property-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
	border-color: rgba(212, 175, 55, 0.3);
}

/* Thumbnail Section */
.wp-property-card-thumbnail {
	position: relative;
	width: 100%;
	padding-top: 66.67%; /* 3:2 Aspect Ratio */
	overflow: hidden;
	background: #e2e8f0;
}

.wp-property-card-thumbnail img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.wp-property-card:hover .wp-property-card-thumbnail img {
	transform: scale(1.08);
}

/* Badges */
.wp-property-badge {
	position: absolute;
	top: 15px;
	left: 15px;
	padding: 6px 14px;
	border-radius: 30px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #ffffff;
	z-index: 2;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Specific Badges styling based on slug */
.wp-property-badge-for-sale {
	background-color: var(--wpp-primary);
}

.wp-property-badge-for-rent {
	background-color: #2ecc71;
}

.wp-property-type-badge {
	position: absolute;
	bottom: 15px;
	left: 15px;
	padding: 5px 12px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 600;
	background-color: rgba(44, 62, 80, 0.85);
	color: #ffffff;
	backdrop-filter: blur(4px);
	z-index: 2;
}

/* Content Details */
.wp-property-card-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.wp-property-card-price {
	font-size: 22px;
	font-weight: 800;
	color: var(--wpp-primary);
	margin-bottom: 12px;
	display: flex;
	align-items: baseline;
}

.wp-property-card-price-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--wpp-text);
	margin-left: 4px;
}

.wp-property-card-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--wpp-dark);
	margin: 0 0 12px 0;
	line-height: 1.4;
}

.wp-property-card-title a {
	color: inherit;
	text-decoration: none;
	transition: var(--wpp-transition);
}

.wp-property-card-title a:hover {
	color: var(--wpp-primary);
}

.wp-property-card-address {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--wpp-text);
	font-size: 13px;
	margin-bottom: 20px;
}

.wp-property-card-address span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wp-property-icon {
	flex-shrink: 0;
	color: var(--wpp-primary);
}

/* Meta Details Row */
.wp-property-card-details {
	display: flex;
	border-top: 1px solid var(--wpp-border);
	padding-top: 15px;
	margin-top: auto;
	gap: 15px;
}

.wp-property-detail-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--wpp-text);
	font-weight: 500;
}


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

.wp-property-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 30px;
}

.wp-property-pagination a,
.wp-property-pagination span {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 6px;
	border-radius: 50%;
	font-size: 14px;
	font-weight: 600;
	color: var(--wpp-text);
	text-decoration: none;
	border: 1px solid var(--wpp-border);
	background-color: #ffffff;
	transition: var(--wpp-transition);
	cursor: pointer;
}

.wp-property-pagination a:hover {
	border-color: var(--wpp-primary);
	color: var(--wpp-primary);
	background-color: rgba(212, 175, 55, 0.05);
}

.wp-property-pagination .current {
	background-color: var(--wpp-primary);
	color: #ffffff;
	border-color: var(--wpp-primary);
	box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   States & Spinner
   ========================================================================== */

/* No Results */
.wp-property-no-results {
	text-align: center;
	padding: 50px 20px;
	background: #ffffff;
	border-radius: 16px;
	border: 1px dashed var(--wpp-border);
}

.wp-property-no-results span.dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
	color: var(--wpp-primary);
	margin-bottom: 15px;
}

.wp-property-no-results p {
	font-size: 16px;
	color: var(--wpp-text);
	font-weight: 500;
	margin: 0;
}

/* Spinner Overlay and Loading States */
.wp-property-listings-wrapper {
	position: relative;
}

.wp-property-loader-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.7);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10;
	border-radius: 16px;
	backdrop-filter: blur(2px);
	transition: var(--wpp-transition);
}

.wp-property-listings-wrapper.loading .wp-property-loader-overlay {
	display: flex;
}

.wp-property-spinner {
	width: 50px;
	height: 50px;
	border: 3px solid rgba(212, 175, 55, 0.2);
	border-radius: 50%;
	border-top-color: var(--wpp-primary);
	animation: wpp-spin 1s ease-in-out infinite;
}

@keyframes wpp-spin {
	to { transform: rotate(360deg); }
}

/* Fade animation for dynamic AJAX updates */
.wp-property-grid-inner-container {
	transition: opacity 0.25s ease-in-out;
}

.wp-property-listings-wrapper.loading .wp-property-grid-inner-container {
	opacity: 0.4;
}

/* ==========================================================================
   Property Inventory Table Design
   ========================================================================== */

.wp-property-inventory-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--wpp-shadow);
    padding: 30px;
    margin-bottom: 40px;
    font-family: 'Inter', sans-serif;
}

.wp-property-inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.wp-property-inventory-title h2 {
    margin: 0;
    font-size: 24px;
    color: #1a1e29;
    font-weight: 600;
    display: inline-block;
}

.wp-property-count {
    color: #888;
    font-size: 14px;
    margin-left: 10px;
}

.wp-property-export-btn {
    background: var(--wpp-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--wpp-transition);
}

.wp-property-export-btn:hover {
    background: var(--wpp-primary-hover);
    transform: translateY(-2px);
}

/* Advanced Filter Section */
.wp-property-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wp-property-filter-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-property-filter-header h3 .dashicons {
    color: var(--wpp-primary);
}

.wp-property-reset-btn {
    background: #e94560;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s;
}

.wp-property-reset-btn:hover {
    background: #d63d56;
}

.wp-property-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.wp-property-filter-col {
    flex: 1;
    min-width: 140px;
}

.wp-property-filter-col label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.wp-property-search-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--wpp-primary);
    padding-bottom: 20px;
}

.wp-property-search-input-wrapper {
    position: relative;
    width: 300px;
}

.wp-property-search-input-wrapper .dashicons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.wp-property-search-input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--wpp-border);
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.wp-property-search-input-wrapper input:focus {
    outline: none;
    border-color: var(--wpp-primary);
}

/* Data Table Container */
.wp-property-table-outer-wrapper {
    position: relative;
    width: 100%;
}

.wp-property-table-inner-wrapper {
    overflow-x: auto;
    border: 1px solid var(--wpp-border);
    border-radius: 8px;
    background: #fff;
    cursor: grab;
}

.wp-property-table-inner-wrapper:active {
    cursor: grabbing;
}

.wp-property-data-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    text-align: left;
}

.wp-property-data-table th, .wp-property-data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--wpp-border);
    white-space: nowrap;
    font-size: 14px;
    color: #4a5568;
}

.wp-property-data-table th {
    background: #1a1e29;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 10;
}

.wp-property-data-table tbody tr {
    transition: background 0.2s;
}

.wp-property-data-table tbody tr:hover {
    background: #f8f9fa;
}

.wp-property-data-table tbody tr:nth-child(even) {
    background: #fdfdfd;
}

/* Inline Table Status Badges */
.wp-property-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.wp-property-status-active {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.wp-property-status-inactive, .wp-property-status-sold {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.wp-property-status-for-rent {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.wp-property-status-for-sale {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Loading State */
.wp-property-table-loading {
    text-align: center;
    padding: 40px !important;
    color: #888;
    font-style: italic;
}

.wp-property-no-results-td {
    text-align: center;
    padding: 40px !important;
    color: #e94560;
    font-weight: 600;
}

/* ==========================================================================
   Action Columns: Share & Detail
   ========================================================================== */

/* Sticky action column headers */
.wp-property-data-table th.wp-property-th-action {
    text-align: center;
    min-width: 110px;
    background: #111622;
    letter-spacing: 1px;
}

.wp-property-th-sort {
    display: inline-block;
    margin-left: 4px;
    opacity: 0.6;
    font-size: 11px;
    vertical-align: middle;
}

/* Cell centering */
.wp-property-action-cell {
    text-align: center;
    white-space: nowrap;
    padding: 12px 16px !important;
    vertical-align: middle;
}

/* ---- Share Button ---- */
.wp-property-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--wpp-primary);
    border-radius: 8px;
    background: transparent;
    color: var(--wpp-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: var(--wpp-transition);
    font-family: 'Inter', sans-serif;
    line-height: 1;
    white-space: nowrap;
}

.wp-property-share-btn svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.wp-property-share-btn:hover {
    background: var(--wpp-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.wp-property-share-btn:hover svg {
    transform: scale(1.15);
}

.wp-property-share-btn:active {
    transform: translateY(0);
}

/* ---- Detail Button ---- */
.wp-property-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: #1a1e29;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-decoration: none;
    transition: var(--wpp-transition);
    font-family: 'Inter', sans-serif;
    line-height: 1;
    white-space: nowrap;
    border: 2px solid #1a1e29;
}

.wp-property-detail-btn svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.wp-property-detail-btn:hover {
    background: var(--wpp-primary);
    border-color: var(--wpp-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
    text-decoration: none;
}

.wp-property-detail-btn:hover svg {
    transform: scale(1.15);
}

.wp-property-detail-btn:active {
    transform: translateY(0);
}

/* Highlight row when hovering action buttons */
.wp-property-data-table tbody tr:has(.wp-property-share-btn:hover),
.wp-property-data-table tbody tr:has(.wp-property-detail-btn:hover) {
    background: rgba(212, 175, 55, 0.05) !important;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */

.wp-property-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1e29;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 99999;
    pointer-events: none;
    border-left: 4px solid var(--wpp-primary);
}

.wp-property-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

