/**
 * MPReviews.city - Hybrid Modern Design
 * Server-side rendered with modern UI
 */

:root {
    --bg: #f5f7fb;
    --ink: #1f2937;
    --muted: #6b7280;
    --card: #ffffff;
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --line: #e5e7eb;
    --ok: #16a34a;
    --warn: #f59e0b;
    --danger: #ef4444;
    --purple: #667eea;
    --purple-dark: #5568d3;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Top Navigation Bar */
.topbar {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.crumbs {
    font-size: 14px;
    opacity: 0.95;
}

.crumbs a {
    color: white;
    opacity: 0.9;
}

.crumbs a:hover {
    opacity: 1;
}

.brand {
    margin-left: auto;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.topbar-cta {
    background: white;
    color: var(--purple);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.topbar-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Layout */
.wrap {
    max-width: 1240px;
    margin: 20px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
}

@media (max-width: 920px) {
    .wrap {
        grid-template-columns: 1fr;
    }
    .sidebar {
        order: 2;
    }
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.side-panel h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.side-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-panel li {
    padding: 10px 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.side-panel li:hover {
    background: #f9fafb;
}

.side-panel li a {
    color: var(--ink);
    font-weight: 500;
    flex: 1;
}

.side-panel li small {
    color: var(--muted);
    font-size: 13px;
}

/* Main Panel */
.main-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.panel-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 2px solid var(--line);
    background: #fafbfc;
}

.panel-head h1 {
    font-size: 20px;
    margin: 0;
    font-weight: 700;
    color: var(--ink);
}

.panel-head .stats {
    font-size: 14px;
    color: var(--muted);
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    background: white;
    border: 1px solid var(--line);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: #f9fafb;
    border-color: var(--accent);
}

.btn.active {
    background: #e0f2fe;
    border-color: #0ea5e9;
    color: #0369a1;
}

.btn-group {
    display: flex;
    gap: 0;
}

.btn-group .btn {
    border-radius: 0;
    border-right: none;
}

.btn-group .btn:first-child {
    border-radius: 8px 0 0 8px;
}

.btn-group .btn:last-child {
    border-radius: 0 8px 8px 0;
    border-right: 1px solid var(--line);
}

.select {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    color: var(--ink);
}

/* List View */
.list-view {
    display: flex;
    flex-direction: column;
}

.provider-row {
    display: grid;
    grid-template-columns: 100px 1fr 110px 130px 110px auto;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    align-items: center;
    transition: background 0.2s;
}

.provider-row:hover {
    background: #fafbfc;
}

.provider-row:last-child {
    border-bottom: none;
}

@media (max-width: 1100px) {
    .provider-row {
        grid-template-columns: 80px 1fr 100px auto;
    }
    .hide-md {
        display: none;
    }
}

@media (max-width: 720px) {
    .provider-row {
        grid-template-columns: 70px 1fr;
    }
    .hide-sm {
        display: none;
    }
}

.provider-thumb {
    width: 100%;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
}

.provider-info h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--ink);
}

.provider-info .meta {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 12px;
    color: #374151;
    border: 1px solid var(--line);
    font-weight: 500;
}

.badge.type-parlor {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.badge.type-independent {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.stars {
    color: var(--warn);
    font-size: 14px;
}

.rating-box {
    text-align: center;
}

.rating-score {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    display: block;
}

.rating-label {
    font-size: 12px;
    color: var(--muted);
}

.review-count {
    font-size: 13px;
    color: var(--muted);
}

.provider-cta {
    background: var(--purple);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.provider-cta:hover {
    background: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    text-decoration: none;
}

/* Grid View */
.grid-view {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
}

@media (max-width: 900px) {
    .grid-view {
        grid-template-columns: 1fr;
    }
}

.provider-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    background: white;
}

.provider-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.provider-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--purple);
}

.provider-card .meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
}

.provider-card .badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.provider-card .stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.no-results h2 {
    color: var(--ink);
    margin-bottom: 10px;
}

/* CTA Footer */
.cta-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-top: 2px solid var(--line);
    background: linear-gradient(135deg, #f0f9ff 0%, #f5f3ff 100%);
}

.cta-footer p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.cta-footer .cta-btn {
    background: var(--purple);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s;
    display: inline-block;
}

.cta-footer .cta-btn:hover {
    background: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

/* Hint/Helper Text */
.hint {
    padding: 12px 20px;
    font-size: 14px;
    color: var(--muted);
    background: #fafbfc;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .panel-head {
        padding: 12px 16px;
    }
    .panel-head h1 {
        font-size: 18px;
    }
    .controls {
        width: 100%;
    }
    .btn-group {
        flex: 1;
    }
    .select {
        flex: 1;
    }
}

/* State Page Specific Styles */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.provider-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.provider-location {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.provider-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rating-score {
    font-weight: 600;
    color: var(--ink);
}

.provider-reviews {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 12px;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
}

.city-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.city-card:hover {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: var(--accent);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Enhanced Provider Cards */
.provider-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    background: var(--card);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--accent);
}

/* Enhanced Stats Display */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 15px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-item span:first-child {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-item span:last-child {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Enhanced Content Sections */
.content-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--line);
    line-height: 1.8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.content-section h2 {
    color: var(--purple);
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.content-section h3 {
    color: var(--ink);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.content-section p {
    color: var(--muted);
    margin-bottom: 16px;
}

/* Enhanced Sidebar */
.side-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 16px;
}

.side-panel h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-panel li {
    padding: 10px 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.side-panel li:hover {
    background: #f2f4f8;
}

.side-panel li a {
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
}

.side-panel li a:hover {
    color: var(--accent);
}

.side-panel li small {
    color: var(--muted);
    font-size: 0.8rem;
}

/* Pagination Styles */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    text-decoration: none;
    color: var(--ink);
    background: white;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    text-decoration: none;
}

.pagination-btn.current {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 600;
}

.pagination-info {
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 14px;
}

