/*
 * deal-progress.css — Deal Progress Checklist
 * Batch 33: Compact collapsed/expanded checklist below PI header.
 * Zero hardcoded colors — CSS vars only.
 */

/* ============================================================
   CHECKLIST CONTAINER
   ============================================================ */
#lf-deal-progress {
    flex-shrink: 0;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 44px; /* collapsed */
    user-select: none;
    -webkit-user-select: none;
}

#lf-deal-progress.dp-expanded {
    max-height: 140px; /* enough for 2 rows of pills */
}

/* ============================================================
   COLLAPSED BAR
   ============================================================ */
.dp-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 44px;
    cursor: pointer;
    flex-shrink: 0;
}

.dp-bar:hover {
    background: var(--glass-bg-hover);
}

/* Progress track */
.dp-track {
    width: 120px;
    height: 6px;
    background: var(--glass-border);
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
}

.dp-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--text-cyan, #134160);
    transition: width 0.35s ease;
    min-width: 0;
}

.dp-fill--complete {
    background: var(--gold-500) !important;
}

/* Label */
.dp-label {
    flex: 1;
    font-family: 'Exo 2', var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--text-muted);
    letter-spacing: var(--tracking-wide);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-label--complete {
    color: var(--gold-600, var(--gold-500));
    font-weight: var(--weight-semibold);
}

/* Percentage chip */
.dp-pct-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    color: var(--text-muted);
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.dp-pct-chip--complete {
    background: var(--gold-alpha-20) !important;
    border-color: var(--gold-500) !important;
    color: var(--gold-600, var(--gold-500)) !important;
}

/* Chevron */
.dp-chevron {
    color: var(--text-dim);
    font-size: 11px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

#lf-deal-progress.dp-expanded .dp-chevron {
    transform: rotate(180deg);
}

/* ============================================================
   EXPANDED CHECKLIST ITEMS
   ============================================================ */
.dp-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 16px 10px;
    align-items: center;
}

/* Checklist item pill */
.dp-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-wide);
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1.5px solid;
}

/* Incomplete pill */
.dp-item--incomplete {
    background: var(--surface-dark);
    border-color: var(--glass-border);
    color: var(--text-muted);
}

.dp-item--incomplete:hover {
    border-color: var(--glass-border-hover);
    color: var(--text-secondary);
    background: var(--glass-bg-hover);
}

.dp-item--incomplete .dp-item-icon {
    color: var(--text-dim);
}

/* Complete pill */
.dp-item--complete {
    background: var(--text-cyan, #134160);
    border-color: var(--text-cyan, #134160);
    color: #ffffff;
    cursor: default;
}

.dp-item--complete .dp-item-icon {
    color: #ffffff;
}

/* Flash animation on completion */
.dp-item--flash {
    animation: dpPillFlash 0.35s ease forwards;
}

@keyframes dpPillFlash {
    0%   { box-shadow: none; }
    40%  { box-shadow: 0 0 10px rgba(253,169,41,0.45); border-color: var(--gold-500); }
    100% { box-shadow: none; }
}

.dp-item-icon {
    font-size: 10px;
}

/* Hidden item (Rent — shown only for Rental/BRRRR) */
.dp-item--hidden {
    display: none !important;
}

/* ============================================================
   DEAL COMPLETE STATE — confetti dots
   ============================================================ */
.dp-confetti {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
}

#lf-deal-progress.dp-complete .dp-confetti {
    display: inline-flex;
}

.dp-confetti-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    animation: dpConfetti 1.2s ease infinite;
}

.dp-confetti-dot:nth-child(1) {
    background: var(--gold-500);
    animation-delay: 0s;
}

.dp-confetti-dot:nth-child(2) {
    background: var(--text-cyan, #134160);
    animation-delay: 0.2s;
}

.dp-confetti-dot:nth-child(3) {
    background: var(--color-positive);
    animation-delay: 0.4s;
}

@keyframes dpConfetti {
    0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
    50%       { transform: translateY(-4px) scale(1.3); opacity: 0.7; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    #lf-deal-progress.dp-expanded {
        max-height: 200px;
    }

    .dp-track {
        width: 80px;
    }

    .dp-items {
        gap: 5px;
        padding: 6px 12px 10px;
    }

    .dp-item {
        font-size: 9px;
        padding: 3px 9px;
    }
}
