/* TMM Chat Widgets — service cards, calendar, slots, contact form, summary, success.
   Brand color via --tmm-chat-brand inherits from .tmm-public-chat container.       */

/* ═══════════ Concern chips ═══════════ */
.tmm-pc-concerns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 8px 0;
}
.tmm-pc-concern-chip {
    background: var(--tmm-chat-bg);
    border: 1.5px solid var(--tmm-chat-brand);
    color: var(--tmm-chat-text);
    border-radius: 12px;
    padding: 12px 10px;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500;
    min-height: 72px;
    transition: all .15s ease;
}
.tmm-pc-concern-chip .tmm-pc-icon { font-size: 20px; }
.tmm-pc-concern-chip:hover {
    background: color-mix(in srgb, var(--tmm-chat-brand) 8%, white);
    transform: translateY(-1px);
}
.tmm-pc-concern-chip:focus-visible { outline: 2px solid var(--tmm-chat-accent); outline-offset: 2px; }

/* ═══════════ Service cards ═══════════ */
.tmm-pc-service-cards {
    display: flex; flex-direction: column; gap: 8px;
    margin: 4px 0;
}
.tmm-pc-service-card {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tmm-pc-service-card:hover { border-color: var(--tmm-chat-brand); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.tmm-pc-service-card:focus-visible { outline: 2px solid var(--tmm-chat-accent); outline-offset: 1px; }
.tmm-pc-svc-img {
    width: 56px; height: 56px; border-radius: 8px; object-fit: cover;
    background: var(--tmm-chat-bg-alt);
}
.tmm-pc-svc-img-placeholder {
    display: flex; align-items: center; justify-content: center;
    color: var(--tmm-chat-text-mute); font-size: 24px;
}
.tmm-pc-svc-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.tmm-pc-svc-meta { display: flex; gap: 10px; font-size: 12px; margin-top: 2px; }
.tmm-pc-svc-price { color: var(--tmm-chat-brand); font-weight: 600; }
.tmm-pc-svc-dur { color: var(--tmm-chat-text-mute); }
.tmm-pc-svc-desc {
    font-size: 12px; color: var(--tmm-chat-text-mute);
    margin-top: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.tmm-pc-svc-cta {
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    /* Phase 9 fix #5: WCAG 44×44 touch target at all viewport widths
       (was 36px on tablets/desktop, only 44 on mobile) */
    min-height: 44px;
}
.tmm-pc-svc-cta:hover { background: color-mix(in srgb, var(--tmm-chat-brand) 85%, black); }

/* ═══════════ Branch list ═══════════ */
.tmm-pc-branch-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.tmm-pc-branch-card {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: 12px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    font-family: inherit; font-size: 14px;
    transition: border-color .15s ease;
}
.tmm-pc-branch-card:hover { border-color: var(--tmm-chat-brand); }
.tmm-pc-branch-card:focus-visible { outline: 2px solid var(--tmm-chat-accent); outline-offset: 1px; }
.tmm-pc-branch-name  { font-weight: 600; margin-bottom: 4px; }
.tmm-pc-branch-addr,
.tmm-pc-branch-phone { font-size: 12px; color: var(--tmm-chat-text-mute); margin-top: 2px; }

/* ═══════════ Calendar ═══════════ */
.tmm-pc-calendar {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: 12px;
    padding: 10px;
    margin: 4px 0;
}
.tmm-pc-cal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 0 10px;
}
.tmm-pc-cal-nav {
    background: transparent; border: none; color: var(--tmm-chat-brand);
    font-size: 16px; cursor: pointer;
    /* Phase 9 fix #4: WCAG 44×44 touch target at all viewport widths
       (was 32×32 on tablet 601-1024px). Calendar nav is constrained to a
       360px chat panel so promoting globally has no layout cost. */
    width: 44px; height: 44px;
    min-width: 44px; min-height: 44px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.tmm-pc-cal-nav:hover { background: var(--tmm-chat-bg-alt); }
.tmm-pc-cal-nav:focus-visible { outline: 2px solid var(--tmm-chat-accent); }
.tmm-pc-cal-month { font-weight: 600; font-size: 14px; }

.tmm-pc-cal-wk,
.tmm-pc-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.tmm-pc-cal-wk span {
    text-align: center; font-size: 11px; font-weight: 600;
    color: var(--tmm-chat-text-mute);
    padding: 4px 0;
}
.tmm-pc-cal-day {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    aspect-ratio: 1;
    min-height: 36px;
    cursor: pointer;
    font-family: inherit; font-size: 13px;
    color: var(--tmm-chat-text);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    position: relative;
    transition: background .12s ease;
}
.tmm-pc-cal-day-blank { visibility: hidden; }
.tmm-pc-cal-day-available:hover {
    background: color-mix(in srgb, var(--tmm-chat-brand) 12%, white);
    border-color: var(--tmm-chat-brand);
}
.tmm-pc-cal-day-available:focus-visible { outline: 2px solid var(--tmm-chat-accent); }
.tmm-pc-cal-day-available .tmm-pc-cal-dot {
    width: 4px; height: 4px;
    background: var(--tmm-chat-brand);
    border-radius: 50%;
    margin-top: 2px;
}
.tmm-pc-cal-day-full {
    color: #c8c8c8;
    background: #fafafa;
    cursor: not-allowed;
    text-decoration: line-through;
}
.tmm-pc-cal-day-past   { color: #d4d4d4; cursor: not-allowed; }
.tmm-pc-cal-day-closed { color: #d4d4d4; cursor: not-allowed; background: repeating-linear-gradient(45deg, #fafafa 0 4px, transparent 4px 8px); }

.tmm-pc-cal-legend {
    display: flex; gap: 12px; font-size: 11px; color: var(--tmm-chat-text-mute);
    margin-top: 10px; padding-top: 8px;
    border-top: 1px solid var(--tmm-chat-border);
}
.tmm-pc-cal-legend i {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; margin-right: 4px; vertical-align: middle;
}
.tmm-pc-l-avail { background: var(--tmm-chat-brand); }
.tmm-pc-l-full  {
    background: #f0f0f0; border: 1px solid #ddd;
    /* Color-blind safe — diagonal stripe pattern in addition to color */
    background-image: linear-gradient(45deg, #c0392b 25%, transparent 25%, transparent 50%, #c0392b 50%, #c0392b 75%, transparent 75%);
    background-size: 4px 4px;
}
.tmm-pc-l-past  {
    background: #d4d4d4;
    /* Strikethrough mark for color-blind users */
    position: relative;
}
.tmm-pc-l-past::after {
    content: '';
    position: absolute; left: 0; right: 0; top: 50%;
    border-top: 1px solid #888;
    transform: rotate(-45deg);
}

/* ═══════════ Time slots ═══════════ */
.tmm-pc-slots {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: 12px;
    padding: 10px;
    margin: 4px 0;
}
.tmm-pc-slots-title { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.tmm-pc-slots-empty { font-size: 13px; color: var(--tmm-chat-text-mute); padding: 8px 0; }
.tmm-pc-slot-group { margin-bottom: 10px; }
.tmm-pc-slot-group-label {
    font-size: 12px; font-weight: 600; color: var(--tmm-chat-text-mute);
    margin-bottom: 6px;
}
.tmm-pc-slot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.tmm-pc-slot {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-brand);
    color: var(--tmm-chat-brand);
    border-radius: 8px;
    padding: 8px 4px;
    min-height: 36px;
    font-family: inherit; font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all .12s ease;
}
.tmm-pc-slot-available:hover { background: var(--tmm-chat-brand); color: var(--tmm-chat-brand-fg); }
.tmm-pc-slot-available:focus-visible { outline: 2px solid var(--tmm-chat-accent); }
.tmm-pc-slot-taken {
    opacity: .4;
    text-decoration: line-through;
    cursor: not-allowed;
    border-color: var(--tmm-chat-border);
    color: var(--tmm-chat-text-mute);
}
.tmm-pc-slot-past,
.tmm-pc-slot-break { opacity: .3; cursor: not-allowed; border-color: var(--tmm-chat-border); color: var(--tmm-chat-text-mute); }

@media (max-width: 380px) {
    .tmm-pc-slot-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════ Contact form ═══════════ */
.tmm-pc-contact-form {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: 12px;
    padding: 12px;
    margin: 4px 0;
    display: flex; flex-direction: column; gap: 12px;
}
.tmm-pc-field {
    display: flex; flex-direction: column;
    position: relative;
}
.tmm-pc-field label {
    font-size: 12px; font-weight: 600;
    color: var(--tmm-chat-text-mute);
    margin-bottom: 4px;
}
.tmm-pc-field input {
    border: 1.5px solid var(--tmm-chat-border);
    border-radius: 10px;
    padding: 10px 36px 10px 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .12s ease;
    min-height: 44px;
}
.tmm-pc-field input:focus { border-color: var(--tmm-chat-brand); }
.tmm-pc-fld-icon {
    position: absolute;
    right: 12px; top: 32px;
    font-style: normal; font-size: 16px; font-weight: bold;
}
.tmm-pc-field-valid input { border-color: #2ea44f; }
.tmm-pc-field-valid .tmm-pc-fld-icon { color: #2ea44f; }
.tmm-pc-field-invalid input { border-color: #c0392b; }
.tmm-pc-field-invalid .tmm-pc-fld-icon { color: #c0392b; }
.tmm-pc-fld-hint {
    font-size: 11px;
    color: #c0392b;
    margin-top: 4px;
    min-height: 13px;
}
.tmm-pc-contact-submit {
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}
.tmm-pc-contact-submit:disabled { opacity: .4; cursor: not-allowed; }
.tmm-pc-contact-submit:focus-visible { outline: 2px solid var(--tmm-chat-accent); outline-offset: 2px; }

/* ═══════════ Summary card ═══════════ */
.tmm-pc-summary {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: 12px;
    padding: 12px;
    margin: 4px 0;
}
.tmm-pc-sum-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.tmm-pc-sum-row {
    display: grid;
    grid-template-columns: 80px 1fr 32px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--tmm-chat-border);
}
.tmm-pc-sum-row:last-of-type { border-bottom: none; }
.tmm-pc-sum-label { font-size: 12px; color: var(--tmm-chat-text-mute); font-weight: 600; }
.tmm-pc-sum-value { font-size: 14px; font-weight: 500; }
.tmm-pc-sum-edit {
    background: transparent; border: none; cursor: pointer;
    color: var(--tmm-chat-text-mute);
    font-size: 14px; padding: 4px;
    border-radius: 6px;
    /* Phase 9 fix #10: WCAG 44×44 at all sizes (was 32×32 on tablet).
       Edit button is the only way to fix mistakes mid-flow. */
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
}
.tmm-pc-sum-edit:hover { color: var(--tmm-chat-brand); background: var(--tmm-chat-bg-alt); }
.tmm-pc-sum-edit:focus-visible { outline: 2px solid var(--tmm-chat-accent); }
.tmm-pc-sum-confirm {
    width: 100%;
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    min-height: 48px;
}
.tmm-pc-sum-confirm:hover { background: color-mix(in srgb, var(--tmm-chat-brand) 85%, black); }
.tmm-pc-sum-confirm:focus-visible { outline: 2px solid var(--tmm-chat-accent); outline-offset: 2px; }

/* ═══════════ Success state ═══════════ */
.tmm-pc-success {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: 12px;
    padding: 24px 16px;
    margin: 4px 0;
    text-align: center;
}
.tmm-pc-success-check {
    width: 64px; height: 64px; margin: 0 auto 12px;
}
.tmm-pc-success-check svg { width: 100%; height: 100%; }
.tmm-pc-success-check svg circle {
    stroke: var(--tmm-chat-brand);
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: tmmPcCircleDraw .6s cubic-bezier(.65,0,.45,1) forwards;
}
.tmm-pc-success-check svg path {
    stroke: var(--tmm-chat-brand);
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: tmmPcCheckDraw .35s .35s cubic-bezier(.65,0,.45,1) forwards;
}
@keyframes tmmPcCircleDraw { to { stroke-dashoffset: 0; } }
@keyframes tmmPcCheckDraw  { to { stroke-dashoffset: 0; } }
.tmm-pc-success-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.tmm-pc-success-ref   { font-size: 14px; color: var(--tmm-chat-text-mute); margin-bottom: 8px; }
.tmm-pc-success-msg   { font-size: 13px; color: var(--tmm-chat-text); margin-bottom: 14px; }
.tmm-pc-success-cta {
    background: var(--tmm-chat-bg);
    color: var(--tmm-chat-brand);
    border: 1.5px solid var(--tmm-chat-brand);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}
.tmm-pc-success-cta:hover { background: var(--tmm-chat-brand); color: var(--tmm-chat-brand-fg); }
.tmm-pc-success-cta:focus-visible { outline: 2px solid var(--tmm-chat-accent); outline-offset: 2px; }

/* ═══════════ Empty state ═══════════ */
.tmm-pc-empty {
    background: var(--tmm-chat-bg);
    border: 1px dashed var(--tmm-chat-border);
    border-radius: 12px;
    padding: 24px 16px;
    margin: 4px 0;
    text-align: center;
}
.tmm-pc-empty-icon { font-size: 32px; margin-bottom: 8px; }
.tmm-pc-empty-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.tmm-pc-empty-body { font-size: 13px; color: var(--tmm-chat-text-mute); margin-bottom: 12px; }
.tmm-pc-empty-action {
    display: inline-block;
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    min-height: 36px;
    line-height: 20px;
}

/* ═══════════ Service card badge (Dịch vụ vs Sản phẩm) ═══════════ */
.tmm-pc-svc-head {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin-bottom: 2px;
}
.tmm-pc-svc-head .tmm-pc-svc-name { flex: 1; min-width: 0; }
.tmm-pc-svc-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
    flex-shrink: 0;
}
.tmm-pc-svc-badge-service { background: color-mix(in srgb, var(--tmm-chat-brand) 14%, white); color: var(--tmm-chat-brand); border: 1px solid color-mix(in srgb, var(--tmm-chat-brand) 30%, white); }
.tmm-pc-svc-badge-product { background: #fef3e2; color: #c47b18; border: 1px solid #f0d4a4; }

/* ═══════════ Branch search ═══════════ */
.tmm-pc-branch-search {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.tmm-pc-branch-search-row {
    position: relative;
    width: 100%;
}
.tmm-pc-branch-search input {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid var(--tmm-chat-border);
    border-radius: 8px;
    padding: 9px 12px 9px 32px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    min-height: 38px;
    background: var(--tmm-chat-bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2350575e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>") no-repeat 10px center;
    background-size: 14px 14px;
}
.tmm-pc-branch-search input:focus { border-color: var(--tmm-chat-brand); }
.tmm-pc-branch-meta {
    display: flex;
    justify-content: flex-end;
    padding: 0 4px;
}
.tmm-pc-branch-count {
    font-size: 11px;
    color: var(--tmm-chat-text-mute);
}
.tmm-pc-branch-cards {
    display: flex; flex-direction: column; gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    /* Phase 9 fix #15: smoother iOS scroll + prevent rubber-band cascading
       to the parent panel */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.tmm-pc-cp-results {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.tmm-pc-branch-expand {
    width: 100%;
    background: transparent;
    border: 1px dashed var(--tmm-chat-border);
    color: var(--tmm-chat-brand);
    font-family: inherit;
    font-size: 12px;
    padding: 8px;
    margin-top: 6px;
    border-radius: 8px;
    cursor: pointer;
    min-height: 36px;
}
.tmm-pc-branch-expand:hover { background: var(--tmm-chat-bg-alt); border-color: var(--tmm-chat-brand); }
.tmm-pc-branch-expand:focus-visible { outline: 2px solid var(--tmm-chat-accent); outline-offset: 1px; }

/* ═══════════ Stale widgets — collapse + fade ═══════════ */
.tmm-pc-widget-stale {
    opacity: .35;
    pointer-events: none;
    max-height: 48px;
    overflow: hidden;
    position: relative;
    margin-bottom: 4px;
    transition: opacity .2s ease, max-height .2s ease;
}
.tmm-pc-widget-stale::after {
    content: "✓ Đã chọn — bấm ◀ để sửa";
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(to bottom, rgba(248,250,249,0) 0%, var(--tmm-chat-bg-alt) 50%, var(--tmm-chat-bg-alt) 100%);
    color: var(--tmm-chat-text-mute);
    font-size: 11px;
    font-weight: 500;
}

/* ═══════════ Account summary (logged-in customer) ═══════════ */
.tmm-pc-account {
    background: var(--tmm-chat-bg);
    border: 1.5px solid var(--tmm-chat-brand);
    border-radius: 12px;
    padding: 14px 12px;
    margin: 4px 0;
}
.tmm-pc-acc-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--tmm-chat-brand); }
.tmm-pc-acc-row {
    display: grid; grid-template-columns: 80px 1fr; gap: 8px;
    font-size: 13px; padding: 5px 0;
    border-bottom: 1px dashed var(--tmm-chat-border);
}
.tmm-pc-acc-row:last-of-type { border-bottom: none; }
.tmm-pc-acc-label { color: var(--tmm-chat-text-mute); font-weight: 500; }
.tmm-pc-acc-actions { display: flex; gap: 8px; margin-top: 12px; }
.tmm-pc-acc-edit, .tmm-pc-acc-confirm {
    flex: 1; padding: 10px; border-radius: 10px; font-size: 14px;
    font-family: inherit; cursor: pointer; min-height: 44px;
}
.tmm-pc-acc-edit { background: transparent; color: var(--tmm-chat-brand); border: 1.5px solid var(--tmm-chat-brand); }
.tmm-pc-acc-confirm { background: var(--tmm-chat-brand); color: var(--tmm-chat-brand-fg); border: none; font-weight: 600; }

/* ═══════════ Customer picker (admin) ═══════════ */
.tmm-pc-customer-picker {
    background: var(--tmm-chat-bg); border: 1px solid var(--tmm-chat-border);
    border-radius: 12px; padding: 10px; margin: 4px 0;
}
.tmm-pc-cp-search-row { margin-bottom: 8px; }
.tmm-pc-cp-search {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid var(--tmm-chat-border); border-radius: 8px;
    padding: 9px 12px; font-size: 13px; font-family: inherit;
    outline: none; min-height: 38px;
}
.tmm-pc-cp-search:focus { border-color: var(--tmm-chat-brand); }
.tmm-pc-cp-results { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; margin-bottom: 8px; }
.tmm-pc-cp-card {
    background: var(--tmm-chat-bg); border: 1px solid var(--tmm-chat-border);
    border-radius: 8px; padding: 8px 10px; text-align: left; cursor: pointer;
    font-family: inherit; transition: border-color .12s ease;
}
.tmm-pc-cp-card:hover { border-color: var(--tmm-chat-brand); }
.tmm-pc-cp-name { font-weight: 600; font-size: 13px; }
.tmm-pc-cp-phone { font-size: 12px; color: var(--tmm-chat-text-mute); margin-top: 2px; }
.tmm-pc-cp-empty { font-size: 12px; color: var(--tmm-chat-text-mute); padding: 12px 4px; text-align: center; }
.tmm-pc-cp-walkin {
    width: 100%; padding: 10px; border-radius: 8px;
    background: transparent; border: 1.5px dashed var(--tmm-chat-brand);
    color: var(--tmm-chat-brand);
    font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; min-height: 40px;
}
.tmm-pc-cp-walkin:hover { background: var(--tmm-chat-bg-alt); }

/* ═══════════ Walk-in form (admin) ═══════════ */
.tmm-pc-walkin {
    background: var(--tmm-chat-bg); border: 1px solid var(--tmm-chat-border);
    border-radius: 12px; padding: 12px; margin: 4px 0;
    display: flex; flex-direction: column; gap: 10px;
}
.tmm-pc-walkin-submit {
    background: var(--tmm-chat-brand); color: var(--tmm-chat-brand-fg);
    border: none; border-radius: 10px; padding: 12px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    min-height: 44px; margin-top: 4px;
}
.tmm-pc-walkin-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ═══════════ Force-book confirm (admin) ═══════════ */
.tmm-pc-force-confirm {
    background: #fff5f5; border: 1.5px solid #f59e0b;
    border-radius: 12px; padding: 14px; margin: 4px 0;
}
.tmm-pc-fc-warn { font-weight: 600; color: #c47b18; margin-bottom: 12px; font-size: 13px; }
.tmm-pc-fc-actions { display: flex; gap: 8px; }
.tmm-pc-fc-cancel, .tmm-pc-fc-confirm {
    flex: 1; padding: 10px; border-radius: 8px;
    font-family: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; min-height: 44px;
}
.tmm-pc-fc-cancel { background: var(--tmm-chat-bg); border: 1.5px solid var(--tmm-chat-border); color: var(--tmm-chat-text); }
.tmm-pc-fc-confirm { background: #c47b18; color: #fff; border: none; }
.tmm-pc-fc-confirm:disabled { opacity: .5; cursor: not-allowed; }

/* ═══════════ Cart chip + quantity spinner ═══════════ */
.tmm-pc-cart-chip {
    position: absolute; right: 50px; top: 14px;
    background: rgba(255,255,255,.18);
    color: var(--tmm-chat-brand-fg);
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 12px; font-weight: 600;
    display: none;
}
.tmm-pc-cart-chip.has-items { display: inline-flex; align-items: center; gap: 4px; }
.tmm-pc-svc-qty {
    display: flex; align-items: center; gap: 4px;
    margin-top: 6px;
}
.tmm-pc-svc-qty button {
    /* Phase 9 fix #7: WCAG 44×44 at all sizes (was 28×28). Older spa visitors
       buying products on mobile would frequently miss these. */
    min-width: 44px; min-height: 44px;
    border-radius: 6px;
    border: 1px solid var(--tmm-chat-border);
    background: var(--tmm-chat-bg); cursor: pointer;
    font-size: 16px; font-weight: 600; color: var(--tmm-chat-brand);
    display: inline-flex; align-items: center; justify-content: center;
}
.tmm-pc-svc-qty span { min-width: 24px; text-align: center; font-weight: 600; }

/* ═══════════ Mobile touch targets — promote to WCAG 44×44 ═══════════ */
@media (max-width: 600px) {
    .tmm-pc-cal-day      { min-height: 44px; }
    .tmm-pc-cal-nav      { width: 44px; height: 44px; }
    .tmm-pc-svc-cta      { min-height: 44px; padding: 10px 14px; }
    .tmm-pc-sum-edit     { min-width: 44px; min-height: 44px; }
    .tmm-pc-branch-expand{ min-height: 44px; }
    .tmm-pc-empty-action { min-height: 44px; line-height: 28px; }
    .tmm-pc-slot         { min-height: 44px; }
    .tmm-pc-success-cta  { min-height: 48px; }
}

/* ═══════════ Reduced motion ═══════════ */
@media (prefers-reduced-motion: reduce) {
    .tmm-pc-success-check svg circle,
    .tmm-pc-success-check svg path { animation: none; stroke-dashoffset: 0; }
    .tmm-pc-cal-day { transition: none; }
    .tmm-pc-slot { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   Sales workflow components (Phase Sales v1)
   ═══════════════════════════════════════════════════════════════════ */

/* need_question — chips for picking nhu cầu */
.tmm-pc-need-question {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: var(--tmm-chat-radius, 14px);
    padding: 12px;
    margin: 8px 0;
}
.tmm-pc-nq-progress {
    font-size: 11px; color: var(--tmm-chat-text-mute);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.tmm-pc-nq-concern {
    font-size: 13px; color: var(--tmm-chat-brand); font-weight: 600;
    margin-bottom: 6px;
}
.tmm-pc-nq-label { font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.tmm-pc-nq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tmm-pc-nq-chip {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-brand);
    color: var(--tmm-chat-brand);
    border-radius: 18px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s ease;
    min-height: 44px;
}
.tmm-pc-nq-chip:hover { background: var(--tmm-chat-brand); color: var(--tmm-chat-brand-fg); }
.tmm-pc-nq-chip:focus-visible { outline: 2px solid var(--tmm-chat-accent); outline-offset: 2px; }
.tmm-pc-nq-chip:disabled { opacity: 0.5; cursor: not-allowed; }
.tmm-pc-nq-chips-stale { opacity: 0.45; pointer-events: none; }

/* recommendation_list — top scored products */
.tmm-pc-rec-list { margin: 8px 0; }
.tmm-pc-rec-head {
    font-size: 13px; font-weight: 600; color: var(--tmm-chat-text);
    margin-bottom: 8px;
}
.tmm-pc-rec-card {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 10px;
    align-items: center;
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
}
.tmm-pc-rec-img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.tmm-pc-rec-img-placeholder {
    background: var(--tmm-chat-bg-alt);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
}
.tmm-pc-rec-body { min-width: 0; }
.tmm-pc-rec-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.tmm-pc-rec-reason {
    font-size: 12px; color: var(--tmm-chat-text-mute);
    margin: 4px 0; line-height: 1.3;
}
.tmm-pc-rec-price { font-weight: 600; color: var(--tmm-chat-brand); font-size: 14px; }
.tmm-pc-rec-add {
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    white-space: nowrap;
}
.tmm-pc-rec-add:hover { background: color-mix(in srgb, var(--tmm-chat-brand) 85%, black); }
.tmm-pc-rec-add:disabled { opacity: 0.5; cursor: not-allowed; }
.tmm-pc-rec-empty {
    text-align: center; padding: 24px 12px;
    color: var(--tmm-chat-text-mute);
    font-size: 13px;
}
.tmm-pc-rec-more {
    width: 100%;
    background: transparent;
    border: 1px dashed var(--tmm-chat-border);
    color: var(--tmm-chat-text-mute);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 4px;
}
.tmm-pc-rec-more:hover { background: var(--tmm-chat-bg-alt); color: var(--tmm-chat-brand); }

/* cart_summary */
.tmm-pc-cart {
    background: var(--tmm-chat-bg-alt);
    border: 2px solid var(--tmm-chat-brand);
    border-radius: var(--tmm-chat-radius, 14px);
    padding: 12px;
    margin: 8px 0;
}
.tmm-pc-cart-head {
    font-size: 14px; font-weight: 600;
    color: var(--tmm-chat-brand);
    margin-bottom: 8px;
}
.tmm-pc-cart-msg {
    font-size: 13px; color: var(--tmm-chat-text);
    margin-bottom: 10px;
}
.tmm-pc-cart-items { list-style: none; padding: 0; margin: 0 0 10px; }
.tmm-pc-cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 8px; align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--tmm-chat-border);
    font-size: 13px;
}
.tmm-pc-cart-item:last-child { border-bottom: none; }
.tmm-pc-cart-name { font-weight: 500; }
.tmm-pc-cart-qty { color: var(--tmm-chat-text-mute); font-size: 12px; }
.tmm-pc-cart-sub { font-weight: 600; }
.tmm-pc-cart-remove {
    background: transparent; border: none;
    cursor: pointer; padding: 4px 8px;
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--tmm-chat-text-mute);
    font-size: 16px;
}
.tmm-pc-cart-remove:hover { color: #c93e3e; }
.tmm-pc-cart-total {
    text-align: right;
    font-size: 14px;
    padding: 8px 0;
    border-top: 2px solid var(--tmm-chat-brand);
    margin-top: 4px;
}
.tmm-pc-cart-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.tmm-pc-cart-upsell {
    background: transparent;
    border: 1px solid var(--tmm-chat-accent);
    color: var(--tmm-chat-accent);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}
.tmm-pc-cart-upsell:hover { background: var(--tmm-chat-accent); color: white; }
.tmm-pc-cart-checkout {
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    min-height: 48px;
}
.tmm-pc-cart-checkout:hover { background: color-mix(in srgb, var(--tmm-chat-brand) 85%, black); }
.tmm-pc-cart-checkout:disabled { opacity: 0.6; cursor: not-allowed; }
/* Cart badge in header */
.tmm-pc-cart-badge {
    background: var(--tmm-chat-accent);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px; font-weight: 600;
    margin-right: 8px;
}

/* upsell_offer — combo card */
.tmm-pc-upsell {
    background: linear-gradient(135deg, color-mix(in srgb, var(--tmm-chat-accent) 8%, white), white);
    border: 2px solid var(--tmm-chat-accent);
    border-radius: var(--tmm-chat-radius, 14px);
    padding: 12px;
    margin: 8px 0;
}
.tmm-pc-upsell-head {
    font-size: 14px; font-weight: 600;
    color: var(--tmm-chat-accent);
    margin-bottom: 10px;
}
.tmm-pc-upsell-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}
.tmm-pc-upsell-img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.tmm-pc-upsell-name { font-weight: 600; font-size: 14px; }
.tmm-pc-upsell-partner { font-size: 12px; color: var(--tmm-chat-text-mute); margin: 4px 0; }
.tmm-pc-upsell-price { font-size: 13px; }
.tmm-pc-upsell-price s { color: var(--tmm-chat-text-mute); margin-right: 6px; }
.tmm-pc-upsell-save { color: var(--tmm-chat-accent); font-weight: 600; font-size: 12px; }
.tmm-pc-upsell-actions { display: flex; flex-direction: column; gap: 8px; }
.tmm-pc-upsell-accept {
    background: var(--tmm-chat-accent); color: white; border: none;
    border-radius: 8px; padding: 12px; font-weight: 600; cursor: pointer;
    min-height: 44px; font-size: 14px;
}
.tmm-pc-upsell-accept:hover { background: color-mix(in srgb, var(--tmm-chat-accent) 85%, black); }
.tmm-pc-upsell-decline {
    background: transparent; color: var(--tmm-chat-text-mute);
    border: 1px solid var(--tmm-chat-border);
    border-radius: 8px; padding: 10px; cursor: pointer;
    min-height: 44px; font-size: 13px;
}
.tmm-pc-upsell-decline:hover { background: var(--tmm-chat-bg-alt); }

/* continue_or_checkout */
.tmm-pc-continue {
    background: var(--tmm-chat-bg);
    border: 1px solid var(--tmm-chat-border);
    border-radius: var(--tmm-chat-radius, 14px);
    padding: 12px;
    margin: 8px 0;
}
.tmm-pc-continue-summary {
    font-size: 13px; color: var(--tmm-chat-text);
    margin-bottom: 12px;
    padding: 8px;
    background: var(--tmm-chat-bg-alt);
    border-radius: 8px;
    text-align: center;
}
.tmm-pc-continue-actions { display: flex; flex-direction: column; gap: 8px; }
.tmm-pc-continue-shop, .tmm-pc-continue-checkout {
    border-radius: 8px; padding: 12px; font-weight: 600;
    cursor: pointer; min-height: 44px; font-size: 14px;
}
.tmm-pc-continue-shop {
    background: transparent;
    border: 1px solid var(--tmm-chat-border);
    color: var(--tmm-chat-brand);
}
.tmm-pc-continue-shop:hover { background: var(--tmm-chat-bg-alt); }
.tmm-pc-continue-checkout {
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    border: none;
}
.tmm-pc-continue-checkout:hover { background: color-mix(in srgb, var(--tmm-chat-brand) 85%, black); }

/* redirect_to_cart */
.tmm-pc-redirect-cart {
    text-align: center;
    padding: 20px;
    background: var(--tmm-chat-bg-alt);
    border-radius: var(--tmm-chat-radius, 14px);
    margin: 8px 0;
}
.tmm-pc-redirect-msg { font-size: 14px; margin-bottom: 8px; }
.tmm-pc-redirect-summary { font-size: 13px; color: var(--tmm-chat-text-mute); margin-bottom: 16px; }
.tmm-pc-redirect-btn {
    display: inline-block;
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    min-height: 44px;
    line-height: 20px;
}
.tmm-pc-redirect-btn:hover { background: color-mix(in srgb, var(--tmm-chat-brand) 85%, black); color: var(--tmm-chat-brand-fg); }

/* ════════════════════════ PHASE 20 — IN-CHAT CHECKOUT ════════════════════════ */

/* Cart actions: dual CTA (in-chat + web) */
.tmm-pc-cart-actions {
    display: flex; flex-direction: column; gap: 8px; margin-top: 12px;
}
.tmm-pc-cart-checkout-chat {
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    font-size: 14px;
}
.tmm-pc-cart-checkout-chat:hover { background: color-mix(in srgb, var(--tmm-chat-brand) 85%, black); }
.tmm-pc-cart-checkout-chat:disabled { opacity: 0.6; cursor: wait; }
.tmm-pc-cart-checkout-web {
    background: transparent;
    border: 1px solid var(--tmm-chat-border);
    color: var(--tmm-chat-text);
    border-radius: 8px;
    padding: 12px;
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
    font-size: 13px;
}
.tmm-pc-cart-checkout-web:hover { background: var(--tmm-chat-bg-alt); }

/* checkout_form */
.tmm-pc-checkout-form {
    background: var(--tmm-chat-bg-alt, #f7f7f7);
    border-radius: var(--tmm-chat-radius, 14px);
    padding: 16px;
    margin: 8px 0;
}
.tmm-pc-cf-msg {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--tmm-chat-text);
}
.tmm-pc-cf-recall {
    background: color-mix(in srgb, var(--tmm-chat-brand) 12%, white);
    border-left: 3px solid var(--tmm-chat-brand);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    color: var(--tmm-chat-text);
}
.tmm-pc-cf-cart-mini {
    background: white;
    border: 1px solid var(--tmm-chat-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 12px;
}
.tmm-pc-cf-cart-head {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
}
.tmm-pc-cf-cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 100px;
    overflow-y: auto;
}
.tmm-pc-cf-cart-list li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--tmm-chat-border, #eee);
    font-size: 12px;
}
.tmm-pc-cf-cart-list li:last-child { border-bottom: none; }
.tmm-pc-cf-it-name { color: var(--tmm-chat-text); }
.tmm-pc-cf-it-qty { color: var(--tmm-chat-text-mute); }
.tmm-pc-cf-it-sub { color: var(--tmm-chat-brand); font-weight: 600; text-align: right; }
.tmm-pc-cf-cart-total {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--tmm-chat-border);
    text-align: right;
    font-size: 13px;
}
.tmm-pc-cf-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.tmm-pc-cf-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tmm-pc-cf-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--tmm-chat-text);
}
.tmm-pc-cf-req { color: #e53935; }
.tmm-pc-cf-field input,
.tmm-pc-cf-field textarea {
    border: 1px solid var(--tmm-chat-border);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: var(--tmm-chat-text);
    min-height: 40px;
    width: 100%;
    box-sizing: border-box;
}
.tmm-pc-cf-field textarea { resize: vertical; min-height: 60px; }
.tmm-pc-cf-field input:focus,
.tmm-pc-cf-field textarea:focus {
    outline: none;
    border-color: var(--tmm-chat-brand);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tmm-chat-brand) 20%, transparent);
}
.tmm-pc-cf-field-error input,
.tmm-pc-cf-field-error textarea {
    border-color: #e53935;
    background: color-mix(in srgb, #e53935 5%, white);
}
.tmm-pc-cf-error {
    font-size: 11px;
    color: #e53935;
    min-height: 14px;
}

/* Payment picker chips */
.tmm-pc-cf-payment {
    margin-bottom: 14px;
}
.tmm-pc-cf-payment-label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--tmm-chat-text);
}
.tmm-pc-cf-payment-chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tmm-pc-cf-pm-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: white;
    border: 1.5px solid var(--tmm-chat-border);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    min-height: 44px;
}
.tmm-pc-cf-pm-chip:hover { border-color: var(--tmm-chat-brand); }
.tmm-pc-cf-pm-chip[data-active="1"] {
    border-color: var(--tmm-chat-brand);
    background: color-mix(in srgb, var(--tmm-chat-brand) 8%, white);
    font-weight: 600;
}
.tmm-pc-cf-pm-chip small {
    color: var(--tmm-chat-text-mute);
    font-size: 11px;
    font-weight: normal;
}

/* Submit + web fallback */
.tmm-pc-cf-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tmm-pc-cf-submit {
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    font-size: 15px;
}
.tmm-pc-cf-submit:hover { background: color-mix(in srgb, var(--tmm-chat-brand) 85%, black); }
.tmm-pc-cf-submit:disabled { opacity: 0.6; cursor: wait; }
.tmm-pc-cf-web {
    background: transparent;
    border: 1px solid var(--tmm-chat-border);
    color: var(--tmm-chat-text-mute);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    min-height: 40px;
    font-size: 12px;
}
.tmm-pc-cf-web:hover { background: var(--tmm-chat-bg-alt); }

/* checkout_assistant — chips on /checkout page */
.tmm-pc-checkout-assistant {
    background: var(--tmm-chat-bg-alt);
    border-radius: var(--tmm-chat-radius, 14px);
    padding: 14px;
    margin: 8px 0;
}
.tmm-pc-ca-msg {
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--tmm-chat-text);
}
.tmm-pc-ca-chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tmm-pc-ca-chip {
    background: white;
    border: 1px solid var(--tmm-chat-border);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    color: var(--tmm-chat-text);
    min-height: 40px;
}
.tmm-pc-ca-chip:hover { border-color: var(--tmm-chat-brand); background: color-mix(in srgb, var(--tmm-chat-brand) 6%, white); }

/* order_confirmation */
.tmm-pc-order-confirmation {
    background: linear-gradient(135deg, color-mix(in srgb, var(--tmm-chat-brand) 8%, white), white);
    border: 1px solid color-mix(in srgb, var(--tmm-chat-brand) 25%, white);
    border-radius: var(--tmm-chat-radius, 14px);
    padding: 24px 20px;
    text-align: center;
    margin: 8px 0;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--tmm-chat-brand) 10%, transparent);
}
.tmm-pc-oc-checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
    margin: 0 auto 12px;
    font-size: 32px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tmm-oc-pop 0.4s ease-out;
}
@keyframes tmm-oc-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.tmm-pc-oc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--tmm-chat-text);
    margin-bottom: 8px;
}
.tmm-pc-oc-order-no {
    font-size: 14px;
    color: var(--tmm-chat-text);
    margin-bottom: 4px;
}
.tmm-pc-oc-total {
    font-size: 14px;
    color: var(--tmm-chat-text);
    margin-bottom: 12px;
}
.tmm-pc-oc-msg {
    font-size: 13px;
    color: var(--tmm-chat-text-mute);
    margin-bottom: 12px;
    line-height: 1.5;
}
.tmm-pc-oc-bank {
    background: white;
    border-left: 3px solid var(--tmm-chat-brand);
    padding: 10px 12px;
    margin: 12px 0;
    border-radius: 6px;
    text-align: left;
}
.tmm-pc-oc-bank-head {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.tmm-pc-oc-bank-info {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 12px;
    background: var(--tmm-chat-bg-alt);
    padding: 8px 10px;
    border-radius: 4px;
    margin: 0;
    white-space: pre-wrap;
    color: var(--tmm-chat-text);
}
.tmm-pc-oc-actions { margin-top: 12px; }
.tmm-pc-oc-view {
    display: inline-block;
    background: transparent;
    color: var(--tmm-chat-brand);
    border: 1px solid var(--tmm-chat-brand);
    border-radius: 8px;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    min-height: 36px;
    line-height: 20px;
}
.tmm-pc-oc-view:hover {
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
}

/* ════════════════════════ PHASE 21 — PAGE INTENT ════════════════════════ */

.tmm-pc-page-intent {
    background: var(--tmm-chat-bg-alt);
    border-radius: var(--tmm-chat-radius, 14px);
    padding: 14px 16px;
    margin: 8px 0;
}
.tmm-pc-pi-msg {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--tmm-chat-text);
    line-height: 1.4;
}
.tmm-pc-pi-chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tmm-pc-pi-chip {
    background: white;
    border: 1px solid var(--tmm-chat-border);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    color: var(--tmm-chat-text);
    min-height: 40px;
    transition: all 0.15s;
}
.tmm-pc-pi-chip:hover {
    border-color: var(--tmm-chat-brand);
    background: color-mix(in srgb, var(--tmm-chat-brand) 6%, white);
}
.tmm-pc-pi-chip:disabled { opacity: 0.6; cursor: wait; }

/* ════════════════════════ PHASE 24 VISUAL GUIDANCE ════════════════════════ */

/* Pulse highlight on target element. Uses hardcoded brand color (not CSS var)
 * because pulse class is applied to elements OUTSIDE .tmm-public-chat container
 * where --tmm-chat-brand is not defined. */
.tmm-pc-guide-pulse {
    position: relative;
    animation: tmm-pc-guide-pulse-anim 1s ease-in-out 3;
    box-shadow: 0 0 0 4px rgba(58, 125, 68, 0.55),
                0 0 0 10px rgba(58, 125, 68, 0.20) !important;
    border-radius: 6px;
    z-index: 9998 !important;
}
@keyframes tmm-pc-guide-pulse-anim {
    0%   { box-shadow: 0 0 0 0 rgba(58, 125, 68, 0.7); }
    50%  { box-shadow: 0 0 0 14px rgba(58, 125, 68, 0); }
    100% { box-shadow: 0 0 0 4px rgba(58, 125, 68, 0.55), 0 0 0 10px rgba(58, 125, 68, 0.20); }
}

.tmm-pc-guide-focus {
    outline: 3px solid #3a7d44 !important;
    outline-offset: 2px !important;
}

/* Walkthrough overlay */
.tmm-pc-guide-overlay {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    pointer-events: none;
}
.tmm-pc-guide-tooltip {
    background: white;
    color: #1a1a1a;
    border: 1px solid var(--tmm-chat-brand, #3a7d44);
    border-radius: 14px;
    padding: 16px 18px;
    max-width: 420px;
    width: calc(100vw - 32px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    pointer-events: auto;
}
.tmm-pc-guide-intro {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tmm-chat-brand, #3a7d44);
}
.tmm-pc-guide-step {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}
.tmm-pc-guide-stepnum {
    display: inline-block;
    background: var(--tmm-chat-brand, #3a7d44);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
}
.tmm-pc-guide-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.tmm-pc-guide-actions button {
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    min-height: 36px;
    border: 1px solid transparent;
    background: transparent;
}
.tmm-pc-guide-prev, .tmm-pc-guide-skip {
    color: #666;
    border-color: #ddd;
}
.tmm-pc-guide-prev:hover, .tmm-pc-guide-skip:hover { background: #f5f5f5; }
.tmm-pc-guide-next {
    background: var(--tmm-chat-brand, #3a7d44);
    color: white;
    border: none;
}
.tmm-pc-guide-next:hover { filter: brightness(0.9); }

/* ════════════════════════ PHASE 23 CART POWER + ORDER MGMT ════════════════════════ */

/* coupon_result */
.tmm-pc-coupon-result {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 8px 0;
    align-items: center;
}
.tmm-pc-coupon-ok { background: color-mix(in srgb, var(--tmm-chat-brand) 12%, white); border-left: 3px solid var(--tmm-chat-brand); }
.tmm-pc-coupon-err { background: color-mix(in srgb, #e53935 8%, white); border-left: 3px solid #e53935; }
.tmm-pc-coupon-icon { font-size: 24px; }
.tmm-pc-coupon-msg { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.tmm-pc-coupon-disc, .tmm-pc-coupon-total { font-size: 13px; color: var(--tmm-chat-text-mute); }

/* order_status */
.tmm-pc-order-status {
    background: var(--tmm-chat-bg-alt);
    border-radius: var(--tmm-chat-radius, 14px);
    padding: 14px;
    margin: 8px 0;
}
.tmm-pc-os-head { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.tmm-pc-os-date { font-size: 12px; color: var(--tmm-chat-text-mute); margin-bottom: 8px; }
.tmm-pc-os-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: var(--tmm-chat-brand);
    color: var(--tmm-chat-brand-fg);
}
.tmm-pc-os-status-pending      { background: #f57c00; }
.tmm-pc-os-status-on-hold      { background: #ffa000; }
.tmm-pc-os-status-processing   { background: var(--tmm-chat-brand); }
.tmm-pc-os-status-completed    { background: #2e7d32; }
.tmm-pc-os-status-cancelled    { background: #757575; }
.tmm-pc-os-msg { font-size: 13px; margin-bottom: 10px; }
.tmm-pc-os-items {
    list-style: none; margin: 0 0 10px; padding: 0;
    border-top: 1px solid var(--tmm-chat-border); padding-top: 10px;
}
.tmm-pc-os-items li {
    display: grid; grid-template-columns: 1fr auto auto; gap: 8px;
    font-size: 12px; padding: 4px 0;
}
.tmm-pc-os-total { font-size: 14px; padding-top: 10px; border-top: 1px solid var(--tmm-chat-border); text-align: right; }
.tmm-pc-os-pay { font-size: 12px; color: var(--tmm-chat-text-mute); margin-top: 4px; }
.tmm-pc-os-actions { margin-top: 10px; }
.tmm-pc-os-cancel {
    background: transparent;
    border: 1px solid #e53935;
    color: #e53935;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    min-height: 36px;
}
.tmm-pc-os-cancel:hover { background: #e53935; color: white; }

/* Mobile */
@media (max-width: 480px) {
    .tmm-pc-cart-item { font-size: 12px; }
    .tmm-pc-rec-card { grid-template-columns: 56px 1fr; }
    .tmm-pc-rec-add { grid-column: 1 / -1; margin-top: 4px; }
    .tmm-pc-checkout-form { padding: 12px; }
    .tmm-pc-cf-cart-list { max-height: 80px; }
    .tmm-pc-order-confirmation { padding: 18px 14px; }
    .tmm-pc-oc-checkmark { width: 48px; height: 48px; font-size: 28px; }
    .tmm-pc-oc-title { font-size: 16px; }
    .tmm-pc-page-intent { padding: 12px; }
    .tmm-pc-os-items li { font-size: 11px; }
}

/* ════════════════════════════════════════════════════════
   Phase 39-48 Group B + C spec types
   ════════════════════════════════════════════════════════ */

/* Phase 39 — Order list */
.tmm-pc-order-list {
    background: var(--tmm-chat-bg, #fff);
    border: 1px solid var(--tmm-chat-border, #e6e6e6);
    border-radius: 12px;
    padding: 12px;
    margin: 8px 0;
}
.tmm-pc-ol-items { list-style: none; padding: 0; margin: 8px 0 0; }
.tmm-pc-ol-row {
    border-bottom: 1px solid var(--tmm-chat-border, #eee);
    padding: 10px 0;
}
.tmm-pc-ol-row:last-child { border-bottom: 0; }
.tmm-pc-ol-row-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
}
.tmm-pc-ol-num { font-weight: 600; font-size: 14px; }
.tmm-pc-ol-row-meta {
    display: flex; gap: 12px; font-size: 12px;
    color: var(--tmm-chat-text-mute, #666);
    margin-bottom: 8px;
}
.tmm-pc-ol-row-actions { display: flex; gap: 8px; }
.tmm-pc-ol-track, .tmm-pc-ol-reorder {
    flex: 1; padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--tmm-chat-brand, #2e7d32);
    color: var(--tmm-chat-brand, #2e7d32);
    border-radius: 8px; font-size: 12px; cursor: pointer;
}
.tmm-pc-ol-track:hover, .tmm-pc-ol-reorder:hover {
    background: var(--tmm-chat-brand, #2e7d32); color: #fff;
}

/* Phase 41 — Profile form (extends contact-form) */
.tmm-pc-profile-form input[type=date] {
    padding: 8px 10px; font-size: 13px;
    border: 1px solid var(--tmm-chat-border, #ccc);
    border-radius: 8px; width: 100%;
}

/* Phase 42 — Compare picker + table */
.tmm-pc-compare-picker {
    background: var(--tmm-chat-bg, #fff);
    border: 1px solid var(--tmm-chat-border, #e6e6e6);
    border-radius: 12px; padding: 12px; margin: 8px 0;
}
.tmm-pc-cp-items { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.tmm-pc-cp-item {
    display: grid; grid-template-columns: 24px 40px 1fr auto; gap: 8px;
    align-items: center; padding: 8px; border-radius: 8px;
    border: 1px solid var(--tmm-chat-border, #eee); cursor: pointer;
}
.tmm-pc-cp-item:hover { border-color: var(--tmm-chat-brand, #2e7d32); }
.tmm-pc-cp-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.tmm-pc-cp-name { font-size: 13px; font-weight: 500; }
.tmm-pc-cp-price { font-size: 12px; color: var(--tmm-chat-brand, #2e7d32); font-weight: 600; }
.tmm-pc-cp-go { width: 100%; margin-top: 8px; }

.tmm-pc-compare-table {
    background: var(--tmm-chat-bg, #fff);
    border: 1px solid var(--tmm-chat-border, #e6e6e6);
    border-radius: 12px; padding: 12px; margin: 8px 0;
    overflow-x: auto;
}
.tmm-pc-ct {
    width: 100%; border-collapse: collapse; font-size: 12px;
}
.tmm-pc-ct th, .tmm-pc-ct td {
    border: 1px solid var(--tmm-chat-border, #eee);
    padding: 6px 8px; vertical-align: top; text-align: left;
}
.tmm-pc-ct thead th {
    background: color-mix(in srgb, var(--tmm-chat-brand, #2e7d32) 8%, white);
    font-weight: 600;
}
.tmm-pc-ct tbody th { background: #fafafa; font-weight: 500; width: 80px; }
.tmm-pc-ct img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.tmm-pc-ct a { color: var(--tmm-chat-brand, #2e7d32); text-decoration: none; }

/* Phase 43 — Loyalty card */
.tmm-pc-loyalty-card {
    background: linear-gradient(135deg, #fef9e7 0%, #fff 100%);
    border: 1px solid var(--tmm-chat-border, #e6c700);
    border-radius: 12px; padding: 16px; margin: 8px 0;
    text-align: center;
}
.tmm-pc-loy-rank {
    display: inline-block; padding: 4px 12px;
    background: rgba(255,255,255,.7); border-radius: 999px;
    font-size: 13px; font-weight: 500; margin: 8px 0;
}
.tmm-pc-loy-points { font-size: 28px; font-weight: 700; color: #b8860b; margin: 8px 0; }
.tmm-pc-loy-points strong { font-size: 36px; }
.tmm-pc-loy-value { font-size: 13px; color: var(--tmm-chat-text-mute, #666); }

/* Phase 44 — Quiz */
.tmm-pc-quiz {
    background: var(--tmm-chat-bg, #fff);
    border: 1px solid var(--tmm-chat-border, #e6e6e6);
    border-radius: 12px; padding: 14px; margin: 8px 0;
}
.tmm-pc-quiz-progress {
    font-size: 12px; color: var(--tmm-chat-brand, #2e7d32);
    font-weight: 600; margin-bottom: 8px;
}
.tmm-pc-quiz .tmm-pc-pi-chip {
    display: block; width: 100%; text-align: left;
    padding: 12px 14px; margin-bottom: 6px;
}

/* Phase 46 — Review form star rating */
.tmm-pc-rv-stars {
    display: flex; gap: 4px; margin: 8px 0;
    justify-content: center;
}
.tmm-pc-rv-star {
    background: transparent; border: none;
    font-size: 28px; color: #e0c200; cursor: pointer;
    padding: 4px; transition: transform .1s;
    line-height: 1;
}
.tmm-pc-rv-star:hover { transform: scale(1.2); }
.tmm-pc-review-form textarea {
    width: 100%; padding: 8px 10px; font-size: 13px;
    border: 1px solid var(--tmm-chat-border, #ccc);
    border-radius: 8px; resize: vertical; min-height: 70px;
    font-family: inherit;
}

/* Phase 38 + 41 + 45 — generic textarea/select styling shared */
.tmm-pc-contact-form textarea,
.tmm-pc-contact-form select {
    width: 100%; padding: 8px 10px; font-size: 13px;
    border: 1px solid var(--tmm-chat-border, #ccc);
    border-radius: 8px; font-family: inherit;
    background: #fff;
}
.tmm-pc-contact-form select { cursor: pointer; }

/* Phase 45 export form (extends contact-form, no extra styling needed) */

/* Phase 40 — Search history chips reuse .tmm-pc-pi-chip */

/* Mobile adjustments for new specs */
@media (max-width: 480px) {
    .tmm-pc-loy-points { font-size: 22px; }
    .tmm-pc-loy-points strong { font-size: 28px; }
    .tmm-pc-ct { font-size: 11px; }
    .tmm-pc-ct img { width: 40px; height: 40px; }
    .tmm-pc-ct tbody th { width: 60px; }
    .tmm-pc-rv-star { font-size: 24px; }
    .tmm-pc-cp-item { grid-template-columns: 20px 32px 1fr auto; gap: 6px; }
    .tmm-pc-cp-item img { width: 32px; height: 32px; }
    .tmm-pc-ol-row-meta { flex-wrap: wrap; gap: 8px; font-size: 11px; }
}
