/**
 * Price Report Styles
 */

/* Generate button spacing */
#generateReportBtn {
    margin-bottom: 20px;
}

/* Report sections */
.report-section {
    background: #ffffff;
    border: 1px solid var(--vio-border);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.report-section h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--vio-text);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee9e7;
}

/* ── Section 1: Verdict ─────────────────────────────────────────────── */

.report-verdict { border-left: 4px solid #9b9392; }
.report-verdict.verdict-great_deal { border-left-color: #2ea54a; }
.report-verdict.verdict-good_rate  { border-left-color: #43c05c; }
.report-verdict.verdict-fair_rate  { border-left-color: #ff7105; }
.report-verdict.verdict-expensive  { border-left-color: #d91b38; }

.verdict-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.verdict-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 20px;
    background: #eee9e7;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    color: #615a56;
}

.verdict-badge.badge-great_deal { background: #d6fada; color: #0d441c; }
.verdict-badge.badge-good_rate  { background: #d6fada; color: #0d441c; }
.verdict-badge.badge-fair_rate  { background: #fff0e3; color: #9a3b00; }
.verdict-badge.badge-expensive  { background: #ffe7eb; color: #8b0f23; }

.verdict-summary {
    font-size: 14px;
    color: var(--vio-text-muted);
    line-height: 1.8;
    padding-top: 4px;
}

/* ── Dashboard ─────────────────────────────────────────────────────── */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

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

.dash-tile {
    background: #fcf7f5;
    border: 1px solid var(--vio-border);
    border-radius: 6px;
    padding: 14px 16px;
    text-align: center;
}

.dash-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #9b9392;
    margin-bottom: 6px;
}

.dash-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--vio-text);
    line-height: 1.2;
}

.dash-value.dash-positive { color: #2ea54a; }
.dash-value.dash-negative { color: #d91b38; }
.dash-value.dash-neutral  { color: #9b9392; }
.dash-value.dash-amber    { color: #c96000; }
.dash-value.dash-blue     { color: #1e5ba8; }
.dash-value.dash-value-sm { font-size: 15px; }

.dash-sub {
    font-size: 11px;
    color: #9b9392;
    margin-top: 4px;
}

/* ── Rate Over Time chart ───────────────────────────────────────────── */

.rate-chart-container {
    position: relative;
    height: 280px;
    margin-bottom: 12px;
}

/* ── Insights ───────────────────────────────────────────────────────── */

.report-insights {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.insight-line {
    font-size: 13px;
    color: var(--vio-text-muted);
    line-height: 1.5;
    padding: 3px 0;
}

.insight-line .insight-highlight { font-weight: 600; color: var(--vio-text); }
.insight-line.insight-positive   { color: #2ea54a; }
.insight-line.insight-negative   { color: #d91b38; }
.insight-line.insight-neutral    { color: #9b9392; }

/* ── Dates chart ───────────────────────────────────────────────────── */

.dates-chart-container {
    position: relative;
    height: 260px;
    margin-bottom: 12px;
}

/* ── Section descriptions ──────────────────────────────────────────── */

.section-description {
    font-size: 13px;
    color: var(--vio-text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

/* ── Neighbours cards ──────────────────────────────────────────────── */

.neighbours-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .neighbours-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
    .neighbours-cards { grid-template-columns: repeat(2, 1fr); }
}

.neighbour-card {
    background: #fcf7f5;
    border: 1px solid var(--vio-border);
    border-radius: 6px;
    padding: 12px 14px;
    min-width: 0;           /* allow grid item to shrink below content width */
    overflow: hidden;
}

.neighbour-card-selected {
    border: 2px solid var(--vio-primary);
    background: #f8f5ff;
}

.neighbour-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.neighbour-card-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--vio-text);
}

.neighbour-card-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.neighbour-card-badge.badge-positive { background: #d6fada; color: #0d441c; }
.neighbour-card-badge.badge-negative { background: #ffe7eb; color: #8b0f23; }
.neighbour-card-badge.badge-neutral  { background: #eee9e7; color: #615a56; }

.neighbour-card-chart {
    position: relative;
    height: 80px;
    margin-bottom: 6px;
    overflow: hidden;
}

.neighbour-card-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.neighbour-card-rates {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9b9392;
}

.neighbour-card-rates span { display: flex; align-items: center; gap: 4px; }
.neighbour-card-rates .rate-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.neighbour-card-rates .rate-dot.dot-hotel  { background: var(--vio-primary); }
.neighbour-card-rates .rate-dot.dot-market { background: #c5bdba; }

/* ── Neighbour card links ─────────────────────────────────────────── */

.neighbour-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.12s ease;
}

.neighbour-card-link:hover {
    transform: translateY(-1px);
}

.neighbour-card-link:hover .neighbour-card {
    border-color: var(--vio-primary);
    background: #f8f5ff;
    box-shadow: 0 2px 8px rgba(113, 48, 201, 0.10);
}

.neighbour-card-link-current {
    cursor: default;
}

.neighbour-card-link-current:hover {
    transform: none;
}

.neighbour-card-link-current:hover .neighbour-card {
    border-color: var(--vio-primary);
    background: #f8f5ff;
    box-shadow: none;
}

/* ── Neighbours summary ───────────────────────────────────────────── */

.neighbours-summary {
    background: #f8f5ff;
    border: 1px solid #e1ceff;
    border-radius: 6px;
    padding: 16px 20px;
}

.neighbours-summary-text {
    font-size: 14px;
    color: #5700A9;
    line-height: 1.6;
}

/* ── Benchmark Comparison ───────────────────────────────────────────── */

.benchmark-header {
    margin-bottom: 12px;
}

.benchmark-header h2 {
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.benchmark-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
    border: 1px solid var(--vio-border);
    border-radius: 8px;
    background: var(--vio-bg);
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.benchmark-table thead {
    background: var(--vio-bg-light, #fcf7f5);
}

.benchmark-table th {
    padding: 8px 12px;
    font-weight: 600;
    color: var(--vio-text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--vio-border);
}

.benchmark-table th:first-child {
    text-align: left;
}

.benchmark-table th:not(:first-child) {
    text-align: right;
}

.benchmark-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--vio-border);
    font-variant-numeric: tabular-nums;
}

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

.benchmark-table tbody tr:hover {
    background: rgba(113, 48, 201, 0.03);
}

.benchmark-cell-hotel {
    text-align: left;
    min-width: 140px;
}

.benchmark-cell-hotel .benchmark-hotel-name {
    display: block;
    font-weight: 500;
    color: var(--vio-text);
}

.benchmark-cell-hotel .benchmark-your-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #0d5a9e;
    background: #d4ebff;
    border-radius: 3px;
}

.benchmark-cell-hotel .benchmark-deep-dive {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    font-size: 11px;
    color: var(--vio-primary);
    background: transparent;
    border: 1px solid var(--vio-primary);
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

.benchmark-cell-hotel .benchmark-deep-dive:hover {
    background: rgba(113, 48, 201, 0.08);
}

.benchmark-cell-num,
.benchmark-cell-vs {
    text-align: right;
    white-space: nowrap;
}

.benchmark-cell-num {
    width: 72px;
}

.benchmark-cell-vs {
    width: 80px;
}

.benchmark-row-yours {
    background: #e8f4ff !important;
}

.benchmark-row-yours:hover {
    background: #dceeff !important;
}

.benchmark-vs-you.benchmark-cheaper {
    color: #2ea54a;
    font-weight: 600;
}

.benchmark-vs-you.benchmark-pricier {
    color: #d91b38;
    font-weight: 600;
}

/* ── Deep Dive Modal ──────────────────────────────────────────────── */

.deep-dive-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.deep-dive-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.deep-dive-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.deep-dive-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--vio-border);
    position: relative;
}

.deep-dive-header h3 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vio-text-muted);
    margin: 0 0 4px;
}

.deep-dive-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--vio-text);
    margin: 0;
}

.deep-dive-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: var(--vio-text-muted);
    cursor: pointer;
}

.deep-dive-close:hover {
    color: var(--vio-text);
}

.deep-dive-body {
    padding: 20px 24px 24px;
}

.deep-dive-chart-wrap h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--vio-text);
    margin: 0 0 12px;
}

.deep-dive-chart-container {
    height: 240px;
    margin-bottom: 20px;
    position: relative;
}

.deep-dive-chart-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vio-text-muted);
    font-size: 14px;
}

.deep-dive-averages {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--vio-border);
}

.deep-dive-avg-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.deep-dive-avg-label {
    font-size: 12px;
    color: var(--vio-text-muted);
}

.deep-dive-avg-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--vio-text);
}

/* ── Alternative Hotels ────────────────────────────────────────────── */

.alternatives-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alternative-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fcf7f5;
    border: 1px solid var(--vio-border);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.alternative-card:hover {
    border-color: #7130C9;
    background: #f8f5ff;
}

.alt-card-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.alt-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--vio-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alt-card-price {
    font-size: 13px;
    color: var(--vio-text-muted);
}

.alt-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.alt-avg-badge {
    font-size: 11px;
    color: #9b9392;
    padding: 2px 8px;
    background: #eee9e7;
    border-radius: 10px;
}

.alt-drift-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.alt-drift-badge.badge-positive {
    color: #2ea54a;
    background: #d6fada;
}

.alt-drift-badge.badge-negative {
    color: #d91b38;
    background: #ffe0e5;
}

.alt-drift-badge.badge-neutral {
    color: #615a56;
    background: #eee9e7;
}

/* ── Hotel name header ────────────────────────────────────────────── */

.report-hotel-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--vio-text);
    margin-bottom: 12px;
    text-align: center;
}

/* ── Misc ───────────────────────────────────────────────────────────── */

.no-data-inline {
    text-align: center;
    padding: 16px;
    color: #9b9392;
    font-size: 13px;
}

.report-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    font-size: 11px;
    color: #c5bdba;
    padding: 8px 0;
    padding-right: 0.5rem;
}

.report-footer .feedback-trigger-btn {
    margin-right: 0.25rem;
}
