/**
 * Property Data UK Plugin Styles
 * Additional styles for plugin-specific components
 */

/* Admin Styles */
.property-data-admin {
    max-width: 1200px;
}

.property-data-admin .form-table th {
    width: 200px;
}

.property-data-admin .postbox {
    margin-bottom: 20px;
}

.property-data-sync-status {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.property-data-sync-status.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.property-data-sync-status.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.property-data-sync-status.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Import/Export Styles */
.property-data-import-export {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.property-data-import-export h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.property-data-progress {
    width: 100%;
    height: 20px;
    background: #f0f0f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.property-data-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a87);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Shortcode Styles */
.property-shortcode-container {
    margin: 20px 0;
}

.property-shortcode-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Map Shortcode Specific */
.property-map-shortcode .map-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.property-map-shortcode .map-controls {
    background: #f8f9fa;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Chart Shortcode Specific */
.property-chart-shortcode {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.property-chart-shortcode .chart-title {
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

/* Table Shortcode Specific */
.property-table-shortcode {
    overflow-x: auto;
    margin: 20px 0;
}

.property-table-shortcode table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.property-table-shortcode th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.property-table-shortcode td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.property-table-shortcode tr:hover {
    background: #f8f9fa;
}

/* KPI Cards Shortcode */
.property-kpi-shortcode .kpi-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.property-kpi-shortcode .kpi-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.property-kpi-shortcode .kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Postcode List Shortcode */
.property-postcode-list-shortcode .postcode-list.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.property-postcode-list-shortcode .postcode-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.property-postcode-list-shortcode .postcode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

/* Loading States */
.property-data-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.property-data-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: property-data-spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Error States */
.property-data-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.property-data-error h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Success States */
.property-data-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .property-kpi-shortcode .kpi-dashboard {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .property-postcode-list-shortcode .postcode-list.grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .property-table-shortcode {
        font-size: 14px;
    }
    
    .property-table-shortcode th,
    .property-table-shortcode td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .property-chart-shortcode {
        padding: 15px;
    }
    
    .property-map-shortcode .map-controls {
        padding: 8px;
    }
    
    .property-map-shortcode .map-control-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Print Styles */
@media print {
    .property-data-admin,
    .map-controls,
    .table-controls {
        display: none;
    }
    
    .property-chart-shortcode,
    .property-table-shortcode,
    .property-kpi-shortcode {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .kpi-card,
    .property-chart-shortcode,
    .property-table-shortcode table {
        border: 2px solid #000;
    }
    
    .kpi-trend.positive {
        color: #006600;
    }
    
    .kpi-trend.negative {
        color: #cc0000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .kpi-card,
    .postcode-card,
    .property-data-progress-bar {
        transition: none;
    }
    
    .property-data-loading::before {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .property-chart-shortcode,
    .property-table-shortcode table,
    .kpi-card {
        background: #1a1a1a;
        border-color: #444;
        color: #fff;
    }
    
    .property-table-shortcode th {
        background: #2a2a2a;
    }
    
    .property-table-shortcode tr:hover {
        background: #2a2a2a;
    }
}
