/* ============================================================
   tour-runner.css — Sidekick Tour visual layer (Phase 4).

   .tc-tour-card lives inside the Sidekick chat panel as a
   system-role message. Mirrors the lesson-modal .up-ai-proposal
   pattern so the visual language stays consistent across the app.
   ============================================================ */

/* --- System tour card (paused / pending / confirm states) --- */
.tc-tour-card {
    margin: 8px 12px 4px 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tc-tour-card-paused {
    border-color: #fde68a;
    background: #fffbeb;
}
.tc-tour-card-pending {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.tc-tour-card-confirm {
    border-color: #fecaca;
    background: #fef2f2;
}

.tc-tour-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: #6b7280;
}
.tc-tour-card-paused .tc-tour-card-tag { color: #92400e; }
.tc-tour-card-pending .tc-tour-card-tag { color: #166534; }
.tc-tour-card-confirm .tc-tour-card-tag { color: #991b1b; }

.tc-tour-card-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}
.tc-tour-card-body {
    color: #374151;
    margin-bottom: 10px;
}
.tc-tour-card-body b { color: #111827; }

/* --- Per-row op badge inside confirm cards --- */
.tc-tour-card-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 10px 0;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
}
.tc-tour-card-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.tc-tour-card-op {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
    flex-shrink: 0;
}
.tc-tour-card-op-type   { background: #fef3c7; color: #92400e; }
.tc-tour-card-op-submit { background: #fee2e2; color: #991b1b; }
.tc-tour-card-op-click  { background: #dbeafe; color: #1e40af; }
.tc-tour-card-op-action { background: #e5e7eb; color: #374151; }
.tc-tour-card-row-label { color: #1f2937; }

.tc-tour-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tc-tour-card-btn {
    appearance: none;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #1f2937;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.tc-tour-card-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.tc-tour-card-btn-primary {
    background: #059669;
    border-color: #047857;
    color: #ffffff;
}
.tc-tour-card-btn-primary:hover {
    background: #047857;
    border-color: #065f46;
}
.tc-tour-card-btn-danger {
    background: #ffffff;
    border-color: #fecaca;
    color: #b91c1c;
}
.tc-tour-card-btn-danger:hover {
    background: #fef2f2;
    border-color: #f87171;
}
.tc-tour-card-btn:disabled,
.tc-tour-card-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.tc-tour-card-btn:disabled:hover,
.tc-tour-card-btn[disabled]:hover {
    background: inherit;
    border-color: inherit;
}
/* ASK_USER card — two-step pick-then-confirm UX. The confirm row sits
   below the options with a divider so the Confirm action reads as a
   distinct step rather than another option. */
.tc-ask-options {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
}
.tc-ask-option {
    width: 100%;
    max-width: 100%;
    text-align: left;
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}
.tc-ask-confirm-row {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}
.tc-ask-confirm {
    padding: 6px 16px;
}

/* --- Progress badge --- */
/* When a tour is active the existing #aiBubbleBadge slot (a small red dot
   reserved for unread-message hints) repurposes as a "3/7" pill so the
   teacher can see progress at a glance even with the panel collapsed. */
.ai-bubble-badge.tc-tour-progress {
    width: auto;
    min-width: 22px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: #f59e0b;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid #ffffff;
    top: -4px;
    right: -4px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
