/*
#################################################################################
# Author      : Rodrigo Contreras (<mrdc.tech>)
# Copyright(c): 2026
# All Rights Reserved.
#
# This module is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#################################################################################
*/


.mrdc-referrals-main, .mrdc-referrals-side, .mrdc-referrals-stack { display: grid; gap: 16px; min-width: 0; }
.mrdc-referrals-stats { display: grid; gap: 12px; }
.mrdc-referrals-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: center; }
.mrdc-referrals-amount { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mrdc-referrals-amount input { width: 96px; flex: none; }
.mrdc-referrals-amount span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrdc-referrals-person { border: 0; background: none; box-shadow: none; padding: 0; min-height: 0; height: auto; font: inherit; font-weight: 550; color: var(--mrdc-text); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--mrdc-border); text-underline-offset: 3px; overflow-wrap: anywhere; white-space: normal; }
.mrdc-referrals-person:hover { background: none; text-decoration-color: currentColor; }
.mrdc-referrals-table td { vertical-align: top; }
.mrdc-referrals-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mrdc-referrals-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mrdc-referrals-top li { display: grid; gap: 2px; }
.mrdc-referrals-how { margin: 8px 0 0; padding-left: 18px; color: var(--mrdc-muted); display: grid; gap: 6px; }

.mrdc-referrals-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.mrdc-referrals-stars i { display: inline-flex; color: var(--mrdc-border); }
.mrdc-referrals-stars i svg { width: 16px; height: 16px; }
.mrdc-referrals-stars i.mrdc-on { color: #e8a317; }
.mrdc-referrals-stars i.mrdc-on svg { fill: currentColor; }
.mrdc-referrals-score { display: grid; gap: 4px; }
.mrdc-referrals-average { display: flex; align-items: center; gap: 10px; }
.mrdc-referrals-average strong { font-family: var(--mrdc-display); font-size: var(--mrdc-text-3xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mrdc-referrals-average .mrdc-referrals-stars i svg { width: 20px; height: 20px; }
.mrdc-referrals-bars { display: grid; gap: 6px; margin-top: 14px; }
.mrdc-referrals-bar { display: grid; grid-template-columns: 14px minmax(0, 1fr) 32px; gap: 8px; align-items: center; font-size: var(--mrdc-text-sm); font-variant-numeric: tabular-nums; }
.mrdc-referrals-bar i { display: block; height: 8px; border-radius: var(--mrdc-radius-full); background: var(--mrdc-surface-2); overflow: hidden; }
.mrdc-referrals-bar b { display: block; height: 100%; border-radius: inherit; background: #e8a317; }
.mrdc-referrals-bar span:last-child { text-align: right; }
.mrdc-referrals-places { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--mrdc-border); }
.mrdc-referrals-places > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; font-size: var(--mrdc-text-base); }
.mrdc-referrals-places strong { font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }

.mrdc-referrals-filters { margin-bottom: 14px; }
.mrdc-referrals-filters select { width: auto; flex: 1 1 150px; min-width: 0; }
.mrdc-referrals-opinions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mrdc-referrals-opinion { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--mrdc-border); border-radius: var(--mrdc-radius-lg); background: var(--mrdc-surface); min-width: 0; }
.mrdc-referrals-opinion.mrdc-low { border-color: color-mix(in srgb, var(--mrdc-danger) 40%, transparent); background: var(--mrdc-danger-soft); }
.mrdc-referrals-opinion-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mrdc-referrals-when { margin-left: auto; }
.mrdc-referrals-comment { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--mrdc-text-md); }
.mrdc-referrals-opinion-foot { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.mrdc-referrals-opinion-foot > .small.muted { flex: 1 1 160px; }

.mrdc-referrals-widget { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.mrdc-referrals-code { font-family: var(--mrdc-mono); font-size: var(--mrdc-text-sm); line-height: 1.5; resize: none; word-break: break-all; min-height: 84px; }
.mrdc-referrals-stage { position: relative; height: 420px; border: 1px solid var(--mrdc-border); border-radius: var(--mrdc-radius-lg); background: var(--mrdc-surface-2); overflow: hidden; }
.mrdc-referrals-mock { display: grid; gap: 12px; padding: 20px; }
.mrdc-referrals-mock i { display: block; height: 96px; border-radius: var(--mrdc-radius); background: var(--mrdc-surface-3); }
.mrdc-referrals-mock b { display: block; height: 12px; border-radius: var(--mrdc-radius-full); background: var(--mrdc-surface-3); }
.mrdc-referrals-mock b.mrdc-short { width: 55%; }
.mrdc-referrals-float { position: absolute; right: 14px; bottom: 14px; height: 46px; min-height: 46px; padding: 0 18px; border: 0; border-radius: var(--mrdc-radius-full); font-weight: 600; font-size: var(--mrdc-text-md); box-shadow: 0 8px 24px rgba(0, 0, 0, .28); max-width: calc(100% - 28px); }
.mrdc-referrals-float.mrdc-left { right: auto; left: 14px; }
.mrdc-referrals-float:hover { filter: brightness(1.06); }
.mrdc-referrals-float span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrdc-referrals-float svg { width: 20px; height: 20px; }
.mrdc-referrals-layer { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 10px; z-index: 2; }
.mrdc-referrals-frame { position: relative; width: 100%; max-width: 360px; height: 100%; border-radius: var(--mrdc-radius-xl); overflow: hidden; background: #111111; }
.mrdc-referrals-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.mrdc-referrals-frame-close { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #ffffff; box-shadow: none; }
.mrdc-referrals-frame-close:hover { background: rgba(0, 0, 0, .75); }
.mrdc-referrals-alt { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--mrdc-border); }
.mrdc-referrals-alt > div { display: grid; gap: 6px; flex: 1 1 260px; min-width: 0; }

.mrdc-referrals-report { display: grid; gap: 4px; margin-bottom: 12px; }
.mrdc-referrals-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mrdc-referrals-trio > div { display: grid; gap: 2px; }
.mrdc-referrals-trio strong { font-family: var(--mrdc-display); font-size: var(--mrdc-text-2xl); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .mrdc-referrals-widget { grid-template-columns: minmax(0, 1fr); }
  .mrdc-referrals-side.sticky { position: static; }
}

@media (max-width: 520px) {
  .mrdc-referrals-pair { grid-template-columns: minmax(0, 1fr); }
  .mrdc-referrals-when { margin-left: 0; flex-basis: 100%; }
  .mrdc-referrals-stage { height: 380px; }
}

.mrdc-referrals-top .mrdc-referrals-person { justify-self: start; }

@media (max-width: 520px) {
  .mrdc-referrals-opinion-foot > .small.muted { flex-basis: 100%; }
}
