/* ==========================================================================
   V2 Design System — 60/40 Split Layout
   ========================================================================== */

/* --- Layout Override ---
   Make V2 pages use full viewport width, zero padding for edge-to-edge layout */
.rz-row.rz-mx-auto:has(.v2-page) {
    max-width: unset !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* --- Page Container (60/40 flex split) --- */
.v2-page {
    display: flex;
    height: calc(100vh - 51px);
    overflow: hidden;
    width: 100%;
}

/* --- Data Panel (left 60%) --- */
.v2-data-panel {
    width: 60%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--rz-base-400);
    overflow: hidden;
    position: relative;
}

/* --- Property Detail: flip to 40/60 split --- */
.v2-page--property-detail .v2-data-panel {
    width: 40%;
}

.v2-page--property-detail .v2-map-panel {
    width: 60%;
}

/* --- Expanded Data: 90/10 split --- */
.v2-page--data-expanded .v2-data-panel {
    width: 90%;
}

.v2-page--data-expanded .v2-map-panel {
    width: 10%;
}

/* --- Loading Overlay --- */
.v2-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

/* --- Map Panel (right 40%) --- */
.v2-map-panel {
    width: 40%;
    position: relative;
}

.v2-map-panel .v2-map-container {
    width: 100%;
    height: 100%;
}

/* --- Panel Header --- */
.panel-header {
    flex-shrink: 0;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rz-base-400);
}

/* --- Panel Content --- */
.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background: var(--rz-base-400);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: var(--rz-base-500);
}

/* --- Override DistrictList inline styles --- */
.v2-data-panel .v2-grid > div[style] {
    width: 100% !important;
    height: auto !important;
}

.v2-data-panel .v2-grid .rz-data-grid {
    max-height: none !important;
}

/* --- Override map component inline height --- */
.v2-map-panel > .v2-map-container > div[style*="height"] {
    height: 100% !important;
}

/* --- Back Button --- */
.v2-back-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--rz-primary);
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.v2-back-button:hover {
    background: var(--rz-base-200);
}

.v2-back-button .rzi {
    font-size: 1rem;
}

/* --- Breadcrumb --- */
.v2-breadcrumb {
    margin-bottom: 8px;
}

/* --- Page Header --- */
.v2-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 0;
}

.v2-page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--rz-text-color);
}

/* --- District Info Card --- */
.v2-district-info-card {
    background: var(--rz-base-100);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--rz-shadow-2);
}

/* --- Detail Table (label | value rows) --- */
.v2-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.v2-detail-table th,
.v2-detail-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--rz-base-300);
    font-size: 0.875rem;
    vertical-align: top;
}

.v2-detail-table th {
    width: 140px;
    font-weight: 600;
    color: var(--rz-text-secondary-color);
    text-align: left;
    white-space: nowrap;
}

.v2-detail-table td {
    color: var(--rz-text-color);
}

.v2-detail-table tr:last-child th,
.v2-detail-table tr:last-child td {
    border-bottom: none;
}

/* --- Section Card --- */
.v2-section-card {
    border: 1px solid var(--rz-base-400);
    border-radius: 6px;
    padding: 12px;
    background: var(--rz-base-background-color);
}

/* --- Info Grid (compact label/value pairs) --- */
.v2-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px 16px;
}

.v2-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.v2-info-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--rz-text-secondary-color);
    margin: 0;
}

.v2-info-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rz-text-color);
    margin: 0;
}

/* --- Dense Grid Overrides --- */
.v2-grid .rz-data-grid {
    font-size: 0.85rem;
}

.v2-grid .rz-cell {
    padding: 6px 8px;
}

.v2-grid .rz-column-title {
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- Badges --- */
.v2-badge-active {
    margin-left: 8px;
}

/* --- Tabs --- */
.v2-tabs .rz-tabview-nav {
    margin-bottom: 0;
    gap: 4px;
    border-bottom: none;
    background: var(--rz-base-200);
    border-radius: 8px;
    padding: 4px;
}

.v2-tabs .rz-tabview-nav .rz-tabview-nav-link {
    border-radius: 6px;
    border: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.v2-tabs .rz-tabview-nav .rz-state-active .rz-tabview-nav-link {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.v2-tabs .rz-tabview-panel {
    padding: 8px 0;
}
