/* Property Management Frontend Styles */

/* General Styles */
.pm-properties-grid,
.pm-property-list-container,
.pm-available-properties,
.pm-single-property,
.pm-contact-form-container,
.pm-tenant-portal {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Property Grid */
.pm-properties-grid {
    display: grid;    gap: 30px;
    margin-bottom: 40px;
    margin-left: auto;
}

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

.pm-columns-3 {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.pm-property-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pm-property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.pm-property-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.pm-property-placeholder {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.3);
}

.pm-property-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.pm-property-status.available {
    background: #27ae60;
    color: white;
}

.pm-property-status.rented {
    background: #95a5a6;
    color: white;
}

.pm-property-content {
    padding: 20px;
}

.pm-property-title {
    margin: 0 0 10px;
    font-size: 20px;
    color: #2c3e50;
}

.pm-property-location {
    margin: 0 0 15px;
    color: #7f8c8d;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pm-property-price {
    margin: 15px 0;
    font-size: 24px;
    color: #27ae60;
}

.pm-property-price strong {
    font-weight: 700;
}

/* Filterable List */
.pm-property-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.pm-search-box {
    position: relative;
    margin-bottom: 15px;
}

.pm-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.pm-search-input:focus {
    outline: none;
    border-color: #667eea;
}

.pm-search-box .dashicons {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.pm-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pm-filter-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.pm-filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.pm-filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.pm-property-list {
    display: grid;
    gap: 20px;
}

.pm-property-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 20px;
    align-items: center;
    transition: all 0.3s;
}

.pm-property-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pm-property-item.hidden {
    display: none;
}

.pm-property-item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    overflow: hidden;
    flex-shrink: 0;
}

.pm-property-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.pm-property-item-details h4 {
    margin: 0 0 5px;
    font-size: 18px;
    color: #2c3e50;
}

.pm-location {
    margin: 5px 0;
    color: #7f8c8d;
    font-size: 14px;
}

.pm-rent {
    margin: 5px 0;
    font-size: 20px;
    color: #27ae60;
    font-weight: 600;
}

.pm-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 5px;
}

.pm-badge-available {
    background: #d4edda;
    color: #155724;
}

.pm-badge-rented {
    background: #e2e3e5;
    color: #383d41;
}

/* Available Properties */
.pm-available-properties {
    display: grid;
    gap: 25px;
}

.pm-available-card {
    background: white;
    border: 2px solid #27ae60;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.pm-available-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.2);
}

.pm-available-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
}

.pm-available-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #27ae60;
}

.pm-available-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.pm-available-card h3 {
    margin: 15px 0 10px;
    font-size: 20px;
    color: #2c3e50;
}

.pm-available-location {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.pm-available-price {
    font-size: 32px;
    color: #27ae60;
    font-weight: 700;
    margin: 15px 0;
}

.pm-available-price span {
    font-size: 16px;
    font-weight: 400;
}

/* Single Property */
.pm-single-property {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

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

.pm-single-property-header h2 {
    margin: 0;
    font-size: 32px;
    color: #2c3e50;
}

.pm-single-status {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
}

.pm-single-status.available {
    background: #d4edda;
    color: #155724;
}

.pm-single-status.rented {
    background: #e2e3e5;
    color: #383d41;
}

.pm-single-property-details {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.pm-detail-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.pm-detail-item .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: #667eea;
}

.pm-detail-item strong {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pm-detail-item p {
    margin: 0;
    color: #555;
    font-size: 16px;
}

.pm-single-property-cta {
    text-align: center;
    margin-top: 30px;
}

/* Buttons */
.pm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    justify-content: center;
}

.pm-btn-primary {
    background: #667eea;
    color: white;
}

.pm-btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pm-btn-secondary {
    background: #95a5a6;
    color: white;
}

.pm-btn-secondary:hover {
    background: #7f8c8d;
}

.pm-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.pm-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.pm-btn-block {
    width: 100%;
    display: flex;
}

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

/* Contact Form */
.pm-contact-form-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.pm-inquiry-form h3 {
    margin: 0 0 25px;
    font-size: 24px;
    color: #2c3e50;
    text-align: center;
}

.pm-form-group {
    margin-bottom: 20px;
}

.pm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.pm-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.pm-form-control:focus {
    outline: none;
    border-color: #667eea;
}

textarea.pm-form-control {
    resize: vertical;
    min-height: 120px;
}

.pm-form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #7f8c8d;
}

#pm-inquiry-response,
#pm-tenant-login-response {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    display: none;
}

#pm-inquiry-response.success,
#pm-tenant-login-response.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#pm-inquiry-response.error,
#pm-tenant-login-response.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Tenant Portal */
.pm-tenant-portal {
    max-width: 800px;
    margin: 0 auto;
}

.pm-tenant-login {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
}

.pm-tenant-login h2 {
    margin: 0 0 25px;
    text-align: center;
    color: #2c3e50;
}

.pm-tenant-dashboard {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
}

.pm-tenant-dashboard h2 {
    margin: 0 0 15px;
    color: #2c3e50;
}

.pm-tenant-info,
.pm-tenant-invoices {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.pm-tenant-info h3,
.pm-tenant-invoices h3 {
    margin: 0 0 20px;
    color: #2c3e50;
    font-size: 20px;
}

/* No Data Messages */
.pm-no-properties,
.pm-no-available {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 18px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Loading State */
.pm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: pm-spin 0.8s linear infinite;
}

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

/* Modal for Inquiry */
.pm-inquiry-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    animation: fadeIn 0.3s;
}

.pm-inquiry-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pm-inquiry-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s;
}

.pm-inquiry-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pm-inquiry-modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
}

.pm-inquiry-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.pm-inquiry-modal-close:hover {
    color: #2c3e50;
}

.pm-inquiry-modal-body {
    padding: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pm-columns-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .pm-columns-2,
    .pm-columns-3,
    .pm-columns-4 { 
        grid-template-columns: 1fr; 
    }
    
    .pm-property-item {
        grid-template-columns: 60px 1fr;
        gap: 15px;
    }
    
    .pm-property-item-actions {
        grid-column: 1 / -1;
        margin-top: 15px;
    }
    
    .pm-property-item-image {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    
    .pm-property-item-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .pm-single-property {
        padding: 25px;
    }
    
    .pm-single-property-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .pm-contact-form-container,
    .pm-tenant-login {
        padding: 25px;
    }
    
    .pm-filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pm-property-card {
        margin-bottom: 20px;
    }
    
    .pm-property-title {
        font-size: 18px;
    }
    
    .pm-property-price {
        font-size: 20px;
    }
    
    .pm-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .pm-single-property-header h2 {
        font-size: 24px;
    }
}

/* Print Styles */
@media print {
    .pm-btn,
    .pm-inquiry-btn,
    .pm-filter-buttons,
    .pm-search-box {
        display: none !important;
    }
}
