/**
 * ArcGIS Data Display Styles
 */

/* Protected lands data container */
.protected-lands-data {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.protected-lands-data h3 {
    margin-top: 0;
    color: #2c5530;
    border-bottom: 2px solid #4a7c59;
    padding-bottom: 10px;
}

/* Preserve cards grid */
.preserves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.preserve-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #4a7c59;
}

.preserve-card h4 {
    margin: 0 0 15px 0;
    color: #2c5530;
    font-size: 1.2em;
}

.preserve-card p {
    margin: 8px 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.preserve-card strong {
    color: #2c5530;
}

/* Search form */
.preserve-search-form {
    margin: 30px 0;
    padding: 25px;
    background: #f5f5f5;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.preserve-search-form h3 {
    margin: 0 0 20px 0;
    color: #2c5530;
    text-align: center;
}

.search-fields {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.search-fields input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    flex: 1;
    min-width: 200px;
}

.search-fields input:focus {
    border-color: #4a7c59;
    outline: none;
}

.search-fields button {
    padding: 10px 20px;
    background: #4a7c59;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.search-fields button:hover {
    background: #2c5530;
}

.search-fields button#clear-btn {
    background: #6c757d;
}

.search-fields button#clear-btn:hover {
    background: #545b62;
}

/* Statistics display */
.preserve-stats {
    background: linear-gradient(135deg, #4a7c59 0%, #2c5530 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
}

.preserve-stats h3 {
    margin: 0 0 25px 0;
    text-align: center;
    font-size: 1.5em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #a8d5ba;
}

.stat-label {
    display: block;
    font-size: 1.1em;
    opacity: 0.9;
}

.stat-text {
    display: block;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 10px;
    color: #a8d5ba;
}

/* Simple list */
.simple-preserve-list {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.simple-preserve-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.simple-preserve-list li:last-child {
    border-bottom: none;
}

/* ArcGIS data table */
.arcgis-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.arcgis-data-table th {
    background: #4a7c59;
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: bold;
}

.arcgis-data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}

.arcgis-data-table tr:hover {
    background-color: #f5f5f5;
}

/* Error and success messages */
.error {
    background: #ffe6e6;
    color: #d63384;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #d63384;
    margin: 15px 0;
}

.success {
    background: #e6ffe6;
    color: #198754;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #198754;
    margin: 15px 0;
}

.loading {
    background: #e6f3ff;
    color: #0066cc;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #0066cc;
    margin: 15px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .preserves-grid {
        grid-template-columns: 1fr;
    }
    
    .search-fields {
        flex-direction: column;
    }
    
    .search-fields input,
    .search-fields button {
        width: 100%;
        min-width: unset;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .arcgis-data-table {
        font-size: 0.9em;
    }
    
    .arcgis-data-table th,
    .arcgis-data-table td {
        padding: 8px 6px;
    }
}

/* Loading animation */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a7c59;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Widget styles */
.preserve-stats-widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.preserve-stats-widget h3 {
    color: #2c5530;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a7c59;
}

.preserve-stats-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.preserve-stats-widget li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preserve-stats-widget li:last-child {
    border-bottom: none;
}

/* Property map */
.property-map-container {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.property-map {
    width: 100%;
    height: 400px;
    min-height: 400px;
}

/* Single property display */
.preserve-card.single-property {
    max-width: none;
    margin: 20px 0;
}

.preserve-card.single-property h4 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #2c5530;
    border-bottom: 2px solid #4a7c59;
    padding-bottom: 10px;
}

.property-size {
    background: #f0f8f0;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.gis-acres {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.property-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.property-details p {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 3px;
    margin: 0;
}

.property-description {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    line-height: 1.6;
}

.property-description h5 {
    color: #2c5530;
    margin: 0 0 15px 0;
    font-size: 1.2em;
}

.property-links {
    text-align: center;
    margin: 20px 0;
}

.property-links a {
    display: inline-block;
    background: #4a7c59;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.property-links a:hover {
    background: #2c5530;
}

.agricultural-info {
    background: #fffbf0;
    border: 1px solid #f0e68c;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.agricultural-info h5 {
    color: #8b7355;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.property-not-found {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.property-not-found h3 {
    color: #495057;
    margin-bottom: 15px;
}

.property-not-found h4 {
    color: #2c5530;
    margin-top: 25px;
    margin-bottom: 15px;
}

.property-not-found ul {
    text-align: left;
    display: inline-block;
    background: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive design for single property */
@media (max-width: 768px) {
    .property-details {
        grid-template-columns: 1fr;
    }
    
    .preserve-card.single-property {
        padding: 15px;
    }
    
    .preserve-card.single-property h4 {
        font-size: 1.3em;
    }
}
