/**
 * Frontend Styles for ESK Properties Management
 * Comprehensive styles for the Airbnb-style property listing interface
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.esk-properties-listing-widget,
.esk-properties-filter-widget,
.esk-properties-map-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: #333;
}

/* Loading States */
.esk-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.esk-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ddd;
    border-top-color: #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

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

.esk-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   Properties Grid Widget - Split Screen Layout
   ========================================================================== */

.esk-properties-listing-widget {
    width: 100%;
    min-height: 500px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Main Container with Split View */
.esk-properties-main-container {
    display: flex;
    height: 100%;
    min-height: 600px;
}

.esk-properties-main-container.view-mode-split {
    display: flex;
}

.esk-properties-main-container.view-mode-list-only .esk-properties-map-section {
    display: none;
}

.esk-properties-main-container.view-mode-map-only .esk-properties-list-section {
    display: none;
}

/* View Toggle Buttons */
.esk-view-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.esk-view-buttons {
    display: flex;
    gap: 8px;
}

.esk-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.esk-view-btn:hover {
    background: #e9ecef;
    border-color: #ced4da;
    color: #495057;
}

.esk-view-btn.active {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
}

.esk-view-btn i {
    font-size: 16px;
}

/* Simple Unicode icons styling */
.esk-icon {
    display: inline-block;
    font-size: 16px;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.esk-icon-grid {
    font-size: 14px;
}

.esk-icon-list {
    font-size: 16px;
}

.esk-results-info {
    color: #6c757d;
    font-size: 14px;
}

.esk-results-count {
    font-weight: 500;
    color: #495057;
}

/* List Section */
.esk-properties-list-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

/* Map Section */
.esk-properties-map-section {
    flex: 1;
    position: relative;
    background: #f5f5f5;
    min-height: 400px;
}

/* View Toggle Controls */
.esk-view-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.esk-view-toggle {
    display: flex;
    background: #f5f5f5;
    border-radius: 6px;
    overflow: hidden;
}

/* Duplicate styles removed - using main definition above */

.esk-results-info {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Properties Content */
.esk-properties-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
}

/* Properties Grid Container */
.esk-properties-grid-container {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.esk-properties-grid-container.layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.esk-properties-grid-container.layout-list {
    grid-template-columns: 1fr !important;
}

/* List layout styles for desktop */
.esk-properties-grid-container.layout-list .esk-property-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-width: none;
}

.esk-properties-grid-container.layout-list .esk-property-image {
    width: 200px;
    min-width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.esk-properties-grid-container.layout-list .esk-property-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.esk-properties-grid-container.layout-list .esk-property-title {
    margin-bottom: 8px;
}

.esk-properties-grid-container.layout-list .esk-property-features {
    margin-top: auto;
}

/* Property Cards */
.esk-property-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.esk-property-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.esk-property-card.highlighted {
    box-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
    transform: translateY(-2px);
    border: 2px solid #007cba;
}

/* Property Image */
.esk-property-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.esk-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.esk-property-card:hover .esk-property-image img {
    transform: scale(1.05);
}

.esk-property-placeholder-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 48px;
}

.esk-property-placeholder-image::before {
    content: '🏠';
}

/* Status Badge */
.esk-property-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.esk-property-status.status-for-sale {
    background: #28a745;
}

.esk-property-status.status-for-rent {
    background: #007cba;
}

.esk-property-status.status-sold {
    background: #dc3545;
}

.esk-property-status.status-rented {
    background: #6c757d;
}

/* Property Content */
.esk-property-content {
    padding: 16px;
}

.esk-property-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.esk-property-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.esk-property-title a:hover {
    color: #007cba;
}

.esk-property-price {
    font-size: 18px;
    font-weight: 700;
    color: #007cba;
    margin-bottom: 8px;
}

.esk-property-address {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.esk-property-address i {
    color: #999;
}

.esk-property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.esk-feature-tag {
    padding: 4px 8px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.esk-property-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-top: 8px;
}

/* No Properties State */
.esk-no-properties {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.esk-no-properties p {
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.esk-properties-pagination {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background: #fff;
    flex-shrink: 0;
}

.esk-load-more-btn {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.esk-load-more-btn:hover {
    background: #005a87;
}

.esk-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ==========================================================================
   Properties Filter Widget
   ========================================================================== */

.esk-properties-filter-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.esk-filter-form {
    padding: 20px;
}

/* Filter Layouts */
.esk-filter-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
}

.esk-filter-vertical {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.esk-filter-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
}

/* Filter Fields */
.esk-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.esk-filter-field label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.esk-filter-field input,
.esk-filter-field select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.esk-filter-field input:focus,
.esk-filter-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Search Field */
.esk-search-field-wrapper {
    flex: 1;
    min-width: 200px;
}

/* Price Range */
.esk-price-range-wrapper {
    min-width: 200px;
}

.esk-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esk-price-inputs input {
    flex: 1;
}

.price-separator {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.esk-price-slider-wrapper {
    margin-top: 10px;
}

.esk-price-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Checkboxes and Radio Groups */
.esk-checkboxes-group,
.esk-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.esk-checkboxes-group label,
.esk-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    padding: 4px 0;
}

.esk-checkboxes-group input,
.esk-radio-group input {
    width: auto;
    margin: 0;
}

.esk-toggle-features {
    background: none;
    border: none;
    color: #007cba;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    margin-top: 8px;
    padding: 0;
}

/* Action Buttons */
.esk-filter-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.esk-submit-filter,
.esk-clear-filters {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.esk-submit-filter {
    background: #007cba;
    color: #fff;
}

.esk-submit-filter:hover {
    background: #005a87;
}

.esk-clear-filters {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.esk-clear-filters:hover {
    background: #e0e0e0;
    color: #333;
}

/* ==========================================================================
   Properties Map Widget
   ========================================================================== */

.esk-properties-map-widget {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.esk-map-container {
    width: 100%;
    height: 400px;
    position: relative;
}

.esk-search-area-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.esk-search-area-btn {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.esk-search-area-btn:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.esk-map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.esk-map-loading p {
    margin: 10px 0 0;
    color: #666;
    font-size: 14px;
}

/* Custom Map Markers */
.esk-custom-marker {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.esk-custom-marker:hover {
    transform: scale(1.1);
}

.esk-custom-marker.pin {
    background: #007cba;
    color: #fff;
    padding: 8px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esk-custom-marker.pin .marker-icon {
    transform: rotate(45deg);
    font-size: 16px;
}

.esk-custom-marker.price-tag {
    background: #007cba;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.esk-custom-marker.price-tag .marker-arrow {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #007cba;
}

.marker-price {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* Info Window Styles */
.esk-map-info-window {
    max-width: 280px;
    font-family: inherit;
}

.esk-map-info-window .info-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
    margin-bottom: 12px;
}

.esk-map-info-window .info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.esk-map-info-window .info-content {
    padding: 0 12px 12px;
}

.esk-map-info-window .info-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.esk-map-info-window .info-price {
    font-size: 16px;
    font-weight: 700;
    color: #007cba;
    margin-bottom: 8px;
}

.esk-map-info-window .info-address {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.esk-map-info-window .info-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.esk-map-info-window .info-link a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.esk-map-info-window .info-link a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Legacy Widget Styles (for existing widgets)
   ========================================================================== */

/* General widget styles */
.esk-no-property,
.esk-no-image,
.esk-no-gallery,
.esk-no-features,
.esk-no-address {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Property details styles */
.esk-property-details-widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.esk-property-details-layout {
    width: 100%;
}

/* Grid layout for property details */
.esk-property-details-layout.layout-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(2, 1fr); /* Default 2 columns */
}

/* Column variations */
.esk-property-details-layout.layout-grid.columns-1 {
    grid-template-columns: 1fr;
}

.esk-property-details-layout.layout-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.esk-property-details-layout.layout-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.esk-property-details-layout.layout-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* List layout for property details */
.esk-property-details-layout.layout-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Property detail field */
.esk-property-detail-field {
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.esk-property-detail-field:hover {
    background: #f1f3f4;
    border-color: #007cba;
}

.esk-property-detail-field.layout-list {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    background: transparent;
    padding: 10px 0;
}

.esk-property-detail-field.layout-list:last-child {
    border-bottom: none;
}

.esk-detail-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    font-size: 14px;
}

.esk-detail-value {
    color: #212529;
    font-size: 15px;
}

.esk-property-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.esk-property-detail-item:last-child {
    border-bottom: none;
}

.esk-property-detail-label {
    font-weight: 600;
    color: #495057;
}

.esk-property-detail-value {
    color: #212529;
}

/* Property gallery styles */
.esk-property-gallery {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.esk-property-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.esk-property-gallery img:hover {
    transform: scale(1.05);
}

/* Property features styles */
.esk-property-features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.esk-property-features-list li {
    background: #e9ecef;
    color: #495057;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 14px;
}

/* Property Features Widget Styles */
.esk-property-features-widget {
    width: 100%;
}

.esk-features-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Layout styles */
.esk-features-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.esk-features-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr); /* Default 2 columns */
}

.esk-features-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Feature item styles */
.esk-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.esk-features-inline .esk-feature-item {
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.esk-features-inline .esk-feature-item:hover {
    background: #e9ecef;
    border-color: #007cba;
}

/* Icon styles - ensure consistent sizing for all icon types */
.esk-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    font-size: 16px; /* Default icon size */
}

.esk-feature-icon i,
.esk-feature-icon svg {
    width: 1em !important;
    height: 1em !important;
    font-size: inherit !important;
}

/* Ensure fallback icons match custom icon sizes */
.esk-feature-icon .fa,
.esk-feature-icon .fas,
.esk-feature-icon .far,
.esk-feature-icon .fab,
.esk-feature-icon .fal {
    font-size: inherit !important;
    width: 1em !important;
    height: 1em !important;
}

.esk-feature-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* Property Address Widget Styles */
.esk-property-address-widget {
    width: 100%;
}

.esk-address-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.esk-address-wrapper {
    display: flex;
    align-items: center;
    gap: 8px; /* Default spacing */
}

.esk-address-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px; /* Default icon size */
}

.esk-address-icon i,
.esk-address-icon svg {
    width: 1em;
    height: 1em;
    font-size: inherit;
}

.esk-address-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

/* Call to Action Widget Styles */
.esk-cta-widget {
    width: 100%;
}

/* Button alignment */
.esk-cta-align-left .esk-cta-widget {
    text-align: left;
}

.esk-cta-align-center .esk-cta-widget {
    text-align: center;
}

.esk-cta-align-right .esk-cta-widget {
    text-align: right;
}

.esk-cta-align-justify .esk-cta-button {
    width: 100%;
    text-align: center;
}

/* Button base styles */
.esk-cta-button {
    display: inline-block;
    background: #007cba;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
}

.esk-cta-button:hover {
    background: #005a87;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.esk-cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.esk-cta-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Button sizes */
.esk-cta-button.esk-cta-size-xs {
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.3;
}

.esk-cta-button.esk-cta-size-sm {
    padding: 8px 16px;
    font-size: 13px;
    line-height: 1.4;
}

.esk-cta-button.esk-cta-size-md {
    padding: 12px 24px;
    font-size: 14px;
    line-height: 1.4;
}

.esk-cta-button.esk-cta-size-lg {
    padding: 16px 32px;
    font-size: 16px;
    line-height: 1.5;
}

.esk-cta-button.esk-cta-size-xl {
    padding: 20px 40px;
    font-size: 18px;
    line-height: 1.5;
}

/* Editor states */
.esk-no-property,
.esk-no-cta-selected,
.esk-cta-not-found,
.esk-cta-incomplete,
.esk-cta-no-url {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.esk-no-cta-selected {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.esk-cta-not-found,
.esk-cta-no-url {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Protocol-specific button styling */
.esk-cta-button.esk-cta-email {
    background: #d44638;
}

.esk-cta-button.esk-cta-email:hover {
    background: #c23321;
}

.esk-cta-button.esk-cta-phone {
    background: #4caf50;
}

.esk-cta-button.esk-cta-phone:hover {
    background: #45a049;
}

.esk-cta-button.esk-cta-sms {
    background: #2196f3;
}

.esk-cta-button.esk-cta-sms:hover {
    background: #1976d2;
}

.esk-cta-button.esk-cta-whatsapp {
    background: #25d366;
}

.esk-cta-button.esk-cta-whatsapp:hover {
    background: #20ba5a;
}

.esk-cta-button.esk-cta-skype {
    background: #00aff0;
}

.esk-cta-button.esk-cta-skype:hover {
    background: #0078d4;
}

.esk-cta-button.esk-cta-web {
    /* Keep default web styling */
}

/* Loading animation for button */
.esk-cta-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.esk-cta-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Large Desktop */
@media (min-width: 1200px) {
    .esk-properties-main-container {
        min-height: 700px;
    }

    .esk-properties-grid-container.layout-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .esk-properties-grid-container.layout-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Tablet */
@media (max-width: 992px) {
    .esk-properties-main-container {
        flex-direction: column;
        min-height: auto;
    }

    .esk-properties-main-container.view-mode-split {
        flex-direction: column;
    }

    .esk-properties-list-section,
    .esk-properties-map-section {
        flex: none;
    }

    .esk-properties-list-section {
        min-height: 400px;
    }

    .esk-properties-map-section {
        height: 300px;
        min-height: 300px;
    }

    .esk-view-controls {
        padding: 12px 16px;
    }

    .esk-view-toggle {
        order: 2;
    }

    .esk-results-info {
        order: 1;
        font-size: 13px;
    }

    .esk-properties-content {
        padding: 0 16px 16px;
    }

    .esk-properties-grid-container.layout-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 12px;
    }

    .esk-filter-horizontal {
        flex-direction: column;
        align-items: stretch;
    }

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

    /* Property Details responsive on tablet */
    .esk-property-details-layout.layout-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .esk-property-details-layout.layout-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .esk-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .esk-properties-listing-widget,
    .esk-properties-filter-widget,
    .esk-properties-map-widget {
        border-radius: 0;
        box-shadow: none;
    }

    .esk-properties-main-container {
        flex-direction: column;
    }

    .esk-properties-map-section {
        height: 250px;
        min-height: 250px;
    }

    .esk-view-toggle {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .esk-view-buttons {
        justify-content: center;
    }

    .esk-results-info {
        text-align: center;
    }

    .esk-view-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 12px;
    }

    .esk-view-toggle {
        justify-content: center;
        width: 100%;
    }

    .esk-view-btn {
        flex: 1;
        text-align: center;
    }

    .esk-results-info {
        text-align: center;
        font-size: 14px;
    }

    .esk-properties-content {
        padding: 0 12px 12px;
    }

    .esk-properties-grid-container {
        gap: 12px;
        margin-top: 12px;
    }

    .esk-properties-grid-container.layout-grid {
        grid-template-columns: 1fr;
    }

    /* On mobile, differentiate between grid and list layouts */
    .esk-properties-grid-container.layout-list .esk-property-card {
        display: flex;
        flex-direction: row;
        align-items: stretch;
    }

    .esk-properties-grid-container.layout-list .esk-property-image {
        width: 120px;
        min-width: 120px;
        height: 120px;
        flex-shrink: 0;
    }

    .esk-properties-grid-container.layout-list .esk-property-content {
        flex: 1;
        padding: 12px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .esk-property-card {
        border-radius: 8px;
    }

    .esk-property-image {
        height: 180px;
    }

    .esk-property-content {
        padding: 12px;
    }

    .esk-filter-form {
        padding: 16px;
    }

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

    .esk-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .esk-submit-filter,
    .esk-clear-filters {
        width: 100%;
    }

    .esk-checkboxes-group,
    .esk-radio-group {
        max-height: 150px;
    }

    .esk-search-area-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .esk-map-info-window {
        max-width: 240px;
    }

    /* Property Details responsive on mobile */
    .esk-property-details-layout.layout-grid {
        grid-template-columns: 1fr !important;
    }

    .esk-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .esk-properties-map-section {
        height: 200px;
        min-height: 200px;
    }

    .esk-view-controls {
        padding: 8px;
    }

    .esk-view-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .esk-properties-content {
        padding: 0 8px 8px;
    }

    .esk-properties-grid-container {
        gap: 8px;
        margin-top: 8px;
    }

    .esk-property-image {
        height: 160px;
    }

    .esk-property-content {
        padding: 10px;
    }

    .esk-property-title {
        font-size: 15px;
    }

    .esk-property-price {
        font-size: 16px;
    }

    .esk-filter-form {
        padding: 12px;
    }

    .esk-filter-field input,
    .esk-filter-field select {
        padding: 8px 10px;
        font-size: 13px;
    }

    .esk-submit-filter,
    .esk-clear-filters {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Features widget responsive on small mobile */
    .esk-features-grid {
        grid-template-columns: 1fr !important;
    }

    .esk-features-inline {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==========================================================================
   Touch Optimization
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    /* Touch-specific styles */
    .esk-property-card {
        transition: none;
    }

    .esk-property-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .esk-view-btn,
    .esk-submit-filter,
    .esk-clear-filters,
    .esk-load-more-btn,
    .esk-search-area-btn {
        min-height: 44px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .esk-filter-field input,
    .esk-filter-field select {
        min-height: 44px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .esk-checkboxes-group label,
    .esk-radio-group label {
        min-height: 44px;
        align-items: center;
    }

    .esk-custom-marker:hover {
        transform: none;
    }

    /* Larger touch targets */
    .esk-property-card {
        margin-bottom: 4px;
    }

    .esk-feature-tag {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ==========================================================================
   High DPI Displays
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .esk-property-placeholder-image::before {
        font-size: 40px;
    }

    .esk-loading-spinner {
        border-width: 1px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .esk-properties-map-section,
    .esk-view-controls,
    .esk-filter-actions,
    .esk-search-area-btn {
        display: none !important;
    }

    .esk-properties-main-container {
        flex-direction: column;
    }

    .esk-properties-list-section {
        flex: none;
    }

    .esk-property-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .esk-properties-grid-container.layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* Focus states */
.esk-view-btn:focus,
.esk-submit-filter:focus,
.esk-clear-filters:focus,
.esk-load-more-btn:focus,
.esk-search-area-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.esk-filter-field input:focus,
.esk-filter-field select:focus {
    outline: 2px solid #007cba;
    outline-offset: 1px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .esk-property-card:hover {
        transform: none;
    }

    .esk-custom-marker:hover {
        transform: none;
    }
}