/* Tutor LMS Live Chat — frontend styles (v1.1) */
.tlc-chatroom {
    --tlc-primary: #2563eb;
    --tlc-primary-hover: #1d4ed8;
    --tlc-bg: #ffffff;
    --tlc-bg-alt: #f7f8fb;
    --tlc-bg-soft: #fafbff;
    --tlc-border: #e3e6ec;
    --tlc-text: #1f2937;
    --tlc-text-soft: #6b7280;
    --tlc-success: #10b981;
    --tlc-warning: #f59e0b;
    --tlc-error: #ef4444;
    --tlc-host: #7c3aed;
    --tlc-radius: 12px;
    --tlc-messages-height: 460px;

    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    margin: 16px 0;
    background: var(--tlc-bg);
    border: 1px solid var(--tlc-border);
    border-radius: var(--tlc-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    color: var(--tlc-text);
    font-size: 14px;
    line-height: 1.5;
}
.tlc-chatroom *, .tlc-chatroom *::before, .tlc-chatroom *::after { box-sizing: border-box; }

.tlc-chatroom .tlc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Header */
.tlc-chatroom .tlc-chat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--tlc-border);
    background: linear-gradient(180deg, #fcfdff 0%, #fff 100%);
}
.tlc-chatroom .tlc-chat-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.tlc-chatroom .tlc-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--tlc-text-soft); position: relative;
}
.tlc-chatroom .tlc-dot[data-state="on"]    { background: var(--tlc-success); box-shadow: 0 0 0 4px rgba(16,185,129,.18); }
.tlc-chatroom .tlc-dot[data-state="error"] { background: var(--tlc-error); }
.tlc-chatroom .tlc-host-badge {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    background: var(--tlc-host); color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: .06em;
}
.tlc-chatroom .tlc-chat-status { font-size: 12px; color: var(--tlc-text-soft); }

/* Polls pane */
.tlc-chatroom .tlc-polls-pane {
    background: linear-gradient(180deg, #f5f3ff 0%, #faf5ff 100%);
    border-bottom: 1px solid var(--tlc-border);
    padding: 10px 12px;
    max-height: 50%;
    overflow-y: auto;
}
.tlc-chatroom .tlc-poll {
    background: #fff; border: 1px solid #ede9fe; border-radius: 10px;
    padding: 10px 12px; margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(124,58,237,.06);
}
.tlc-chatroom .tlc-poll:last-child { margin-bottom: 0; }
.tlc-chatroom .tlc-poll-closed { background: #f9fafb; opacity: .92; }
.tlc-chatroom .tlc-poll-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 8px;
}
.tlc-chatroom .tlc-poll-tag {
    background: var(--tlc-host); color: #fff;
    font-size: 10px; font-weight: 700; padding: 2px 7px;
    border-radius: 999px; letter-spacing: .06em;
}
.tlc-chatroom .tlc-poll-q { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; }
.tlc-chatroom .tlc-poll-timer {
    font-size: 11px; color: var(--tlc-text-soft);
    background: #f3f4f6; padding: 2px 8px; border-radius: 999px;
    font-variant-numeric: tabular-nums;
}
.tlc-chatroom .tlc-poll-timer-expired { background: #fee2e2; color: #991b1b; }
.tlc-chatroom .tlc-poll-timeless { font-size: 11px; color: var(--tlc-text-soft); }
.tlc-chatroom .tlc-poll-closed-tag {
    font-size: 10px; font-weight: 700; padding: 2px 7px;
    background: #fee2e2; color: #991b1b; border-radius: 999px;
}
.tlc-chatroom .tlc-poll-close {
    background: transparent; border: 0; color: var(--tlc-text-soft);
    font-size: 14px; line-height: 1; cursor: pointer; padding: 2px 6px;
    border-radius: 4px;
}
.tlc-chatroom .tlc-poll-close:hover { background: #fee2e2; color: #991b1b; }
.tlc-chatroom .tlc-poll-options { display: flex; flex-direction: column; gap: 6px; }
.tlc-chatroom .tlc-poll-option { position: relative; }
.tlc-chatroom .tlc-poll-vote {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 8px 12px;
    border: 1px solid #e5e7eb; border-radius: 8px;
    background: #fff; cursor: pointer;
    font-size: 13px; color: var(--tlc-text); overflow: hidden;
    transition: border-color .15s, background .15s;
}
.tlc-chatroom .tlc-poll-vote:hover { border-color: var(--tlc-primary); }
.tlc-chatroom .tlc-poll-vote-disabled { cursor: default; }
.tlc-chatroom .tlc-poll-option.tlc-mine .tlc-poll-vote { border-color: var(--tlc-primary); background: #eff6ff; }
.tlc-chatroom .tlc-poll-bar-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(37,99,235,.14), rgba(124,58,237,.14));
    z-index: 0; transition: width .35s ease;
}
.tlc-chatroom .tlc-poll-option.tlc-mine .tlc-poll-bar-fill {
    background: linear-gradient(90deg, rgba(37,99,235,.28), rgba(124,58,237,.22));
}
.tlc-chatroom .tlc-poll-text, .tlc-chatroom .tlc-poll-pct { position: relative; z-index: 1; }
.tlc-chatroom .tlc-poll-pct { font-weight: 600; color: var(--tlc-text-soft); margin-left: 8px; }
.tlc-chatroom .tlc-poll-foot {
    display: flex; justify-content: space-between;
    margin-top: 6px; font-size: 11px; color: var(--tlc-text-soft);
}
.tlc-chatroom .tlc-poll-final { font-weight: 600; }

/* Messages */
.tlc-chatroom .tlc-messages {
    flex: 1; min-height: 240px; max-height: var(--tlc-messages-height);
    overflow-y: auto; padding: 12px 16px;
    background: var(--tlc-bg-alt);
    scroll-behavior: smooth;
}
.tlc-chatroom .tlc-empty-state { text-align: center; color: var(--tlc-text-soft); padding: 36px 8px; font-size: 13px; }

.tlc-chatroom .tlc-message {
    background: #fff; border: 1px solid var(--tlc-border); border-radius: 10px;
    padding: 8px 10px; margin-bottom: 8px; position: relative;
    transition: background .12s;
}
.tlc-chatroom .tlc-message:hover .tlc-msg-actions { opacity: 1; }
.tlc-chatroom .tlc-message-mine { background: #eff6ff; border-color: #bfdbfe; }
.tlc-chatroom .tlc-message-deleted { opacity: .55; font-style: italic; }
.tlc-chatroom .tlc-msg-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tlc-chatroom .tlc-msg-author { font-weight: 600; font-size: 12.5px; color: var(--tlc-primary); }
.tlc-chatroom .tlc-msg-author .tlc-role-pill {
    margin-left: 5px; padding: 1px 6px; font-size: 9px; font-weight: 700;
    border-radius: 999px; letter-spacing: .06em; text-transform: uppercase;
    background: #fef3c7; color: #92400e;
}
.tlc-chatroom .tlc-role-host         { background: var(--tlc-host); color: #fff; }
.tlc-chatroom .tlc-role-instructor   { background: #dbeafe; color: #1e40af; }
.tlc-chatroom .tlc-role-administrator{ background: #ede9fe; color: #5b21b6; }
.tlc-chatroom .tlc-msg-time { font-size: 10.5px; color: var(--tlc-text-soft); white-space: nowrap; }
.tlc-chatroom .tlc-msg-body {
    margin-top: 2px; font-size: 14px; line-height: 1.45;
    word-wrap: break-word; word-break: break-word; white-space: pre-wrap;
}
/* Optimized emoji-only sizing — large only when message is purely emoji */
.tlc-chatroom .tlc-msg-body .tlc-emoji-only { font-size: 1.85em; line-height: 1.15; letter-spacing: .03em; }
.tlc-chatroom .tlc-msg-body img { vertical-align: middle; }
.tlc-chatroom .tlc-msg-reactions { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.tlc-chatroom .tlc-reaction-pill {
    display: inline-flex; align-items: center; gap: 3px;
    background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 999px;
    padding: 1px 7px; font-size: 11.5px; cursor: pointer;
    transition: background .12s, border-color .12s;
    line-height: 1.4;
}
.tlc-chatroom .tlc-reaction-pill:hover { background: #e5e7eb; }
.tlc-chatroom .tlc-reaction-pill.tlc-reacted { background: #dbeafe; border-color: var(--tlc-primary); color: var(--tlc-primary); }
.tlc-chatroom .tlc-reaction-emoji { font-size: 13px; line-height: 1; }
.tlc-chatroom .tlc-reaction-count { font-weight: 600; }

.tlc-chatroom .tlc-msg-actions {
    position: absolute; top: 4px; right: 4px;
    opacity: 0; transition: opacity .15s;
    display: flex; gap: 2px;
}
.tlc-chatroom .tlc-react-btn,
.tlc-chatroom .tlc-host-del-msg {
    background: #fff; border: 1px solid var(--tlc-border); border-radius: 14px;
    padding: 1px 7px; font-size: 11px; cursor: pointer; line-height: 1.4;
}
.tlc-chatroom .tlc-react-btn:hover { background: #f3f4f6; }
.tlc-chatroom .tlc-host-del-msg:hover { background: #fee2e2; border-color: #fca5a5; }

.tlc-chatroom .tlc-reaction-picker {
    position: absolute; top: 28px; right: 4px;
    background: #fff; border: 1px solid var(--tlc-border); border-radius: 10px;
    padding: 5px; display: flex; gap: 2px; z-index: 50;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
}
.tlc-chatroom .tlc-reaction-pick {
    background: transparent; border: 0; cursor: pointer;
    font-size: 18px; padding: 4px 6px; border-radius: 6px; line-height: 1;
}
.tlc-chatroom .tlc-reaction-pick:hover { background: #f3f4f6; }

/* Composer */
.tlc-chatroom .tlc-composer { padding: 10px 12px; border-top: 1px solid var(--tlc-border); background: #fff; position: relative; }
.tlc-chatroom .tlc-form { display: flex; align-items: flex-end; gap: 6px; }
.tlc-chatroom .tlc-emoji-btn {
    background: #f3f4f6; border: 1px solid var(--tlc-border); border-radius: 8px;
    width: 42px; height: 42px; cursor: pointer; font-size: 22px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
    padding: 0;
}
.tlc-chatroom .tlc-emoji-btn:hover { background: #e5e7eb; }
.tlc-chatroom .tlc-input-wrap { flex: 1; min-width: 0; }
.tlc-chatroom .tlc-input {
    width: 100%; resize: none; min-height: 38px; max-height: 120px;
    padding: 9px 12px; border: 1px solid var(--tlc-border); border-radius: 8px;
    font-size: 14px; line-height: 1.4; background: #fff; color: var(--tlc-text);
    font-family: inherit; transition: border-color .12s, box-shadow .12s;
}
.tlc-chatroom .tlc-input:focus { outline: none; border-color: var(--tlc-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.tlc-chatroom .tlc-send-btn {
    background: var(--tlc-primary); color: #fff; border: 0; border-radius: 8px;
    padding: 9px 16px; font-weight: 600; cursor: pointer; font-size: 14px;
    height: 38px; transition: background .12s;
}
.tlc-chatroom .tlc-send-btn:hover { background: var(--tlc-primary-hover); }
.tlc-chatroom .tlc-send-btn:disabled { opacity: .55; cursor: not-allowed; }

.tlc-chatroom .tlc-meta-row { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; color: var(--tlc-text-soft); }

.tlc-chatroom .tlc-notice { padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.tlc-chatroom .tlc-notice-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.tlc-chatroom .tlc-notice-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.tlc-chatroom .tlc-notice-info    { background: #dbeafe; color: #1e3a8a; border: 1px solid #bfdbfe; }

/* Emoji panel — optimized cell sizing */
.tlc-chatroom .tlc-emoji-panel {
    position: absolute; bottom: calc(100% + 6px); left: 12px;
    background: #fff; border: 1px solid var(--tlc-border); border-radius: 10px;
    padding: 6px; z-index: 60; max-width: 320px;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
}
.tlc-chatroom .tlc-emoji-grid {
    display: grid; grid-template-columns: repeat(10, 1fr);
    gap: 1px; max-height: 200px; overflow-y: auto;
}
.tlc-chatroom .tlc-emoji-cell {
    background: transparent; border: 0; cursor: pointer;
    font-size: 18px; line-height: 1; padding: 5px;
    border-radius: 5px; text-align: center;
}
.tlc-chatroom .tlc-emoji-cell:hover { background: #f3f4f6; }

/* Host toolbar (aside) */
.tlc-chatroom .tlc-host-toolbar {
    width: 220px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #f5f3ff 0%, #faf5ff 100%);
    border-left: 1px solid var(--tlc-border);
    padding: 14px 12px;
    display: flex; flex-direction: column; gap: 10px;
}
.tlc-chatroom .tlc-host-toolbar-head {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: var(--tlc-host);
    text-transform: uppercase; letter-spacing: .06em;
    padding-bottom: 8px; border-bottom: 1px solid #ede9fe;
}
.tlc-chatroom .tlc-host-icon { font-size: 14px; }
.tlc-chatroom .tlc-host-toolbar-body { display: flex; flex-direction: column; gap: 6px; }
.tlc-chatroom .tlc-host-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; background: #fff; border: 1px solid #ddd6fe; color: var(--tlc-host);
    border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
    text-align: left; transition: background .12s, border-color .12s, transform .08s;
}
.tlc-chatroom .tlc-host-btn:hover { background: var(--tlc-host); color: #fff; border-color: var(--tlc-host); }
.tlc-chatroom .tlc-host-btn:active { transform: scale(.98); }
.tlc-chatroom .tlc-host-btn-ico { font-size: 14px; line-height: 1; }
.tlc-chatroom .tlc-host-pause-chat:hover  { background: var(--tlc-warning); border-color: var(--tlc-warning); }
.tlc-chatroom .tlc-host-resume-chat:hover { background: var(--tlc-success); border-color: var(--tlc-success); }
.tlc-chatroom .tlc-host-hint {
    margin: auto 0 0; font-size: 10.5px; color: var(--tlc-text-soft);
    line-height: 1.4;
}

/* Modals */
.tlc-modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,.55);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: tlc-fade-in .15s ease;
}
@keyframes tlc-fade-in { from { opacity: 0; } to { opacity: 1; } }
.tlc-modal {
    background: #fff; border-radius: 12px; width: 100%; max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,.28);
    color: #1f2937; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: tlc-pop-in .18s ease;
}
@keyframes tlc-pop-in { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.tlc-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid #e5e7eb;
}
.tlc-modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.tlc-modal-close {
    background: transparent; border: 0; cursor: pointer;
    font-size: 22px; line-height: 1; color: #6b7280; padding: 4px 8px; border-radius: 4px;
}
.tlc-modal-close:hover { background: #f3f4f6; color: #111827; }
.tlc-modal-body { padding: 16px 18px 18px; }
.tlc-modal-form .tlc-field { display: block; margin-bottom: 12px; }
.tlc-modal-form .tlc-field-label {
    display: block; font-size: 12px; font-weight: 600;
    color: #374151; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em;
}
.tlc-modal-form input[type="text"],
.tlc-modal-form select {
    width: 100%; padding: 9px 11px; border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 14px; font-family: inherit; background: #fff; color: #1f2937;
}
.tlc-modal-form input[type="text"]:focus,
.tlc-modal-form select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.tlc-modal-form .tlc-poll-options-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.tlc-modal-form .tlc-poll-option-input { width: 100%; }
.tlc-btn {
    display: inline-block; padding: 9px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
    transition: background .12s;
}
.tlc-btn-primary { background: #2563eb; color: #fff; }
.tlc-btn-primary:hover { background: #1d4ed8; }
.tlc-btn-ghost { background: #fff; color: #374151; border-color: #e5e7eb; }
.tlc-btn-ghost:hover { background: #f3f4f6; }
.tlc-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

.tlc-chatroom-error {
    padding: 14px; background: #fee2e2; color: #991b1b;
    border: 1px solid #fca5a5; border-radius: 8px; font-size: 14px;
}

/* Mobile */
@media (max-width: 720px) {
    .tlc-chatroom { flex-direction: column; }
    .tlc-chatroom .tlc-host-toolbar {
        width: auto; border-left: 0; border-top: 1px solid var(--tlc-border);
        padding: 10px 12px;
    }
    .tlc-chatroom .tlc-host-toolbar-body { flex-direction: row; flex-wrap: wrap; }
    .tlc-chatroom .tlc-host-btn { flex: 1 1 auto; justify-content: center; }
    .tlc-chatroom .tlc-host-hint { display: none; }
    .tlc-chatroom .tlc-emoji-grid { grid-template-columns: repeat(8, 1fr); }
    .tlc-modal { max-width: 100%; }
}

/* ===== Pinned messages (v1.2) ===== */
.tlc-chatroom .tlc-pinned-pane {
    margin: 8px 12px 0; padding: 10px 12px; border-radius: 8px;
    background: #fefce8; border: 1px solid #fde68a;
}
.tlc-chatroom .tlc-pinned-head {
    display: flex; align-items: center; gap: 6px;
    font-weight: 600; color: #92400e; font-size: 13px; margin-bottom: 6px;
}
.tlc-chatroom .tlc-pinned-icon { font-size: 16px; line-height: 1; }
.tlc-chatroom .tlc-pinned-list { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.tlc-chatroom .tlc-pinned-list .tlc-message { background: #fffbeb; border: 1px solid #fef3c7; border-radius: 6px; padding: 6px 8px; }

.tlc-chatroom .tlc-message.tlc-message-pinned {
    background: #fffbeb; border-left: 3px solid #f59e0b;
}
.tlc-chatroom .tlc-msg-pin-icon { margin-left: 4px; font-size: 12px; opacity: .85; }
.tlc-chatroom .tlc-msg-host-badge { font-size: 11px; opacity: .8; margin-left: 2px; }

/* Host messages: distinct accent + safe-link styling */
.tlc-chatroom .tlc-message.tlc-message-host .tlc-msg-author { color: #1d4ed8; }
.tlc-chatroom .tlc-msg-body a { color: var(--tlc-primary); text-decoration: underline; word-break: break-word; }
.tlc-chatroom .tlc-msg-body a:hover { text-decoration: underline; opacity: .85; }

/* Pin/unpin buttons in actions */
.tlc-chatroom .tlc-host-pin-msg,
.tlc-chatroom .tlc-host-unpin-msg {
    background: transparent; border: 1px solid var(--tlc-border); border-radius: 6px;
    padding: 2px 6px; cursor: pointer; font-size: 12px; line-height: 1;
}
.tlc-chatroom .tlc-host-unpin-msg { background: #fffbeb; border-color: #fde68a; }
.tlc-chatroom .tlc-host-pin-msg:hover,
.tlc-chatroom .tlc-host-unpin-msg:hover { background: #f3f4f6; }

/* Blocked notice with reason */
.tlc-chatroom .tlc-blocked-notice .tlc-blocked-reason {
    display: block; margin-top: 4px; font-size: 13px; opacity: .9;
}

/* ===== Poll: leaderboard (v1.2) ===== */
.tlc-chatroom .tlc-poll-leaderboard {
    margin-top: 8px; padding: 8px 10px; border-radius: 6px;
    background: #fff7ed; border: 1px solid #fed7aa;
}
.tlc-chatroom .tlc-poll-lb-head { font-size: 12px; font-weight: 600; color: #9a3412; margin-bottom: 4px; }
.tlc-chatroom .tlc-poll-lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tlc-chatroom .tlc-poll-lb-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tlc-chatroom .tlc-poll-lb-rank { width: 22px; text-align: center; font-weight: 600; }
.tlc-chatroom .tlc-poll-lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlc-chatroom .tlc-poll-lb-time { color: #6b7280; font-variant-numeric: tabular-nums; }

.tlc-chatroom .tlc-poll-tag-abcd { background: #ede9fe; color: #5b21b6; }
.tlc-chatroom .tlc-poll-options-abcd .tlc-poll-text { font-weight: 700; letter-spacing: 1px; }

/* ===== Create poll: type tabs ===== */
.tlc-poll-type-tabs { display: flex; gap: 4px; margin-bottom: 10px; padding: 3px; background: #f3f4f6; border-radius: 8px; }
.tlc-poll-type-tab {
    flex: 1; padding: 6px 10px; background: transparent; border: 0;
    border-radius: 6px; cursor: pointer; font-size: 13px; color: #4b5563;
}
.tlc-poll-type-tab.tlc-active { background: #fff; color: #111827; box-shadow: 0 1px 2px rgba(0,0,0,.06); font-weight: 600; }
.tlc-poll-abcd-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px;
}
.tlc-poll-abcd-grid > span {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; padding: 12px 0; border: 1px solid #e5e7eb; border-radius: 6px;
    background: #f9fafb; color: #374151;
}

/* ===== Block users panel ===== */
.tlc-block-pane { display: flex; flex-direction: column; gap: 14px; }
.tlc-block-pane h4 { margin: 0 0 6px; font-size: 14px; }
.tlc-block-search-input { width: 100%; padding: 7px 10px; border: 1px solid var(--tlc-border); border-radius: 6px; font-size: 13px; }
.tlc-block-search-results {
    list-style: none; margin: 6px 0 0; padding: 0;
    border: 1px solid var(--tlc-border); border-radius: 6px;
    background: #fff; max-height: 160px; overflow-y: auto;
}
.tlc-block-search-row { padding: 6px 10px; cursor: pointer; font-size: 13px; }
.tlc-block-search-row:hover, .tlc-block-search-row:focus { background: #f3f4f6; outline: none; }
.tlc-block-empty { padding: 6px 10px; font-size: 13px; color: #6b7280; }
.tlc-block-selected {
    margin-top: 6px; padding: 6px 10px; background: #eff6ff;
    border: 1px solid #bfdbfe; border-radius: 6px; font-size: 13px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tlc-block-selected-clear {
    background: transparent; border: 0; cursor: pointer; font-size: 16px; line-height: 1; color: #1d4ed8;
}
.tlc-block-list {
    list-style: none; margin: 0; padding: 0;
    border: 1px solid var(--tlc-border); border-radius: 6px;
    background: #fff; max-height: 220px; overflow-y: auto;
}
.tlc-block-list-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #f3f4f6; }
.tlc-block-list-row:last-child { border-bottom: 0; }
.tlc-block-list-info { font-size: 13px; min-width: 0; flex: 1; }
.tlc-block-list-reason { display: block; color: #6b7280; font-size: 12px; }
