/**
 * CSS-ShareHub — Drill-down modal styles
 */

/* ═══ Drill-down header subtitle ════════════════════════════ */
.cssh-dd-subtitle {
    font-size: 13px;
    color: #6B7280;
    margin-top: 4px;
    font-weight: 400;
}

/* ═══ Stats row ═════════════════════════════════════════════ */
.cssh-dd-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.cssh-dd-stat {
    background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.15);
    transition: transform 0.2s ease;
}

.cssh-dd-stat:hover {
    transform: translateY(-2px);
}

.cssh-dd-stat-num {
    font-size: 28px;
    font-weight: 800;
    color: #1B4332;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.cssh-dd-pct {
    font-size: 18px;
    color: #40916C;
    margin-left: 2px;
}

.cssh-dd-stat-lbl {
    font-size: 11px;
    color: #065F46;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .cssh-dd-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══ Section ═══════════════════════════════════════════════ */
.cssh-dd-section {
    margin-bottom: 24px;
}

.cssh-dd-section-title {
    font-size: 12px;
    font-weight: 800;
    color: #1B4332;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

/* ═══ Tests pills ═══════════════════════════════════════════ */
.cssh-dd-tests {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cssh-dd-test-pill {
    background: #F3F4F6;
    color: #1B4332;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #E5E7EB;
}

/* ═══ Filter chips ══════════════════════════════════════════ */
.cssh-dd-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

.cssh-filter-chip {
    background: white;
    border: 1.5px solid #E5E7EB;
    color: #6B7280;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.cssh-filter-chip:hover {
    border-color: #40916C;
    color: #1B4332;
}

.cssh-filter-chip.active {
    background: #1B4332;
    border-color: #1B4332;
    color: white;
}

/* ═══ Contact rows ══════════════════════════════════════════ */
.cssh-dd-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cssh-dd-contact {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    background: #FAFBFC;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.cssh-dd-contact:hover {
    background: white;
    border-color: #40916C;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Status-based left border accent */
.cssh-dd-contact[data-status="completed"] { border-left: 4px solid #10B981; }
.cssh-dd-contact[data-status="in_progress"] { border-left: 4px solid #F59E0B; }
.cssh-dd-contact[data-status="clicked"] { border-left: 4px solid #3B82F6; }
.cssh-dd-contact[data-status="pending"] { border-left: 4px solid #9CA3AF; }
.cssh-dd-contact[data-status="expired"], .cssh-dd-contact[data-status="revoked"] {
    border-left: 4px solid #EF4444;
    opacity: 0.65;
}

/* ═══ Avatar ════════════════════════════════════════════════ */
.cssh-dd-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1B4332, #40916C);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* ═══ Contact main info ═════════════════════════════════════ */
.cssh-dd-contact-main {
    flex: 1;
    min-width: 0;
}

.cssh-dd-contact-name {
    font-weight: 700;
    font-size: 14px;
    color: #1F2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cssh-dd-contact-email {
    font-size: 12px;
    color: #6B7280;
    margin-top: 2px;
    font-family: ui-monospace, SF Mono, monospace;
}

.cssh-dd-contact-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.cssh-dd-progress-text {
    font-size: 12px;
    color: #6B7280;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ═══ Timeline ══════════════════════════════════════════════ */
.cssh-dd-timeline {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    color: #9CA3AF;
}

.cssh-dd-timeline span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ═══ Action buttons ════════════════════════════════════════ */
.cssh-dd-contact-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.cssh-dd-contact-actions .cssh-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .cssh-dd-contact {
        grid-template-columns: auto 1fr;
        gap: 12px;
    }

    .cssh-dd-contact-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        margin-top: 8px;
    }
}
