/*
Theme Name: Astra Child - Property Data UK
Description: Child theme for Property Data UK website
Author: Property Data UK
Template: astra
Version: 1.0.0
*/

@import url("../astra/style.css");

/* ==========================================================================
   Property Data UK Custom Styles
   ========================================================================== */

/* Variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --light-bg: #f8fafc;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #374151;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.property-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}

.property-header .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
}

/* Hero Section */
.hero-section {
    background: var(--light-bg);
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* KPI Dashboard */
.kpi-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.kpi-card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.kpi-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--secondary-color);
}

.kpi-trend {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.kpi-trend.positive {
    color: var(--success-color);
}

.kpi-trend.negative {
    color: var(--danger-color);
}

.kpi-trend.neutral {
    color: var(--secondary-color);
}

.kpi-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.kpi-period {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

/* Interactive Map */
.map-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.map-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.map-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.map-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.map-control-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    color: var(--secondary-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-control-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.map-control-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.map-container {
    height: 400px;
    background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.map-placeholder {
    text-align: center;
    color: var(--secondary-color);
}

.map-placeholder-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

/* Tabbed Dashboard */
.analysis-dashboard {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.dashboard-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.tab-navigation {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
}

.tab-button {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    color: var(--secondary-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--primary-color);
    background: #f8fafc;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #f8fafc;
}

.tab-content {
    padding: 2rem;
    display: none;
}

.tab-content.active {
    display: block;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.chart-placeholder {
    height: 200px;
    background: #f1f5f9;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Data Tables */
.data-table-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.table-controls {
    display: flex;
    gap: 0.5rem;
}

.table-control-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    color: var(--secondary-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-control-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.data-table tr:hover {
    background: #f8fafc;
}

.data-table .address-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.data-table .address-link:hover {
    text-decoration: underline;
}

.data-table .price-positive {
    color: var(--success-color);
    font-weight: 500;
}

.data-table .price-negative {
    color: var(--danger-color);
    font-weight: 500;
}

/* Call to Action */
.cta-section {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-button.primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.cta-button.primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.cta-button.secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Demographics Cards */
.demographics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.demographic-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.demographic-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.demographic-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary-color);
}

.demographic-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.demographic-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.demographic-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demographic-stat-value {
    font-weight: 500;
}

.demographic-stat-value.positive {
    color: var(--success-color);
}

.demographic-stat-value.negative {
    color: var(--danger-color);
}

/* Planning Applications */
.planning-applications {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.planning-item {
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    background: #f8fafc;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.planning-item.approved {
    border-left-color: var(--success-color);
}

.planning-item.pending {
    border-left-color: var(--warning-color);
}

.planning-item.rejected {
    border-left-color: var(--danger-color);
}

.planning-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.planning-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1.125rem;
    }
    
    .kpi-dashboard {
        grid-template-columns: 1fr;
    }
    
    .chart-grid {
        grid-template-columns: 1fr;
    }
    
    .demographics-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .map-controls {
        width: 100%;
        justify-content: center;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-controls {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        min-width: 120px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
