/**
 * Hilanaw Community — Report Styles
 * Covers: investor report view page, consent/redaction UI,
 *         report section cards, and dark mode.
 *
 * @package Hilanaw_Community
 * @version 1.0.0
 */

/* ============================================================
   REPORT VIEW PAGE
   ============================================================ */
.hcr-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px 60px;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--hc-text);
}

/* ── Report header ───────────────────────────────────────────────── */
.hcr-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 32px 0 20px;
    border-bottom: 1px solid var(--hc-border);
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.hcr-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--hc-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 6px;
}

.hcr-header__meta {
    font-size: 12px;
    color: var(--hc-text-faint);
    margin: 0;
}

/* ── Entrepreneur identity card ──────────────────────────────────── */
.hcr-identity {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: var(--hc-surface-alt);
    border: 1.5px solid var(--hc-border);
    border-radius: var(--hc-radius);
    padding: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hcr-identity__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--hc-blue-light);
    color: var(--hc-blue);
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--hc-border);
}

.hcr-identity__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hcr-identity__info { flex: 1; }

.hcr-identity__name {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--hc-text);
    line-height: 1.2;
}

.hcr-identity__business {
    font-size: 14px;
    color: var(--hc-text-soft);
    margin: 0 0 10px;
}

.hcr-identity__tags {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.hcr-location {
    font-size: 13px;
    color: var(--hc-text-soft);
}

.hcr-identity__profile-link { flex-shrink: 0; align-self: center; }

/* ── Redaction notice ────────────────────────────────────────────── */
.hcr-redaction-notice {
    background: #fef9c3;
    border: 1px solid #fcd34d;
    border-radius: var(--hc-radius-sm);
    padding: 10px 16px;
    font-size: 13px;
    color: #854d0e;
    margin-bottom: 24px;
}

/* ── Report sections ─────────────────────────────────────────────── */
.hcr-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hcr-section {
    background: var(--hc-surface);
    border: 1.5px solid var(--hc-border);
    border-radius: var(--hc-radius);
    padding: 24px;
    transition: box-shadow var(--hc-transition);
}

.hcr-section:hover { box-shadow: var(--hc-shadow); }

/* Featured section (executive summary) */
.hcr-section--featured {
    border-color: var(--hc-blue);
    background: var(--hc-blue-light);
}

.hcr-section--recommendation {
    border-color: var(--hc-blue);
    border-width: 2px;
}

.hcr-section--strengths {
    border-left: 4px solid var(--hc-green);
}

.hcr-section--considerations {
    border-left: 4px solid var(--hc-amber);
}

.hcr-section__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hc-text);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hcr-section--featured .hcr-section__title { color: var(--hc-blue); }

.hcr-section__icon { font-size: 18px; }

.hcr-section__text {
    font-size: 15px;
    color: var(--hc-text-mid);
    line-height: 1.75;
    margin: 0;
    white-space: pre-line;
}

/* Two-column layout for strengths + considerations */
.hcr-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hcr-list {
    margin: 0;
    padding: 0 0 0 20px;
}

.hcr-list li {
    font-size: 14px;
    color: var(--hc-text-mid);
    line-height: 1.6;
    margin-bottom: 8px;
}

.hcr-list--strengths li::marker { color: var(--hc-green); }
.hcr-list--considerations li::marker { color: var(--hc-amber); }

/* ── Report footer ───────────────────────────────────────────────── */
.hcr-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--hc-border);
}

.hcr-footer__disclaimer {
    font-size: 12px;
    color: var(--hc-text-faint);
    line-height: 1.6;
    margin: 0 0 16px;
}

.hcr-footer__actions {
    display: flex;
    gap: 10px;
}

/* ============================================================
   CONSENT / REDACTION UI
   ============================================================ */
.hcr-consent {
    padding: 4px 0;
}

/* Funder info row */
.hcr-consent__funder {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.hcr-consent__funder-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hc-blue-light);
    color: var(--hc-blue);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.hcr-consent__funder-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hcr-consent__funder-name {
    font-size: 15px;
    margin: 0 0 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hcr-consent__funder-role {
    font-size: 11px;
    background: var(--hc-blue-light);
    color: var(--hc-blue);
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 600;
}

.hcr-consent__funder-meta {
    font-size: 12px;
    color: var(--hc-text-faint);
    margin: 0 0 4px;
}

.hcr-consent__profile-link {
    font-size: 13px;
    color: var(--hc-blue);
    text-decoration: none;
}

.hcr-consent__profile-link:hover { text-decoration: underline; }

/* Message block */
.hcr-consent__message {
    background: var(--hc-surface-alt);
    border: 1.5px solid var(--hc-border);
    border-radius: var(--hc-radius-sm);
    padding: 12px 14px;
    margin-bottom: 20px;
}

.hcr-consent__message-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--hc-text-faint);
    margin: 0 0 6px;
}

.hcr-consent__message-body {
    font-size: 14px;
    color: var(--hc-text-mid);
    margin: 0;
    line-height: 1.6;
}

/* Redaction preview */
.hcr-consent__preview {
    border: 1.5px solid var(--hc-border);
    border-radius: var(--hc-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.hcr-consent__preview-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    padding: 14px 16px 0;
    color: var(--hc-text);
}

.hcr-consent__preview-hint {
    font-size: 12px;
    color: var(--hc-text-faint);
    margin: 4px 0 16px;
    padding: 0 16px;
}

/* Layers */
.hcr-layer {
    border-top: 1px solid var(--hc-border);
    padding: 14px 16px;
}

.hcr-layer__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--hc-text-mid);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.hcr-layer__items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Redact items (checkboxes) */
.hcr-redact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--hc-radius-sm);
    border: 1px solid transparent;
    transition: background var(--hc-transition), border-color var(--hc-transition);
}

.hcr-redact-item:hover {
    background: var(--hc-surface-alt);
}

.hcr-redact-item:has(.hcr-redact-checkbox:not(:checked)) {
    background: #fee2e2;
    border-color: #fca5a5;
    opacity: 0.7;
}

.hcr-redact-checkbox {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--hc-blue);
    cursor: pointer;
}

.hcr-redact-item__content { flex: 1; }

.hcr-redact-item__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hc-text);
    margin-bottom: 2px;
}

.hcr-redact-item__preview {
    display: block;
    font-size: 12px;
    color: var(--hc-text-faint);
    line-height: 1.4;
}

/* Actions */
.hcr-consent__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hcr-consent__feedback {
    margin-top: 12px;
    min-height: 18px;
}

/* ============================================================
   LOCKED REPORT BUTTON (investor/org without active pass)
   ============================================================ */
.hcp-report-locked-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.hcp-report-locked {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none;
}

.hcp-report-locked__tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    left: auto;
    transform: none;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    max-width: 220px;
    width: max-content;
    padding: 6px 10px;
    border-radius: 6px;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

/* Arrow — aligned to right side */
.hcp-report-locked__tip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    left: auto;
    transform: none;
    border: 5px solid transparent;
    border-top-color: #1e293b;
}

.hcp-report-locked-wrap:hover .hcp-report-locked__tip,
.hcp-report-locked-wrap:focus-within .hcp-report-locked__tip {
    display: block;
}

body.hilanaw-dark-mode .hcp-report-locked__tip {
    background: #f1f5f9;
    color: #1e293b;
}
body.hilanaw-dark-mode .hcp-report-locked__tip::after {
    border-top-color: #f1f5f9;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .hcr-two-col    { grid-template-columns: 1fr; }
    .hcr-identity   { flex-direction: column; }
    .hcr-header     { flex-direction: column; }
}

/* ============================================================
   DARK MODE
   ============================================================ */
body.hilanaw-dark-mode .hcr-section           { background: #1f2937; border-color: #374151; }
body.hilanaw-dark-mode .hcr-section--featured { background: #1e3a5f; border-color: #3b82f6; }
body.hilanaw-dark-mode .hcr-section--featured .hcr-section__title { color: #93c5fd; }
body.hilanaw-dark-mode .hcr-section--recommendation { border-color: #3b82f6; }
body.hilanaw-dark-mode .hcr-section--strengths { border-left-color: #16a34a; }
body.hilanaw-dark-mode .hcr-section--considerations { border-left-color: #d97706; }
body.hilanaw-dark-mode .hcr-identity          { background: #111827; border-color: #374151; }
body.hilanaw-dark-mode .hcr-identity__avatar  { background: #1e3a5f; color: #93c5fd; }
body.hilanaw-dark-mode .hcr-redaction-notice  { background: #292524; border-color: #78350f; color: #fcd34d; }
body.hilanaw-dark-mode .hcr-consent__message  { background: #111827; border-color: #374151; }
body.hilanaw-dark-mode .hcr-consent__preview  { border-color: #374151; }
body.hilanaw-dark-mode .hcr-layer             { border-top-color: #374151; }
body.hilanaw-dark-mode .hcr-redact-item:hover { background: #1f2937; }
body.hilanaw-dark-mode .hcr-redact-item:has(.hcr-redact-checkbox:not(:checked)) {
    background: #450a0a;
    border-color: #991b1b;
}
body.hilanaw-dark-mode .hcr-consent__funder-avatar { background: #1e3a5f; color: #93c5fd; }
