.tumarow-agent-chat-widget {
    max-width: 480px;
    margin: 0 auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    background: #fff;
}
.tmrchat-log {
    flex: 1;
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f9fafb;
}
.tmrchat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 85%;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.tmrchat-bubble-user { align-self: flex-end; background: #2563eb; color: #fff; }
.tmrchat-bubble-assistant { align-self: flex-start; background: #fff; border: 1px solid #e5e7eb; color: #1f2937; }
.tmrchat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e5e7eb; }
.tmrchat-input {
    flex: 1; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px;
}
.tmrchat-send {
    border: none; background: #2563eb; color: #fff; border-radius: 8px; padding: 10px 18px;
    font-weight: 600; cursor: pointer;
}
.tmrchat-send:hover { background: #1d4ed8; }

.tmrchat-mic {
    border: 1px solid #d1d5db; background: #fff; border-radius: 8px; padding: 10px 12px;
    font-size: 16px; cursor: pointer; line-height: 1;
}
.tmrchat-mic:hover { background: #f3f4f6; }
.tmrchat-mic-active { background: #fef2f2; border-color: #fca5a5; animation: tmrchat-mic-pulse 1s infinite; }
@keyframes tmrchat-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.tmrchat-payment-card { border: 1px solid #bae6fd; background: #f0f9ff; }
.tmrchat-payment-title { font-weight: 700; margin-bottom: 8px; }
.tmrchat-qr { max-width: 180px; margin: 8px 0; }
.tmrchat-qr svg { width: 100%; height: auto; }
.tmrchat-address { font-family: monospace; font-size: 12px; word-break: break-all; margin: 6px 0; padding: 6px 8px; background: #fff; border-radius: 6px; }
.tmrchat-pay-status { margin-top: 8px; font-size: 13px; color: #6b7280; }
.tmrchat-bubble a { color: inherit; text-decoration: underline; }

.tmrchat-select {
    display: inline-block; border: 1px solid #2563eb; background: #eff6ff; color: #1d4ed8;
    border-radius: 999px; padding: 1px 8px; margin: 0; font-size: 11px; line-height: 1.5;
    font-weight: 600; cursor: pointer; white-space: nowrap; appearance: none; -webkit-appearance: none;
    box-sizing: border-box; min-height: 0; height: auto;
}
.tmrchat-select:hover { background: #2563eb; color: #fff; }

.tmrchat-guest-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; min-width: 220px; }
.tmrchat-guest-form input, .tmrchat-guest-form textarea {
    padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; width: 100%;
}
.tmrchat-guest-form textarea { resize: vertical; min-height: 44px; }
.tmrchat-guest-form button {
    border: none; background: #2563eb; color: #fff; border-radius: 8px; padding: 9px 14px;
    font-weight: 600; cursor: pointer; font-size: 14px;
}
.tmrchat-guest-form button:hover { background: #1d4ed8; }
.tmrchat-guest-form button:disabled { background: #93c5fd; cursor: not-allowed; }
.tmrchat-guest-form label { font-size: 12px; color: #6b7280; margin-bottom: -4px; }

.tmrchat-table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 6px 0; }
.tmrchat-table th, .tmrchat-table td { border: 1px solid #e5e7eb; padding: 6px 8px; text-align: left; }
.tmrchat-table th { background: #f3f4f6; font-weight: 700; }

.tmrchat-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.tmrchat-typing span {
    width: 7px; height: 7px; border-radius: 50%; background: #9ca3af;
    animation: tmrchat-bounce 1.2s infinite ease-in-out;
}
.tmrchat-typing span:nth-child(2) { animation-delay: 0.15s; }
.tmrchat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes tmrchat-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
    .tumarow-agent-chat-widget { max-width: 100%; border-radius: 10px; }
}

/* ── 플로팅 모드 ──────────────────────────────────────────────────────────────── */
#tumarow-agent-chat-floating-root {
    position: fixed; right: 20px; bottom: 20px; z-index: 999999;
    display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.tmrchat-launcher {
    width: 56px; height: 56px; border-radius: 50%; border: none; background: #2563eb;
    color: #fff; font-size: 24px; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    display: flex; align-items: center; justify-content: center; order: 2;
}
.tmrchat-launcher:hover { background: #1d4ed8; }
.tmrchat-launcher-open { background: #1f2937; }
.tmrchat-panel {
    width: 340px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 120px);
    background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    flex-direction: column; overflow: hidden; order: 1;
}
.tmrchat-panel-header {
    display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
    background: #2563eb; color: #fff; font-weight: 700; flex-shrink: 0;
}
.tmrchat-panel-close { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; padding: 4px; }
.tmrchat-panel-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.tmrchat-panel-body .tmrchat-log { flex: 1; min-height: 0; max-height: none; }

@media (max-width: 480px) {
    #tumarow-agent-chat-floating-root { right: 12px; bottom: 12px; }
    .tmrchat-panel { width: calc(100vw - 24px); height: calc(100vh - 140px); }
}
