/**
 * vwa-references — dashboard cards, badges, referee form. Mobile-first,
 * matches WorkScout dashboard styling; brand green #26ae61.
 */

.vwa-refs h3 { margin: 0 0 6px; }
.vwa-refs h4 { margin: 22px 0 8px; }

/* Visible focus everywhere — never colour-only affordances. */
.vwa-refs input:focus, .vwa-refs textarea:focus, .vwa-refs select:focus, .vwa-refs .button:focus {
	outline: 2px solid #26ae61; outline-offset: 2px;
}

.vwa-refs-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.vwa-refs-sub { color: #666; font-size: 14px; max-width: 620px; margin: 4px 0 0; }
.vwa-refs-empty { background: #f7f9f8; border: 1px dashed #cfd8d3; border-radius: 6px; padding: 22px; color: #555; }

.vwa-refs-cta { background: #26ae61 !important; border-color: #26ae61 !important; color: #fff !important; }
.vwa-refs-danger { color: #c0392b !important; }
.vwa-refs-linkbtn { background: none; border: 0; color: #888; text-decoration: underline; cursor: pointer; padding: 0; font-size: 13px; }

.vwa-refs-notice { border-radius: 5px; padding: 12px 16px; margin: 0 0 18px; font-size: 14px; }
.vwa-refs-notice-ok { background: #e8f6ee; border: 1px solid #26ae61; color: #1d7a46; }
.vwa-refs-notice-err { background: #fdf0ef; border: 1px solid #e74c3c; color: #a83227; }

.vwa-refs-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media ( min-width: 700px ) { .vwa-refs-cards { grid-template-columns: 1fr 1fr; } }

.vwa-refs-card { background: #fff; border: 1px solid #e4e7e9; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.04 ); }
.vwa-refs-card h4 { margin: 8px 0 2px; }
.vwa-refs-card-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.vwa-refs-card-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vwa-refs-inline { display: inline; }
/* Card action row mixes a.button (baseline = bottom edge, via theme overflow:hidden)
   with form>button (baseline = inner text) — top-align both so the icons line up. */
.vwa-refs .buttons-to-right .button { vertical-align: top; }
.vwa-refs-detail { margin-bottom: 20px; }

.vwa-refs-meta { color: #555; font-size: 13.5px; margin: 2px 0 8px; }
.vwa-refs-mutetext { color: #777; font-size: 13px; }
.vwa-refs-confidential { background: #f4f6f8; border-left: 3px solid #90a4ae; padding: 10px 14px; font-size: 13.5px; color: #546e7a; }

/* Category badge (colour per category) */
.vwa-refs-badge { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; }
.vwa-refs-cat-employment   { background: #e8f6ee; color: #1d7a46; }
.vwa-refs-cat-professional { background: #e7f0fb; color: #2b5f9e; }
.vwa-refs-cat-academic     { background: #f2ecfb; color: #6a459e; }
.vwa-refs-cat-community    { background: #fdf3e5; color: #9c6410; }
.vwa-refs-cat-character    { background: #eef2f4; color: #4d626c; }
.vwa-refs-cat-personal     { background: #f5f0ee; color: #7d5a4a; }

/* Status chip (candidate-dashboard status model) */
.vwa-refs-status { font-size: 12px; color: #666; background: #f1f3f4; border-radius: 20px; padding: 3px 10px; white-space: nowrap; }
.vwa-refs-status-received, .vwa-refs-status-verified, .vwa-refs-status-completed { background: #e8f6ee; color: #1d7a46; }
.vwa-refs-status-verified { font-weight: 700; }
.vwa-refs-status-confirmed, .vwa-refs-status-in_progress { background: #e7f0fb; color: #2b5f9e; }
.vwa-refs-status-verification_required { background: #fdf6e6; color: #8a6d1a; }
.vwa-refs-status-declined, .vwa-refs-status-expired, .vwa-refs-status-cancelled, .vwa-refs-status-withdrawn { background: #fdf0ef; color: #a83227; }

/* Verification badges vs relevance badges — visually distinct families. */
.vwa-refs-badges { margin: 8px 0 4px; line-height: 2.1; }
.vwa-refs-vbadge { display: inline-block; font-size: 12px; background: #f1f6f3; border: 1px solid #bfe0cd; color: #1d7a46; border-radius: 4px; padding: 2px 8px; margin-right: 4px; }
.vwa-refs-rbadge { display: inline-block; font-size: 12px; border-radius: 4px; padding: 2px 8px; border: 1px solid transparent; }
.vwa-refs-rel-high    { background: #e8f6ee; border-color: #26ae61; color: #1d7a46; font-weight: 600; }
.vwa-refs-rel-medium  { background: #fdf6e6; border-color: #e2b93b; color: #8a6d1a; }
.vwa-refs-rel-limited { background: #f1f3f4; border-color: #cfd4d7; color: #5f6b71; }

/* Forms */
.vwa-refs-form fieldset { border: 1px solid #e4e7e9; border-radius: 8px; padding: 16px 20px; margin: 0 0 18px; }
.vwa-refs-form legend { font-weight: 700; padding: 0 8px; }
.vwa-refs-form label { display: block; font-size: 14px; margin-bottom: 4px; }
.vwa-refs-form input[type="text"], .vwa-refs-form input[type="email"], .vwa-refs-form input[type="tel"],
.vwa-refs-form input[type="date"], .vwa-refs-form textarea, .vwa-refs-form select {
	width: 100%; max-width: 560px; min-height: 44px; padding: 9px 12px; border: 1px solid #cfd4d7; border-radius: 5px; font-size: 14px;
}
.vwa-refs-form textarea { max-width: 680px; min-height: 80px; }
.vwa-refs-form .button { min-height: 44px; }
.vwa-refs-nominate { max-width: 760px; }
.vwa-refs-datefield { max-width: 180px !important; }
.vwa-refs-check { display: flex !important; gap: 9px; align-items: flex-start; font-size: 13.5px !important; margin: 9px 0 !important; min-height: 44px; }
.vwa-refs-check input { margin-top: 3px; flex: none; width: 20px; height: 20px; }
.vwa-refs-dates { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.vwa-refs-dates p { margin: 0; flex: 0 1 auto; }
.vwa-refs-dates > label { flex: 0 1 200px; } /* referee-form markup variant */
@media ( max-width: 480px ) {
	.vwa-refs-dates { flex-direction: column; align-items: stretch; }
	.vwa-refs-datefield { max-width: 100% !important; }
}
.vwa-refs-submitrow { display: flex; gap: 10px; flex-wrap: wrap; }
.vwa-refs-req { color: #c0392b; }
.vwa-refs-hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }

/* Inline validation + contextual notes */
.vwa-refs-field-err { display: block; color: #a83227; font-size: 13px; margin: 2px 0 4px; font-weight: 600; }
.vwa-refs-infonote { background: #eef4fb; border-left: 3px solid #2b5f9e; color: #2b4b70; font-size: 13.5px; padding: 10px 14px; border-radius: 0 5px 5px 0; margin: 12px 0 0; }
.vwa-refs-optnote { color: #888; font-weight: 400; font-style: normal; font-size: 12.5px; }
.vwa-refs-email-hint { color: #8a6d1a !important; }
#vwa-refs-desc-count { display: block; text-align: right; max-width: 680px; }

/* Step wizard (nominate form) — markup injected by JS; without JS the
   form stays a single page. Theme display rules on .button/fieldset would
   defeat the hidden attribute, hence the guard. */
.vwa-refs [hidden] { display: none !important; }
.vwa-refs-steps { list-style: none; counter-reset: vwa-step; display: flex; margin: 0 0 26px; padding: 0; }
.vwa-refs-steps li { counter-increment: vwa-step; flex: 1; text-align: center; position: relative; font-size: 12.5px; line-height: 1.3; color: #8a949a; padding: 34px 4px 0; }
.vwa-refs-steps li::before { content: counter(vwa-step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; line-height: 24px; border: 2px solid #dfe4e6; border-radius: 50%; background: #fff; font-weight: 700; z-index: 1; }
.vwa-refs-steps li::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: #dfe4e6; }
.vwa-refs-steps li:first-child::after { display: none; }
.vwa-refs-steps li.is-current { color: #1d7a46; font-weight: 600; }
.vwa-refs-steps li.is-current::before { border-color: #26ae61; color: #1d7a46; }
.vwa-refs-steps li.is-done::before { content: "✓"; background: #26ae61; border-color: #26ae61; color: #fff; }
.vwa-refs-steps li.is-done::after, .vwa-refs-steps li.is-current::after { background: #26ae61; }
@media ( max-width: 560px ) {
	.vwa-refs-steps li { font-size: 0; } /* numbers only on small screens */
	.vwa-refs-steps li::before { font-size: 13px; }
	.vwa-refs-steps li.is-current { font-size: 12px; } /* keep the active label */
}
.vwa-refs-stepnav { display: flex; justify-content: space-between; gap: 10px; }
.vwa-refs-stepnav .vwa-refs-cta { margin-left: auto; }

/* Referee-type picker cards — whole card clickable (it IS the label),
   selection shown by border + tick, never colour alone. */
.vwa-refs-catgrid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media ( min-width: 700px ) { .vwa-refs-catgrid { grid-template-columns: 1fr 1fr; } }
.vwa-refs-catcard { position: relative; border: 2px solid #dfe4e6; border-radius: 8px; padding: 14px 40px 14px 14px; cursor: pointer; display: block; min-height: 44px; overflow-wrap: break-word; }
.vwa-refs-catcard:focus-within { outline: 2px solid #26ae61; outline-offset: 2px; }
.vwa-refs-catcard:has( input:checked ) { border-color: #26ae61; background: #f4fbf7; }
.vwa-refs-catcard:has( input:checked )::after { content: "✓"; position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; line-height: 22px; text-align: center; background: #26ae61; color: #fff; border-radius: 50%; font-size: 13px; font-weight: 700; }
.vwa-refs-catcard input { margin-right: 8px; }
.vwa-refs-catcard strong { display: inline; }
.vwa-refs-catcard span { display: block; color: #666; font-size: 12.5px; margin-top: 4px; }

/* Question blocks */
.vwa-refs-q { margin-bottom: 16px; }
.vwa-refs-q > label { font-weight: 600; }
.vwa-refs-rating { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vwa-refs-star { border: 1px solid #cfd4d7; border-radius: 5px; padding: 6px 12px; cursor: pointer; }
.vwa-refs-star:has( input:checked ) { background: #26ae61; border-color: #26ae61; color: #fff; }
.vwa-refs-star input { position: absolute; opacity: 0; }
.vwa-refs-yn { display: flex; gap: 18px; }
.vwa-refs-yn label { font-weight: 400; }

/* Answers display */
.vwa-refs-answers dt { font-weight: 600; margin-top: 12px; }
.vwa-refs-answers dd { margin: 2px 0 0; color: #444; }
.vwa-refs-stars { color: #e2b93b; letter-spacing: 2px; }
.vwa-refs-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13.5px; }
.vwa-refs-table th, .vwa-refs-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #eef1f2; }
.vwa-refs-table th { color: #666; font-weight: 600; width: 220px; }
.vwa-refs-limits { color: #555; font-size: 13.5px; }

/* Referee page framing */
.vwa-refs-referee { max-width: 720px; margin: 0 auto; }
.vwa-refs-intro { margin-bottom: 22px; }
.vwa-refs-declineform { margin-top: 16px; text-align: center; }
.vwa-refs-testimonial-box { margin: 8px 0 0 26px; }

/* Public testimonials */
.vwa-refs-testimonial { border-left: 3px solid #26ae61; background: #fafcfb; margin: 0 0 14px; padding: 12px 16px; }
.vwa-refs-testimonial p { margin: 8px 0; font-style: italic; }
.vwa-refs-testimonial footer { font-size: 13px; color: #666; }

/* Employer CTA on the worker profile sidebar */
.vwa-refs-profile-cta { margin: 0 0 16px; }
.vwa-refs-profile-cta .vwa-refs-cta-line { margin: 0 0 12px; color: #555; }
.vwa-refs-btn { display: inline-block; background: #26ae61; color: #fff; padding: 10px 22px; border: 0; border-radius: 3px; cursor: pointer; font-size: 15px; }
.vwa-refs-btn:hover, .vwa-refs-btn:focus { background: #209553; color: #fff; }
