/*
 * CADENCE — Consumption Bridge: Renewal Lens Styles (WP03)
 *
 * Net-new styles for:
 *   - .scb-lens--renewal         — lens layout
 *   - .scb-threshold             — threshold control (label + input + suffix)
 *   - .scb-threshold__input      — number input
 *   - .scb-threshold__error      — inline validation message
 *   - .scb-renewal-list          — vertical card list
 *   - .scb-renewal-item          — individual card wrapper
 *
 * Reuses --scb-* design tokens declared in sc_consumption_bridge.css.
 * Does NOT re-declare any token.
 *
 * Mission: graph-navigation-and-consumption-refinements-01KRNT9R
 * Work Package: WP03 / T015
 */

/* =========================================================================
   Lens container
   ========================================================================= */

.scb-lens--renewal {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* =========================================================================
   Lens header
   ========================================================================= */

.scb-lens__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 12px;
    background: var(--color-surface, #fff);
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    flex-shrink: 0;
}

.scb-lens__header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text, #1e293b);
    flex: none;
}

/* =========================================================================
   Threshold control
   ========================================================================= */

.scb-threshold {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    margin-left: auto;
}

.scb-threshold__label {
    font-size: 0.8125rem;
    color: var(--color-text-muted, #64748b);
    white-space: nowrap;
}

.scb-threshold__input {
    width: 4.5rem;
    padding: 4px 6px;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--color-text, #1e293b);
    background: var(--color-bg, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 4px;
    text-align: right;
    appearance: none;
    -moz-appearance: textfield;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.scb-threshold__input:focus {
    outline: none;
    border-color: var(--color-accent, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.scb-threshold__input::-webkit-inner-spin-button,
.scb-threshold__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.scb-threshold__suffix {
    font-size: 0.8125rem;
    color: var(--color-text-muted, #64748b);
}

/* =========================================================================
   Inline error message
   ========================================================================= */

.scb-threshold__error[role="alert"] {
    /* Spans the full header row when visible */
    flex: 0 0 100%;
    font-size: 0.8125rem;
    color: var(--scb-color-up-for-renewal, #d97706);   /* amber — reuses existing token */
    padding: 0 0 4px;
    animation: scb-error-pop-in 0.15s ease;
}

@keyframes scb-error-pop-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   Renewal list
   ========================================================================= */

.scb-renewal-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scb-renewal-item {
    /* Card wrapper — no additional styling; card itself owns its appearance */
    display: block;
}

/* =========================================================================
   Empty state (reused class from bridge; no override needed)
   ========================================================================= */

.scb-renewal-list .scb-empty-state {
    padding: 32px 0;
    text-align: center;
    color: var(--color-text-muted, #64748b);
    font-size: 0.9375rem;
}

/* =========================================================================
   Print — hide the threshold control
   ========================================================================= */

@media print {
    .scb-threshold {
        display: none;
    }

    .scb-threshold__error {
        display: none;
    }
}
