/* ==========================================================================
   The Right Choice — Reusable Admin Dashboard Widgets
   Brand: orange #fb8e28, teal #00364a
   Theme: respects --gt-* and --rc-* CSS vars (dark/light)
   ========================================================================== */

:root {
    --rc-orange:        #fb8e28;
    --rc-orange-soft:   rgba(251, 142, 40, 0.12);
    --rc-orange-glow:   rgba(251, 142, 40, 0.35);
    --rc-teal:          #00364a;
    --rc-teal-soft:     rgba(0, 54, 74, 0.12);
    --rc-success:       #16c172;
    --rc-warning:       #f7b500;
    --rc-danger:        #ef4444;
    --rc-info:          #38bdf8;

    --rc-bg-card:       var(--gt-bg-card,        #ffffff);
    --rc-bg-card-hover: var(--gt-bg-card-hover,  #fafafa);
    --rc-bg-body:       var(--gt-bg-body,        #f7f8fa);
    --rc-text:          var(--gt-text,           #19222b);
    --rc-text-muted:    var(--gt-text-muted,     #637280);
    --rc-border:        var(--gt-border,         #e6e9ee);
    --rc-primary:       var(--gt-primary,        #fb8e28);

    --rc-radius:        12px;
    --rc-radius-sm:     8px;
    --rc-pad:           18px;
    --rc-shadow-1:      0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    --rc-shadow-2:      0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
    --rc-shadow-3:      0 12px 28px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.08);
    --rc-transition:    180ms cubic-bezier(.2,.6,.2,1);
}

.theme-dark {
    --rc-bg-card:       var(--gt-bg-card,        #1a232d);
    --rc-bg-card-hover: var(--gt-bg-card-hover,  #232f3b);
    --rc-bg-body:       var(--gt-bg-body,        #0f1620);
    --rc-text:          var(--gt-text,           #e7ecf0);
    --rc-text-muted:    var(--gt-text-muted,     #92a0ae);
    --rc-border:        var(--gt-border,         #2a3641);
    --rc-shadow-1:      0 1px 2px rgba(0, 0, 0, 0.4);
    --rc-shadow-2:      0 4px 14px rgba(0, 0, 0, 0.45);
    --rc-shadow-3:      0 14px 36px rgba(0, 0, 0, 0.55);
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.rc-widget-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.rc-widget-grid > .rc-widget-sm  { grid-column: span 3; }
.rc-widget-grid > .rc-widget-md  { grid-column: span 4; }
.rc-widget-grid > .rc-widget-lg  { grid-column: span 6; }
.rc-widget-grid > .rc-widget-xl  { grid-column: span 12; }

@media (max-width: 1280px) {
    .rc-widget-grid > .rc-widget-sm  { grid-column: span 4; }
    .rc-widget-grid > .rc-widget-md  { grid-column: span 6; }
    .rc-widget-grid > .rc-widget-lg  { grid-column: span 12; }
}

@media (max-width: 880px) {
    .rc-widget-grid { grid-template-columns: 1fr; gap: 12px; }
    .rc-widget-grid > .rc-widget-sm,
    .rc-widget-grid > .rc-widget-md,
    .rc-widget-grid > .rc-widget-lg,
    .rc-widget-grid > .rc-widget-xl { grid-column: span 1; }
}

/* --------------------------------------------------------------------------
   Card shell
   -------------------------------------------------------------------------- */
.rc-widget {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--rc-bg-card);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    box-shadow: var(--rc-shadow-1);
    color: var(--rc-text);
    overflow: hidden;
    transition: transform var(--rc-transition), box-shadow var(--rc-transition), border-color var(--rc-transition);
    min-height: 160px;
}

.rc-widget:hover {
    box-shadow: var(--rc-shadow-2);
    border-color: rgba(251, 142, 40, 0.4); /* fallback */
    border-color: color-mix(in srgb, var(--rc-primary) 20%, var(--rc-border));
    transform: translateY(-1px);
}

.rc-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px var(--rc-pad) 8px;
    border-bottom: 1px solid rgba(230, 233, 238, 0.6); /* fallback */
    border-bottom: 1px solid color-mix(in srgb, var(--rc-border) 60%, transparent);
}

.rc-widget-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    color: var(--rc-text);
}

.rc-widget-title i {
    color: var(--rc-orange);
    width: 18px;
    text-align: center;
}

.rc-widget-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rc-widget-btn {
    background: transparent;
    border: 0;
    color: var(--rc-text-muted);
    width: 28px; height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--rc-transition), color var(--rc-transition);
}

.rc-widget-btn:hover {
    background: var(--rc-orange-soft);
    color: var(--rc-orange);
}

.rc-widget-body {
    flex: 1;
    padding: var(--rc-pad);
    min-height: 80px;
}

.rc-widget-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px var(--rc-pad) 12px;
    font-size: 0.72rem;
    color: var(--rc-text-muted);
    border-top: 1px solid rgba(230, 233, 238, 0.6); /* fallback */
    border-top: 1px solid color-mix(in srgb, var(--rc-border) 60%, transparent);
}

.rc-widget-stamp::before {
    content: "Updated ";
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Skeleton (loading) — scoped to .rc-widget-skel so the global .rc-skel-line
   in rc-animations.css is not overridden by this widget-specific variant.
   -------------------------------------------------------------------------- */
.rc-widget-skel { padding: 6px 0; }
.rc-widget-skel .rc-skel-line {
    height: 14px;
    border-radius: 6px;
    background: rgba(230, 233, 238, 0.6); /* fallback for color-mix */
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--rc-border) 60%, transparent) 0%,
        color-mix(in srgb, var(--rc-border) 30%, transparent) 50%,
        color-mix(in srgb, var(--rc-border) 60%, transparent) 100%);
    background-size: 200% 100%;
    animation: rcShimmer 1.4s ease infinite;
    margin-bottom: 12px;
}

.rc-widget-skel .rc-skel-line.w50 { width: 50%; }
.rc-widget-skel .rc-skel-line.w70 { width: 70%; }
.rc-widget-skel .rc-skel-line.w90 { width: 90%; }

@keyframes rcShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Empty + error states
   -------------------------------------------------------------------------- */
.rc-widget-empty,
.rc-widget-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 18px;
    gap: 10px;
    color: var(--rc-text-muted);
}

.rc-widget-empty i,
.rc-widget-error i {
    font-size: 1.8rem;
    opacity: 0.55;
}

.rc-widget-error i { color: var(--rc-danger); }

.rc-widget-empty p,
.rc-widget-error p {
    margin: 0;
    font-size: 0.88rem;
}

.rc-btn-ghost {
    background: transparent;
    border: 1px solid var(--rc-border);
    color: var(--rc-text);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background var(--rc-transition);
}

.rc-btn-ghost:hover { background: var(--rc-bg-card-hover); }

/* --------------------------------------------------------------------------
   Pulse (emergency)
   -------------------------------------------------------------------------- */
.rc-widget-pulse {
    border-color: var(--rc-danger);
    animation: rcPulse 2.2s ease-in-out infinite;
}

.rc-widget-pulse .rc-widget-title i { color: var(--rc-danger); }

@keyframes rcPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5), var(--rc-shadow-1); }
    50%      { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0), var(--rc-shadow-2); }
}

/* --------------------------------------------------------------------------
   Stat displays
   -------------------------------------------------------------------------- */
.rc-stat {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.rc-stat-num {
    font-size: 2.0rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--rc-text);
}

.rc-stat-num.lg { font-size: 2.5rem; }
.rc-stat-sub {
    font-size: 0.78rem;
    color: var(--rc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rc-delta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--rc-orange-soft);
    color: var(--rc-orange);
}

.rc-delta.up   { background: rgba(22, 193, 114, 0.14); color: var(--rc-success); }
.rc-delta.down { background: rgba(239, 68, 68, 0.14);  color: var(--rc-danger); }
.rc-delta.flat { background: rgba(99, 114, 128, 0.14); color: var(--rc-text-muted); }

/* --------------------------------------------------------------------------
   Chart wrapper — fixed height to prevent ResizeObserver loop
   Required around every Chart.js canvas using
   `responsive: true + maintainAspectRatio: false`.
   -------------------------------------------------------------------------- */
.rc-chart-wrap {
    position: relative;
    width: 100%;
    height: var(--rc-chart-height, 280px);
    min-height: var(--rc-chart-height, 280px);
    margin-top: 8px;
}

.rc-chart-wrap.tall,
.rc-chart-wrap.is-tall  { --rc-chart-height: 380px; }

.rc-chart-wrap.short,
.rc-chart-wrap.is-short { --rc-chart-height: 200px; }

.rc-chart-wrap canvas {
    max-height: 100%;
}

/* Sparkline wrapper — same locking pattern, smaller footprint */
.rc-spark-wrap {
    position: relative;
    width: 100%;
    height: 40px;
    min-height: 40px;
    margin-top: 8px;
}

.rc-spark-wrap canvas {
    max-height: 100%;
}

/* Sparkline (canvas) — kept for legacy markup that hasn't been wrapped yet */
.rc-spark {
    width: 100%;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    margin-top: 8px;
    display: block;
}

/* --------------------------------------------------------------------------
   GLOBAL SAFETY NET — every legacy `.chart-container`, `.chart-wrapper`,
   `.chart-host`, `.chart-body`, `.ai-chart-wrap`, `.sb-chart-wrap`,
   `.tth-chart-host`, `.tth-chart-host-tall`, `.ppc-chart-host`,
   `.fb-grid-charts .chart-container`, `.ag-card .chart-container`
   gets a position:relative parent with a fixed height. Without this any
   Chart.js canvas using `responsive:true + maintainAspectRatio:false`
   will drive a ResizeObserver feedback loop ("page keeps growing").
   Pages that already declare an explicit height with a higher-specificity
   selector or inline style will win — these are last-resort defaults.
   -------------------------------------------------------------------------- */
.chart-container,
.chart-wrapper,
.chart-host,
.chart-body,
.ai-chart-wrap,
.sb-chart-wrap,
.tth-chart-host,
.ppc-chart-host {
    position: relative;
    width: 100%;
    height: 280px;
    min-height: 220px;
    max-height: 480px;
}
.tth-chart-host-tall {
    position: relative;
    width: 100%;
    height: 360px;
    min-height: 280px;
}
/* Canvas inside a safety-net wrapper must not exceed the wrapper. */
.chart-container > canvas,
.chart-wrapper > canvas,
.chart-host > canvas,
.chart-body > canvas,
.ai-chart-wrap > canvas,
.sb-chart-wrap > canvas,
.tth-chart-host > canvas,
.tth-chart-host-tall > canvas,
.ppc-chart-host > canvas {
    max-height: 100%;
}

/* --------------------------------------------------------------------------
   Tech grid
   -------------------------------------------------------------------------- */
.rc-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}

.rc-tech-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--rc-bg-card-hover);
    font-size: 0.82rem;
    border: 1px solid rgba(230, 233, 238, 0.7); /* fallback */
    border: 1px solid color-mix(in srgb, var(--rc-border) 70%, transparent);
}

.rc-tech-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--rc-text-muted);
}

.rc-tech-dot.available { background: var(--rc-success); box-shadow: 0 0 0 3px rgba(22, 193, 114, 0.18); }
.rc-tech-dot.busy      { background: var(--rc-warning); }
.rc-tech-dot.break     { background: var(--rc-info); }
.rc-tech-dot.offline   { background: var(--rc-text-muted); opacity: 0.4; }

/* --------------------------------------------------------------------------
   Funnel
   -------------------------------------------------------------------------- */
.rc-funnel { display: flex; flex-direction: column; gap: 6px; }
.rc-funnel-row {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.85rem;
}
.rc-funnel-bar {
    flex: 1;
    height: 22px;
    background: var(--rc-bg-card-hover);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.rc-funnel-fill {
    height: 100%;
    background: var(--rc-orange);
    border-radius: 6px;
    transition: width var(--rc-transition);
}
.rc-funnel-row > .rc-funnel-label { min-width: 92px; color: var(--rc-text-muted); }
.rc-funnel-row > .rc-funnel-val   { min-width: 44px; text-align: right; font-weight: 600; }

/* --------------------------------------------------------------------------
   List items (top techs / reviews / schedule)
   -------------------------------------------------------------------------- */
.rc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

.rc-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--rc-bg-card-hover);
    font-size: 0.86rem;
    border: 1px solid rgba(230, 233, 238, 0.5); /* fallback */
    border: 1px solid color-mix(in srgb, var(--rc-border) 50%, transparent);
}

.rc-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--rc-orange-soft);
    color: var(--rc-orange);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    flex: none;
}

.rc-list-item .rc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-list-item .rc-meta { color: var(--rc-text-muted); font-size: 0.78rem; }

/* Stars */
.rc-stars { color: #f5b800; letter-spacing: 1px; }

/* --------------------------------------------------------------------------
   Status badges
   -------------------------------------------------------------------------- */
.rc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--rc-bg-card-hover);
    color: var(--rc-text-muted);
    border: 1px solid var(--rc-border);
}
.rc-badge.success { background: rgba(22,193,114,0.12); color: var(--rc-success); border-color: rgba(22,193,114,0.25); }
.rc-badge.warn    { background: rgba(247,181,0,0.12);  color: var(--rc-warning); border-color: rgba(247,181,0,0.30); }
.rc-badge.danger  { background: rgba(239,68,68,0.12);  color: var(--rc-danger);  border-color: rgba(239,68,68,0.30); }
.rc-badge.info    { background: rgba(56,189,248,0.12); color: var(--rc-info);    border-color: rgba(56,189,248,0.30); }

/* --------------------------------------------------------------------------
   Schedule mini-calendar
   -------------------------------------------------------------------------- */
.rc-sched {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
}

.rc-sched-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: var(--rc-bg-card-hover);
    font-size: 0.84rem;
    border-left: 3px solid var(--rc-orange);
}

.rc-sched-row.upcoming { border-left-color: var(--rc-info); }
.rc-sched-row.past     { border-left-color: var(--rc-text-muted); opacity: 0.7; }
.rc-sched-row.now      { border-left-color: var(--rc-success); }

.rc-sched-time { font-weight: 600; color: var(--rc-text); }

/* --------------------------------------------------------------------------
   Weather widget
   -------------------------------------------------------------------------- */
.rc-weather {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rc-weather-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    background: var(--rc-bg-card-hover);
}

.rc-weather-icon {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--rc-orange-soft);
    color: var(--rc-orange);
    flex: none;
    font-size: 1.1rem;
}

.rc-weather-temp { font-size: 1.4rem; font-weight: 700; color: var(--rc-text); }
.rc-weather-tag {
    font-size: 0.74rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--rc-orange-soft);
    color: var(--rc-orange);
    margin-left: auto;
}

/* --------------------------------------------------------------------------
   Donut center label
   -------------------------------------------------------------------------- */
.rc-donut-wrap { position: relative; }
.rc-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Composer page
   -------------------------------------------------------------------------- */
.rc-composer { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.rc-composer-library {
    background: var(--rc-bg-card);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    padding: 12px;
    max-height: 80vh;
    overflow-y: auto;
}

.rc-composer-canvas {
    background: var(--rc-bg-body);
    border: 1px dashed var(--rc-border);
    border-radius: var(--rc-radius);
    padding: 12px;
    min-height: 60vh;
}

.rc-lib-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: grab;
    background: var(--rc-bg-card-hover);
    border: 1px solid rgba(230, 233, 238, 0.6); /* fallback */
    border: 1px solid color-mix(in srgb, var(--rc-border) 60%, transparent);
    margin-bottom: 6px;
    user-select: none;
    transition: transform var(--rc-transition);
    font-size: 0.86rem;
}

.rc-lib-item:hover { transform: translateX(2px); border-color: var(--rc-orange); }
.rc-lib-item.dragging { opacity: 0.5; }
.rc-lib-item i { color: var(--rc-orange); }

.rc-canvas-slot {
    position: relative;
}

.rc-canvas-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: var(--rc-text-muted);
    font-size: 0.9rem;
    border: 2px dashed var(--rc-border);
    border-radius: var(--rc-radius);
}

.rc-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 4;
    background: var(--rc-danger);
    color: white;
    border: 0;
    border-radius: 50%;
    width: 26px; height: 26px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    box-shadow: var(--rc-shadow-2);
    opacity: 0;
    transition: opacity var(--rc-transition);
}

.rc-widget:hover .rc-remove-btn { opacity: 1; }

.rc-resize-handle {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    cursor: nwse-resize;
    color: var(--rc-text-muted);
    z-index: 3;
    opacity: 0;
    transition: opacity var(--rc-transition);
}
.rc-widget:hover .rc-resize-handle { opacity: 1; }

.rc-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.rc-toolbar .btn {
    background: var(--rc-orange);
    color: #fff;
    border: 0;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.86rem;
    cursor: pointer;
}

.rc-toolbar .btn.ghost {
    background: transparent;
    color: var(--rc-text);
    border: 1px solid var(--rc-border);
}

.rc-toolbar .btn:hover { filter: brightness(1.05); }

@media (max-width: 880px) {
    .rc-composer { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .rc-widget-pulse { animation: none; }
    .rc-widget-skel .rc-skel-line { animation: none; }
    .rc-widget       { transition: none; }
}

/* --------------------------------------------------------------------------
   Misc: ticker for reviews
   -------------------------------------------------------------------------- */
.rc-ticker {
    overflow: hidden;
    height: 22px;
    position: relative;
    margin-top: 8px;
}
.rc-ticker-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    animation: rcTicker 16s linear infinite;
}
.rc-ticker-inner > div { height: 22px; line-height: 22px; font-size: 0.82rem; color: var(--rc-text-muted); }

@keyframes rcTicker {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .rc-ticker-inner { animation: none; }
}

/* --------------------------------------------------------------------------
   KV table (key-value pairs in widgets like AR Health)
   -------------------------------------------------------------------------- */
.rc-kv {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.rc-kv th, .rc-kv td {
    padding: 6px 4px;
    border-bottom: 1px solid rgba(230, 233, 238, 0.5); /* fallback */
    border-bottom: 1px solid color-mix(in srgb, var(--rc-border) 50%, transparent);
    text-align: left;
}
.rc-kv th { color: var(--rc-text-muted); font-weight: 500; }

.rc-kv tr:last-child th,
.rc-kv tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------------------
   Histogram bars
   -------------------------------------------------------------------------- */
.rc-histo {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 80px;
    margin-top: 10px;
}
.rc-histo-bar {
    flex: 1;
    min-height: 6px;
    background: var(--rc-orange);
    border-radius: 3px 3px 0 0;
    position: relative;
}
.rc-histo-bar:hover::after {
    content: attr(data-label);
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rc-teal);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Channel chip
   -------------------------------------------------------------------------- */
.rc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--rc-bg-card-hover);
    font-size: 0.72rem;
    color: var(--rc-text-muted);
    border: 1px solid rgba(230, 233, 238, 0.6); /* fallback */
    border: 1px solid color-mix(in srgb, var(--rc-border) 60%, transparent);
}

/* --------------------------------------------------------------------------
   Comfort club ring
   -------------------------------------------------------------------------- */
.rc-ring {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: conic-gradient(var(--rc-orange) calc(var(--p, 0) * 1%), var(--rc-bg-card-hover) 0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.rc-ring::after {
    content: "";
    position: absolute;
    inset: 8px;
    background: var(--rc-bg-card);
    border-radius: 50%;
}
.rc-ring > span {
    position: relative;
    z-index: 1;
    font-weight: 700;
    color: var(--rc-text);
}

/* --------------------------------------------------------------------------
   Inline split rows
   -------------------------------------------------------------------------- */
.rc-row-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(230, 233, 238, 0.4); /* fallback */
    border-bottom: 1px solid color-mix(in srgb, var(--rc-border) 40%, transparent);
    font-size: 0.86rem;
}
.rc-row-split:last-child { border-bottom: 0; }

/* --------------------------------------------------------------------------
   Scrollbar polish (webkit)
   -------------------------------------------------------------------------- */
.rc-sched::-webkit-scrollbar,
.rc-composer-library::-webkit-scrollbar { width: 6px; }
.rc-sched::-webkit-scrollbar-thumb,
.rc-composer-library::-webkit-scrollbar-thumb { background: var(--rc-border); border-radius: 3px; }
