/* DDA Vacant Lots Plugin Styles */

.vacant-lots-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.vacant-lot-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.vacant-lot-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.vacant-lot-item h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3em;
}

.vacant-lot-item h3 a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.vacant-lot-item h3 a:hover {
    color: #1e3d6f;
}

.vacant-lot-thumbnail {
    margin-bottom: 15px;
    text-align: center;
}

.vacant-lot-thumbnail a {
    display: block;
    text-decoration: none;
}

.lot-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vacant-lot-thumbnail:hover .lot-thumbnail {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.vacant-lot-address,
.vacant-lot-contact {
    margin: 8px 0;
    color: #666;
    font-size: 0.95em;
}

.vacant-lot-address strong,
.vacant-lot-contact strong {
    color: #333;
    font-weight: 600;
}

.vacant-lot-contact a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
}

.vacant-lot-contact a:hover {
    text-decoration: underline;
}

.vacant-lot-details {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.vacant-lot-size,
.vacant-lot-price {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
    border-left: 3px solid #2c5aa0;
}

.vacant-lot-price {
    border-left-color: #28a745;
    background: #f8fff9;
}

.vacant-lot-excerpt {
    margin-top: 15px;
    color: #666;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Single vacant lot page styles */
.single-vacant_lot .vacant-lot-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.single-vacant_lot .vacant-lot-details h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
}

.single-vacant_lot .vacant-lot-details p {
    margin: 8px 0;
    color: #666;
}

/* Archive page styles */
.post-type-archive-vacant_lot .vacant-lots-container {
    margin-top: 30px;
}

.post-type-archive-vacant_lot .page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d6f 100%);
    color: white;
}

.post-type-archive-vacant_lot .page-header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 300;
}

.post-type-archive-vacant_lot .page-header p {
    margin: 10px 0 0 0;
    font-size: 1.2em;
    opacity: 0.9;
}

/* Responsive design */
@media (max-width: 768px) {
    .vacant-lots-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vacant-lot-item {
        padding: 15px;
    }
    
    .vacant-lot-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .post-type-archive-vacant_lot .page-header h1 {
        font-size: 2em;
    }
}

/* Admin styles */
.vacant-lot-meta-box .form-table th {
    width: 150px;
    padding: 10px 0;
}

.vacant-lot-meta-box .form-table td {
    padding: 10px 0;
}

.vacant-lot-meta-box input[type="text"] {
    width: 100%;
    max-width: 500px;
}

/* Loading animation */
.vacant-lots-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.vacant-lots-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Frontend Form Styles */
.vacant-lot-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vacant-lot-form-container h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.vacant-lot-form-container p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.vacant-lot-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-group label input[type="checkbox"] {
    display: inline;
    width: auto;
    margin-right: 8px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.form-actions .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.form-actions .btn-primary {
    background: #2c5aa0;
    color: white;
}

.form-actions .btn-primary:hover {
    background: #1e3d6f;
}

.form-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.form-actions .btn-secondary:hover {
    background: #545b62;
}

.form-messages {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.form-messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.form-messages.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* My Vacant Lots Styles */
.my-vacant-lots {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.my-vacant-lots h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.vacant-lots-list {
    display: grid;
    gap: 20px;
}

.my-vacant-lots .vacant-lot-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.my-vacant-lots .vacant-lot-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2em;
}

.lot-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
    margin-bottom: 15px;
}

.lot-status.status-publish {
    background: #d4edda;
    color: #155724;
}

.lot-status.status-draft {
    background: #fff3cd;
    color: #856404;
}

.lot-status.status-pending {
    background: #cce5ff;
    color: #004085;
}

.lot-details {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.lot-size,
.lot-price {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
    border-left: 3px solid #2c5aa0;
}

.lot-price {
    border-left-color: #28a745;
    background: #f8fff9;
}

.lot-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9em;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-sm.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-sm.btn-primary:hover {
    background: #1e3d6f;
    color: white;
}

.btn-sm.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-sm.btn-secondary:hover {
    background: #545b62;
    color: white;
}

/* Form Validation Styles */
.form-group input.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.form-group .error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

.form-group input.error + .error-message,
.form-group textarea.error + .error-message {
    display: block;
}

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

.form-loading .btn {
    position: relative;
}

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

/* Image Gallery Styles */
.vacant-lot-image-gallery {
    margin-bottom: 30px;
}

.vacant-lot-featured-image {
    margin-bottom: 20px;
    text-align: center;
}

.vacant-lot-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vacant-lot-gallery h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.gallery-link {
    display: block;
    text-decoration: none;
}

.gallery-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-thumbnail {
    opacity: 0.9;
}

/* Upload Form Styles */
.form-help {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
    line-height: 1.4;
}

.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.image-preview-item .remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-item .remove-preview:hover {
    background: rgba(220, 53, 69, 1);
}

/* Admin Upload Styles */
.vacant-lot-image-upload,
.vacant-lot-gallery-upload {
    margin-top: 10px;
}

.image-preview {
    margin: 10px 0;
    max-width: 300px;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin: 10px 0;
    max-width: 500px;
}

.gallery-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.remove-gallery-image {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-gallery-image:hover {
    background: rgba(220, 53, 69, 1);
}

/* File Upload Styles */
input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    font-size: 14px;
}

input[type="file"]:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

/* Upload Progress */
.upload-progress {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    margin: 10px 0;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: #2c5aa0;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .gallery-thumbnail {
        height: 120px;
    }
    
    .image-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .image-preview-item img {
        height: 80px;
    }
    
    .lot-thumbnail {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .gallery-thumbnail {
        height: 100px;
    }
}

/* Responsive Form Styles */
@media (max-width: 768px) {
    .vacant-lot-form-container {
        padding: 15px;
        margin: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .lot-actions {
        flex-direction: column;
    }
    
    .btn-sm {
        width: 100%;
        text-align: center;
    }
}
