/* TalentHub/css/talent-profile.css — v4.1 (Style Fix)
   Fixes: star rendering · score layout · card spacing · uppercase text
   Import AFTER talenthub.css and upgrades.css
   ──────────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════════
   1. RATE BUTTON (ph-actions)
══════════════════════════════════════════════════════════════════ */
.btn-rate {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1.5px solid rgba(251,191,36,0.5);
    color: #fbbf24;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}
.btn-rate:hover {
    background: rgba(251,191,36,0.12);
    border-color: #fbbf24;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(251,191,36,0.25);
}
.btn-rate:active { transform: translateY(0) scale(0.97); transition-duration: 60ms; }
.btn-rate i { font-size: 0.82rem; }

/* ══════════════════════════════════════════════════════════════════
   2. STAR DISPLAY — uses only "fas" (solid) to avoid FA regular-pack issues
      Empty stars = solid but dimmed with opacity
══════════════════════════════════════════════════════════════════ */
.star-icon {
    display: inline-block;
    font-style: normal;  /* reset any inherited italic */
}
.star-icon.filled { color: #fbbf24; }
.star-icon.half   { color: #fbbf24; opacity: 0.6; }
.star-icon.empty  { color: #fbbf24; opacity: 0.18; }

/* ══════════════════════════════════════════════════════════════════
   3. RATING MODAL OVERLAY
══════════════════════════════════════════════════════════════════ */
.rm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9100;
    background: rgba(4, 4, 8, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.rm-overlay.rm-open { opacity: 1; }

/* ══════════════════════════════════════════════════════════════════
   4. RATING MODAL BOX
══════════════════════════════════════════════════════════════════ */
.rm-modal {
    background: #111118;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: 0 0 0 1px rgba(251,191,36,0.05), 0 28px 80px rgba(0,0,0,0.75);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.rm-overlay.rm-open .rm-modal { transform: translateY(0) scale(1); }
.rm-modal::-webkit-scrollbar       { width: 4px; }
.rm-modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── Modal header ────────────────────────────────────────────── */
.rm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 12px;
}
.rm-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rm-target-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
}
.rm-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f0f0f5;
    margin: 0 0 3px;
    letter-spacing: -0.2px;
}
.rm-subtitle {
    font-size: 0.76rem;
    color: #7a7a96;
    margin: 0;
}
.rm-close {
    background: rgba(255,255,255,0.06);
    border: none;
    color: #7a7a96;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.rm-close:hover { background: rgba(255,255,255,0.12); color: #f0f0f5; }

/* ── Section ─────────────────────────────────────────────────── */
.rm-section { margin-bottom: 1.35rem; }

.rm-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #6a6a82;
    font-weight: 700;
    margin-bottom: 10px;
}
.rm-required { color: #ef4444; margin-left: 2px; }
.rm-optional { color: #4a4a62; font-weight: 400; text-transform: none; font-size: 0.68rem; letter-spacing: 0; }

/* ── Modal star buttons ──────────────────────────────────────── */
.rm-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.rm-star-btn {
    background: transparent;
    border: none;
    font-size: 2.4rem;
    color: rgba(251,191,36,0.18);
    cursor: pointer;
    padding: 2px 3px;
    transition: color 0.12s, transform 0.12s;
    line-height: 1;
    border-radius: 6px;
    -webkit-text-stroke: 0;
}
.rm-star-btn i { pointer-events: none; }
.rm-star-btn.hovered { color: #fbbf24; transform: scale(1.2); }
.rm-star-btn.active  { color: #fbbf24; transform: scale(1.08); }
.rm-star-btn:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; border-radius: 4px; }

.rm-rating-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #6a6a82;
    min-height: 1.4em;
    transition: color 0.2s;
    letter-spacing: 0;
    text-transform: none;
}

/* Shake animation */
@keyframes rm-shake {
    0%,100% { transform: translateX(0); }
    20%,60%  { transform: translateX(-7px); }
    40%,80%  { transform: translateX(7px); }
}
.rm-shake { animation: rm-shake 0.42s ease; }

/* ── Highlight badges ────────────────────────────────────────── */
.rm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.rm-badge {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 30px;
    color: #8a8aa8;
    font-size: 0.78rem;
    font-family: 'DM Sans', sans-serif;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
    text-transform: none;
    letter-spacing: 0;
}
.rm-badge:hover {
    border-color: rgba(251,191,36,0.4);
    color: #f0f0f5;
    transform: translateY(-1px);
}
.rm-badge.selected {
    background: rgba(251,191,36,0.1);
    border-color: rgba(251,191,36,0.55);
    color: #fbbf24;
    font-weight: 600;
}

/* ── Textarea ────────────────────────────────────────────────── */
.rm-textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    color: #f0f0f5;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    text-transform: none;
}
.rm-textarea:focus {
    border-color: rgba(251,191,36,0.5);
    box-shadow: 0 0 0 3px rgba(251,191,36,0.07);
}
.rm-textarea::placeholder { color: rgba(255,255,255,0.2); }

.rm-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 7px;
}
.rm-char-count    { font-size: 0.71rem; color: #4a4a62; transition: color 0.2s; }
.rm-privacy-note  { font-size: 0.7rem; color: #4a4a62; display: flex; align-items: center; gap: 4px; }

/* ── Error ───────────────────────────────────────────────────── */
.rm-error {
    min-height: 1.2em;
    font-size: 0.8rem;
    color: #ef4444;
    margin: 0 0 0.8rem;
    font-weight: 500;
}

/* ── Modal action buttons ─────────────────────────────────────── */
.rm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    padding-top: 1rem;
    margin-top: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.rm-btn-cancel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #7a7a96;
    padding: 10px 22px;
    border-radius: 9px;
    font-size: 0.85rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.18s;
    text-transform: none;
}
.rm-btn-cancel:hover { background: rgba(255,255,255,0.05); color: #f0f0f5; }

.rm-btn-submit {
    background: #fbbf24;
    border: none;
    color: #1a0e00;
    padding: 10px 24px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: filter 0.18s, transform 0.15s, background 0.3s;
    box-shadow: 0 4px 16px rgba(251,191,36,0.35);
    text-transform: none;
}
.rm-btn-submit:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-1px); }
.rm-btn-submit:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* "Write a Review" open button */
.rm-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(251,191,36,0.08);
    border: 1.5px solid rgba(251,191,36,0.3);
    color: #fbbf24;
    padding: 9px 18px;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.18s;
    margin-bottom: 1.25rem;
    text-transform: none;
}
.rm-open-btn:hover { background: rgba(251,191,36,0.15); transform: translateY(-1px); }

/* ══════════════════════════════════════════════════════════════════
   5. REVIEW SECTION WRAPPER
══════════════════════════════════════════════════════════════════ */
.rv-wrap {
    padding: 0.25rem 0;
    /* Reset any uppercase inheritance from content-card h2 or surrounding context */
    text-transform: none;
    font-family: 'DM Sans', sans-serif;
}
.rv-wrap * { text-transform: none; }

/* ══════════════════════════════════════════════════════════════════
   6. SUMMARY BLOCK — score + bar breakdown
══════════════════════════════════════════════════════════════════ */
.rv-summary {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255,255,255,0.028);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

/* Left: big score */
.rv-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 88px;
}
.rv-score-big {
    font-family: 'Syne', sans-serif;
    font-size: 3.6rem;
    font-weight: 800;
    color: #f0f0f5;
    line-height: 1;
    letter-spacing: -2px;
}
.rv-stars-row {
    display: flex;
    gap: 3px;
    align-items: center;
}
.rv-score-sub {
    font-size: 0.72rem;
    color: #6a6a82;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
    /* Stars must NOT appear here */
    display: block;
}
.rv-score-sub i { display: none !important; } /* belt-and-suspenders guard */

/* Right: breakdown bars */
.rv-breakdown {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    justify-content: center;
}
.rv-bar-row {
    display: flex;
    align-items: center;
    gap: 7px;
}
.rv-bar-label {
    width: 10px;
    text-align: right;
    flex-shrink: 0;
    font-size: 0.72rem;
    color: #7a7a96;
    font-weight: 600;
}
.rv-bar-star {
    color: #fbbf24;
    font-size: 0.6rem;
    flex-shrink: 0;
}
.rv-bar-track {
    flex: 1;
    height: 7px;
    background: rgba(255,255,255,0.07);
    border-radius: 4px;
    overflow: hidden;
}
.rv-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}
.rv-bar-count {
    width: 20px;
    text-align: left;
    flex-shrink: 0;
    font-size: 0.7rem;
    color: #6a6a82;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════
   7. TRUST CHIPS ROW
══════════════════════════════════════════════════════════════════ */
.rv-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
}
.rv-trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid;
    border-radius: 30px;
    padding: 5px 13px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}
.rv-trust-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

/* ══════════════════════════════════════════════════════════════════
   8. "YOU'VE ALREADY REVIEWED" BANNER
══════════════════════════════════════════════════════════════════ */
.rv-mine-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    background: rgba(34,197,94,0.06);
    border: 1px solid rgba(34,197,94,0.22);
    border-radius: 10px;
    font-size: 0.82rem;
    color: #4ade80;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
    line-height: 1.4;
}
.rv-mine-banner i { flex-shrink: 0; color: #22c55e; }
.rv-edit-inline {
    background: none;
    border: none;
    color: #4ade80;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
    padding: 0;
    font-weight: 600;
    transition: color 0.15s;
}
.rv-edit-inline:hover { color: #86efac; }

/* ══════════════════════════════════════════════════════════════════
   9. REVIEW CARDS
══════════════════════════════════════════════════════════════════ */
.rv-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rv-card {
    background: rgba(255,255,255,0.024);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 1.1rem 1.25rem 0.9rem;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    animation: rvCardIn 0.3s ease backwards;
    position: relative;
}
.rv-card:hover {
    border-color: rgba(255,255,255,0.13);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.rv-card-mine {
    background: rgba(251,191,36,0.035);
    border-color: rgba(251,191,36,0.2);
}

@keyframes rvCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.rv-list .rv-card:nth-child(1)  { animation-delay:   0ms; }
.rv-list .rv-card:nth-child(2)  { animation-delay:  60ms; }
.rv-list .rv-card:nth-child(3)  { animation-delay: 110ms; }
.rv-list .rv-card:nth-child(4)  { animation-delay: 160ms; }
.rv-list .rv-card:nth-child(n+5){ animation-delay: 200ms; }

/* ── Card header: avatar + name + stars ──────────────────────── */
.rv-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}
.rv-reviewer-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.rv-initials-avatar {
    background: linear-gradient(135deg, #1a1a2e, #12122a);
    color: var(--primary, #FF6F00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
}
.rv-reviewer-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f0f0f5;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    letter-spacing: 0;
}
.rv-you-tag {
    background: rgba(255,111,0,0.14);
    color: var(--primary, #FF6F00);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.rv-edited-badge {
    background: rgba(255,255,255,0.07);
    color: #6a6a82;
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}
.rv-reviewer-meta {
    font-size: 0.7rem;
    color: #4a4a62;
    margin-top: 2px;
    font-weight: 400;
}
/* Stars on the right of card header */
.rv-card-stars {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
}

/* ── Highlight badge row (inside card) ───────────────────────── */
.rv-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.7rem;
}
.rv-chip {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;
    padding: 3px 11px;
    font-size: 0.72rem;
    color: #9a9ab8;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ── Review body text ────────────────────────────────────────── */
.rv-text {
    font-size: 0.86rem;
    color: #b0b0c8;
    line-height: 1.65;
    margin: 0 0 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
    /* Critical: no uppercase */
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
}

/* ── Card footer ─────────────────────────────────────────────── */
.rv-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255,255,255,0.055);
}

/* Helpful button */
.rv-helpful-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;
    color: #6a6a82;
    font-size: 0.74rem;
    padding: 5px 14px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.18s;
    font-weight: 500;
}
.rv-helpful-btn:hover { border-color: rgba(34,197,94,0.4); color: #4ade80; background: rgba(34,197,94,0.05); }
.rv-helpful-btn.helped { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.3); color: #4ade80; }
.rv-helpful-btn span { color: #5a5a72; font-size: 0.68rem; }

/* Edit / Delete / Report buttons */
.rv-edit-btn,
.rv-delete-btn,
.rv-report-btn {
    background: none;
    border: none;
    font-size: 0.74rem;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    padding: 5px 9px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, color 0.15s;
    font-weight: 500;
    letter-spacing: 0.2px;
}
.rv-edit-btn           { color: #6a6a82; border: 1px solid rgba(255,255,255,0.08); }
.rv-edit-btn:hover     { color: #f0f0f5; background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.15); }
.rv-delete-btn         { color: #6a6a82; border: 1px solid rgba(255,255,255,0.08); }
.rv-delete-btn:hover   { color: #f87171; background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); }
.rv-report-btn         { color: #4a4a62; border: 1px solid transparent; }
.rv-report-btn:hover   { color: #fb923c; background: rgba(249,115,22,0.07); }

/* ══════════════════════════════════════════════════════════════════
   10. EMPTY STATE
══════════════════════════════════════════════════════════════════ */
.rv-empty {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    color: #6a6a82;
}
.rv-empty i     { font-size: 2.2rem; opacity: 0.25; display: block; margin-bottom: 1rem; }
.rv-empty p     { font-size: 0.9rem; margin-bottom: 0.3rem; color: #8a8aa8; }
.rv-empty small { font-size: 0.76rem; opacity: 0.65; }

/* ══════════════════════════════════════════════════════════════════
   11. INLINE TOAST FALLBACK
══════════════════════════════════════════════════════════════════ */
.tp-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    background: #1a1a26;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 0.87rem;
    color: #f0f0f5;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.55);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    max-width: 340px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
}
.tp-toast.tp-toast-in { opacity: 1; transform: translateY(0); pointer-events: all; }
.tp-toast-success { border-left: 3px solid #22c55e; }
.tp-toast-success i { color: #22c55e; }
.tp-toast-error   { border-left: 3px solid #ef4444; }
.tp-toast-error   i { color: #ef4444; }
.tp-toast-info    { border-left: 3px solid #3b82f6; }
.tp-toast-info    i { color: #3b82f6; }

/* ══════════════════════════════════════════════════════════════════
   12. RESPONSIVE
══════════════════════════════════════════════════════════════════ */
@media (max-width: 560px) {
    .rm-modal       { padding: 1.4rem 1.2rem 1.2rem; max-height: 95vh; }
    .rm-star-btn    { font-size: 2rem; }
    .rv-summary     { flex-direction: column; gap: 1.25rem; }
    .rv-score-block { flex-direction: row; align-items: center; gap: 14px; min-width: unset; }
    .rv-score-big   { font-size: 2.8rem; }
    .rv-card        { padding: 0.95rem 1rem 0.8rem; }
}
@media (max-width: 380px) {
    .rm-header-left { gap: 8px; }
    .rm-target-avatar { width: 36px; height: 36px; }
    .rm-title       { font-size: 0.95rem; }
    .rv-score-big   { font-size: 2.4rem; }
}