/* NZ Interactive Layer - Auckland article specific styles */

:root {
    --nz-primary: #2563eb;
    --nz-primary-hover: #1d4ed8;
    --nz-text: #1e293b;
    --nz-muted: #64748b;
    --nz-border: #e2e8f0;
    --nz-bg: #ffffff;
    --nz-radius: 12px;
    --nz-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Cost Factor Cards */
.factor-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

@media (min-width: 640px) {
    .factor-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.factor-card {
    background: var(--nz-bg);
    border: 1px solid var(--nz-border);
    border-radius: var(--nz-radius);
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.factor-card:hover {
    border-color: var(--nz-primary);
    box-shadow: var(--nz-shadow);
}

.factor-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 10px;
    color: var(--nz-primary);
}

.factor-icon svg {
    width: 24px;
    height: 24px;
}

.factor-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--nz-text);
    margin-bottom: 4px;
}

.factor-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--nz-muted);
}

/* Rent Comparison Visual */
.rent-comparison {
    background: var(--nz-bg);
    border: 1px solid var(--nz-border);
    border-radius: var(--nz-radius);
    padding: 20px 24px;
    margin: 24px 0;
}

.rent-comparison-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--nz-text);
    margin: 0 0 18px;
}

.rent-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rent-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rent-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rent-bar-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--nz-text);
}

.rent-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 6px;
    color: var(--nz-primary);
}

.rent-icon svg {
    width: 16px;
    height: 16px;
}

.rent-bar-range {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--nz-primary);
}

.rent-bar-track {
    height: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
}

.rent-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--nz-primary), #3b82f6);
    transition: width 0.3s ease;
}

/* Grocery Table */
.grocery-table-wrap {
    margin: 20px 0;
    overflow-x: auto;
}

.grocery-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: var(--nz-bg);
    border: 1px solid var(--nz-border);
    border-radius: var(--nz-radius);
    overflow: hidden;
}

.grocery-table th,
.grocery-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--nz-border);
}

.grocery-table th {
    font-weight: 600;
    color: var(--nz-muted);
    background: #f8fafc;
}

.grocery-table thead th:first-child {
    font-weight: 700;
    color: var(--nz-text);
}

.grocery-table td {
    color: var(--nz-text);
}

.grocery-table td:first-child {
    font-weight: 600;
}

.grocery-table tr:last-child td {
    border-bottom: none;
}

.grocery-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 6px;
    color: var(--nz-primary);
    margin-right: 10px;
    vertical-align: middle;
}

.grocery-icon svg {
    width: 16px;
    height: 16px;
}

/* Supermarket List */
.supermarket-list {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: var(--nz-radius);
    border: 1px solid var(--nz-border);
}

.supermarket-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--nz-muted);
    margin: 0 0 12px;
}

.supermarket-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.supermarket-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: var(--nz-bg);
    border: 1px solid var(--nz-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--nz-text);
}

/* Transport Comparison */
.transport-compare {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
}

@media (min-width: 640px) {
    .transport-compare {
        grid-template-columns: repeat(2, 1fr);
    }
}

.transport-option {
    background: var(--nz-bg);
    border: 1px solid var(--nz-border);
    border-radius: var(--nz-radius);
    padding: 20px;
    position: relative;
}

.transport-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.transport-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--nz-text);
    margin: 0;
}

.transport-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.transport-icon svg {
    width: 22px;
    height: 22px;
}

.transport-icon-public {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.transport-icon-car {
    background: rgba(234, 88, 12, 0.12);
    color: #ea580c;
}

.transport-details {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.transport-details li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--nz-muted);
    border-bottom: 1px solid var(--nz-border);
}

.transport-details li:last-child {
    border-bottom: none;
}

.transport-details li strong {
    color: var(--nz-text);
}

.transport-cost-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
}

.transport-cost-low {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.transport-cost-high {
    background: rgba(234, 88, 12, 0.12);
    color: #ea580c;
}

/* Utilities Grid */
.utilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

@media (max-width: 640px) {
    .utilities-grid {
        grid-template-columns: 1fr;
    }
}

.utility-card {
    background: var(--nz-bg);
    border: 1px solid var(--nz-border);
    border-radius: var(--nz-radius);
    padding: 18px;
    text-align: center;
}

.utility-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 10px;
    color: var(--nz-primary);
}

.utility-icon svg {
    width: 20px;
    height: 20px;
}

.utility-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--nz-muted);
    margin-bottom: 6px;
}

.utility-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--nz-primary);
}

.utility-period {
    display: block;
    font-size: 0.75rem;
    color: var(--nz-muted);
    margin-top: 2px;
}

/* Lifestyle Breakdown */
.lifestyle-breakdown {
    background: var(--nz-bg);
    border: 1px solid var(--nz-border);
    border-radius: var(--nz-radius);
    padding: 20px;
    margin: 20px 0;
}

.lifestyle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--nz-border);
}

.lifestyle-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lifestyle-item:first-child {
    padding-top: 0;
}

.lifestyle-category {
    font-size: 0.95rem;
    color: var(--nz-text);
}

.lifestyle-range {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--nz-primary);
}

/* Budget Cards Grid */
.budget-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 24px 0;
}

@media (min-width: 768px) {
    .budget-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .budget-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.budget-card-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--nz-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.budget-card-icon svg {
    width: 18px;
    height: 18px;
}

.budget-card-family {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.04) 100%);
    border-color: rgba(37, 99, 235, 0.25);
}

/* Setup Checklist */
.setup-checklist {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 20px 0;
}

@media (min-width: 640px) {
    .setup-checklist {
        grid-template-columns: repeat(2, 1fr);
    }
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--nz-text);
}

.checklist-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #16a34a;
}

.checklist-icon svg {
    width: 24px;
    height: 24px;
}

/* Savings Target */
.savings-target {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.04) 100%);
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--nz-radius);
    padding: 24px;
    text-align: center;
    margin: 24px 0;
}

.savings-target-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.savings-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.12);
    border-radius: 10px;
    color: var(--nz-primary);
}

.savings-icon svg {
    width: 20px;
    height: 20px;
}

.savings-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--nz-muted);
}

.savings-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--nz-primary);
    margin-bottom: 8px;
}

.savings-note {
    font-size: 0.9rem;
    color: var(--nz-muted);
    margin: 0;
}

/* Calculator Features */
.calculator-features {
    background: #f8fafc;
    border-radius: var(--nz-radius);
    padding: 20px 24px;
    margin: 20px 0;
}

.calculator-features p {
    margin: 0 0 12px;
}

.calculator-features ul {
    margin: 0;
    padding-left: 20px;
}

.calculator-features ul li {
    padding: 4px 0;
    color: var(--nz-text);
}

/* CTA Box */
.cta-box {
    text-align: center;
    margin: 32px 0;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--nz-primary) 0%, var(--nz-primary-hover) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 16px 32px;
    border-radius: var(--nz-radius);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* Final Thoughts */
.final-thoughts {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(37, 99, 235, 0.01) 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--nz-radius);
    padding: 24px;
    margin: 32px 0;
}

.final-thoughts .article-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.final-thoughts p {
    margin: 12px 0;
    line-height: 1.6;
}

.final-thoughts p:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .rent-bar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .rent-bar-range {
        font-size: 0.85rem;
    }
    
    .savings-amount {
        font-size: 1.6rem;
    }
    
    .cta-button {
        display: block;
        padding: 14px 24px;
        font-size: 1rem;
    }
}
