/** HR Passport learner community — scoped, light-first and RTL-safe. */

.hrp-community-panel {
    --hrp-community-navy: #2e3b75;
    --hrp-community-ink: #1e0e3a;
    --hrp-community-crimson: #c30627;
    --hrp-community-surface: #f4f5fa;
    --hrp-community-tint: #edeff7;
    --hrp-community-border: #dddde7;
    --hrp-community-muted: #68697a;
    box-sizing: border-box;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 28px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--hrp-community-border);
    border-radius: 12px;
    background: #fcfafb;
    color: var(--hrp-community-ink);
    font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
}

.hrp-community-panel *,
.hrp-community-panel *::before,
.hrp-community-panel *::after {
    box-sizing: border-box;
}

.hrp-community-panel__header {
    margin-block-end: 18px;
    padding-block-end: 16px;
    border-block-end: 1px solid var(--hrp-community-border);
}

.hrp-community-panel__header h2,
.hrp-community-panel__header p,
.hrp-community-item h3,
.hrp-community-item p,
.hrp-community-empty p {
    margin-block-start: 0;
}

.hrp-community-panel__header h2 {
    margin-block-end: 4px;
    font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.hrp-community-panel__header > p:last-child,
.hrp-community-empty p {
    margin-block-end: 0;
    color: var(--hrp-community-muted);
}

.hrp-community-eyebrow {
    margin-block-end: 2px;
    color: var(--hrp-community-crimson);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hrp-community-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hrp-community-item {
    padding: 16px;
    border: 1px solid var(--hrp-community-border);
    border-radius: 10px;
    background: white;
}

.hrp-community-item h3 {
    margin-block-end: 8px;
    color: var(--hrp-community-ink);
    font-size: 1rem;
}

.hrp-community-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-block-end: 8px;
}

.hrp-community-chip,
.hrp-community-readonly,
.hrp-community-can-reply {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--hrp-community-tint);
    color: var(--hrp-community-navy);
    font-size: 0.75rem;
    font-weight: 700;
}

.hrp-community-readonly {
    background: var(--hrp-community-surface);
    color: var(--hrp-community-muted);
}

.hrp-community-can-reply {
    background: #edf7f2;
    color: #237a57;
}

.hrp-community-thread-text,
.hrp-community-item > p {
    margin-block-end: 0;
    color: var(--hrp-community-ink);
    white-space: pre-line;
}

.hrp-community-empty {
    padding: 20px;
    border: 1px dashed var(--hrp-community-border);
    border-radius: 10px;
    background: var(--hrp-community-surface);
}

.hrp-community-empty strong {
    display: block;
    margin-block-end: 4px;
}

.hrp-community-panel :focus-visible {
    outline: 3px solid #d34761;
    outline-offset: 2px;
}

[dir="rtl"] .hrp-community-eyebrow {
    letter-spacing: 0;
}

@media (max-width: 480px) {
    .hrp-community-panel {
        min-width: 0;
        padding: 16px;
    }

    .hrp-community-item {
        padding: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hrp-community-panel *,
    .hrp-community-panel *::before,
    .hrp-community-panel *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
