/* Explain: Styles for the live delivery coach and situation assistant. */
/* ===== مدرّب الإلقاء الحي + مساعد المواقف: تلوين مستوى الصوت وشرائح المواقف ===== */

/* ---------- مدرّب الإلقاء الحي ---------- */

.ai-delivery-stage {
    margin-top: 1.75rem;
    padding: 1.35rem 1.35rem 1.15rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #f7f7f9;
    transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.ai-delivery-stage.is-soft {
    border-color: #16a34a;
    background: rgba(22, 163, 74, 0.06);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.08);
}

.ai-delivery-stage.is-medium {
    border-color: #d9a406;
    background: rgba(217, 164, 6, 0.08);
    box-shadow: 0 0 0 4px rgba(217, 164, 6, 0.1);
}

.ai-delivery-stage.is-loud {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.07);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.ai-delivery-script {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 2.15;
    color: var(--graphite-deep);
    text-wrap: pretty;
    transition: color 220ms ease;
}

.ai-delivery-stage.is-soft .ai-delivery-script {
    color: #15803d;
}

.ai-delivery-stage.is-medium .ai-delivery-script {
    color: #a16207;
}

.ai-delivery-stage.is-loud .ai-delivery-script {
    color: #b91c1c;
}

.ai-delivery-meter {
    position: relative;
    overflow: hidden;
    height: 1rem;
    margin-top: 1.35rem;
    border-radius: 999px;
    background: #e9ebef;
}

.ai-delivery-meter-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #16a34a;
    transition: width 90ms linear, background 220ms ease;
}

.ai-delivery-meter.is-soft .ai-delivery-meter-fill {
    background: #16a34a;
}

.ai-delivery-meter.is-medium .ai-delivery-meter-fill {
    background: #d9a406;
}

.ai-delivery-meter.is-loud .ai-delivery-meter-fill {
    background: #dc2626;
}

.ai-delivery-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 0.9rem;
}

.ai-delivery-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.ai-delivery-legend-item i {
    font-size: 0.6rem;
}

.ai-delivery-legend-item.is-soft i {
    color: #16a34a;
}

.ai-delivery-legend-item.is-medium i {
    color: #d9a406;
}

.ai-delivery-legend-item.is-loud i {
    color: #dc2626;
}

.ai-delivery-summary {
    margin-top: 1.5rem;
    padding: 1.35rem 1.45rem;
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(20, 22, 26, 0.1);
}

.ai-delivery-bar-row {
    display: flex;
    overflow: hidden;
    height: 0.9rem;
    border-radius: 999px;
    background: #e9ebef;
}

.ai-delivery-bar-seg {
    height: 100%;
}

.ai-delivery-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ai-delivery-stats li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: var(--graphite-deep);
}

.ai-delivery-dot {
    width: 0.65rem;
    height: 0.65rem;
    flex-shrink: 0;
    border-radius: 999px;
}

.ai-delivery-tip {
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    line-height: 1.9;
    color: var(--text-muted);
}

/* ---------- مساعد المواقف والردود ---------- */

.ai-sit-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ai-sit-chip {
    display: inline-flex;
    min-height: 2.9rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.05rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--graphite-deep);
    background: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.6;
    cursor: pointer;
    transition: border-color 200ms ease, color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.ai-sit-chip i {
    color: var(--accent-color);
}

.ai-sit-chip:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.ai-sit-chip.is-active {
    border-color: var(--accent-color);
    color: #ffffff;
    background: linear-gradient(135deg, #d4245c, var(--accent-color));
    box-shadow: 0 12px 28px rgba(196, 31, 85, 0.28);
}

.ai-sit-chip.is-active i {
    color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    .ai-delivery-stage,
    .ai-delivery-script,
    .ai-delivery-meter-fill,
    .ai-sit-chip {
        transition: none;
    }
}