/**
 * =============================================================================
 * 文件: common.css
 * 描述: 全站通用样式表。
 * 包含主题变量、基础布局、通用组件（导航、页脚、用户栏、Cookie横幅等）。
 * 此文件应在所有页面中引入。
 * =============================================================================
 */

/**
 * -------------------------------------
 * 通用主题变量 (Custom Properties)
 * -------------------------------------
 * 定义了网站的全局设计语言，包括颜色、字体、阴影等。
 * 通过修改这些变量，可以轻松实现网站主题的全局切换。
 */
:root {
  /* --- 亮色主题 --- */
  --bg: linear-gradient(to bottom, #ffffff, #ffffff);
  --text-main: #222;
  --container-bg: #fff;
  --sidebar-bg: linear-gradient(to bottom, #6a11cb, #2575fc);
  --input-bg: #fff;
  --input-border: #ccc;
  --btn-bg: #007bff;
  --btn-hover: #0056b3;
  --btn-text: #fff;
  --shadow: 0 2px 15px rgba(0,0,0,0.11);
  --footer-bg: linear-gradient(to right, #b357f0, #958ce2);
  --footer-text: #d8fa5e;
  --nav-hover: #00ffff;
  --overlay-bg: rgba(0, 0, 0, 0.4);
  --link-hover: #3333cc;
}

/**
 * 暗黑模式变量
 * 当 html 元素有 data-theme="dark" 属性时，这些变量会覆盖默认值。
 */
html[data-theme='dark'] {
  --bg: #151925;
  --text-main: #e5e6ea;
  --container-bg: #23263a;
  --sidebar-bg: linear-gradient(to bottom, #1d2b4a, #1a233a);
  --input-bg: #23263a;
  --input-border: #393e4e;
  --btn-bg: #375dd9;
  --btn-hover: #4a6ee5;
  --footer-text: #d8fa5e;
  --link-hover: #5da9ff;
}

/**
 * -------------------------------------
 * 基础与全局样式 (Base & Global Styles)
 * -------------------------------------
 * 设定了基础的盒模型、字体、背景和链接行为。
 * body元素被设置为flex容器，以实现页脚吸底效果。
 */
html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-main);
  font-family: "Helvetica Neue", sans-serif;
  display: flex;
  flex-direction: column; 
  transition: background 0.3s, color 0.2s;
}

a:hover {
  color: var(--link-hover);
}

/**
 * -------------------------------------
 * 主要布局容器 (Layout Containers)
 * -------------------------------------
 */

/* 页面主内容容器 */
main.main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px 0 20px;
  box-sizing: border-box;
  flex-grow: 1; 
}

/* 通用内容区块或卡片容器 */
.section { 
  max-width: 1200px; 
  margin: 40px auto;
  padding: 20px;
  background: var(--container-bg);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section h2 { 
  margin-bottom: 20px; 
  font-size: 1.5em;
}


/**
 * -------------------------------------
 * 通用组件样式 (Common Components)
 * -------------------------------------
 */

/* 用户头像栏 */
#userAvatarBar {
  display: none; /* JS会根据登录状态改为 display: flex */
  align-items: center;
  position: fixed;
  top: 18px;
  right: 26px;
  z-index: 1300;
}
#userAvatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(60,80,150,0.15);
  cursor: pointer;
  object-fit: cover;
  background: #fff;
}
#userWelcome {
  font-size: 15px;
  color: #3842a6;
  font-weight: 500;
}
#logoutBtn {
  margin-left: 12px;
  font-size: 14px;
  color: #ad1919;
  background: #f4f5ff;
  border: 1px solid #d2d2e0;
  border-radius: 18px;
  padding: 5px 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#logoutBtn:hover {
  background: #faecec;
  color: #a50000;
  border-color: #e0b0b0;
}

/* * 为所有带有 .input 类的元素以及通用的 input, select, textarea 
 * 设置统一的基础样式。
 */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  box-sizing: border-box; /* 确保 padding 和 border 不会增加元素的总宽度 */
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* 输入框获得焦点时的样式 */
.input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none; /* 移除默认的蓝色轮廓 */
  border-color: var(--btn-bg); /* 边框变为主题蓝色 */
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); /* 添加一个柔和的光晕效果 */
}

/* 占位符文本样式 */
::placeholder {
  color: #888;
  opacity: 1;
}

/* 抽屉式导航菜单 */
.drawer-menu-btn {
    position: fixed;
    top: 24px; left: 24px;
    z-index: 1201;
    width: 46px; height: 46px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 18px 0 rgba(68, 89, 121, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: box-shadow 0.18s;
}
.drawer-menu-btn:hover { box-shadow: 0 8px 28px 0 rgba(25,56,124,0.22); }
.drawer-menu-icon {
    width: 28px; height: 28px; 
    display: flex; flex-direction: column; 
    justify-content: center; gap: 5px;
}
.drawer-menu-icon span {
  display: block;
  height: 4px; width: 100%;
  border-radius: 3px;
  background: #2d335a;
  transition: all 0.22s;
}
.drawer-menu-btn.active .drawer-menu-icon span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.drawer-menu-btn.active .drawer-menu-icon span:nth-child(2) { opacity: 0; }
.drawer-menu-btn.active .drawer-menu-icon span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.drawer-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 250px;
    background: var(--sidebar-bg);
    box-shadow: 2px 0 16px rgba(25, 56, 124, 0.10);
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(.76,.01,.35,1.06);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 70px 26px 24px 26px;
}
.drawer-sidebar.active { transform: translateX(0); }
.drawer-logo {
    font-size: 24px; font-weight: bold; color: #fff;
    margin-bottom: 12px; cursor: pointer;
    transition: color 0.22s, transform 0.17s;
}
.drawer-logo:hover { color: #00ffcc; transform: scale(1.08) rotate(-2deg); }
.drawer-nav-link {
    color: #fff; text-decoration: none; font-size: 17px;
    margin: 4px 0; display: block; padding: 6px 0 6px 6px;
    border-radius: 7px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: background 0.18s, color 0.18s, box-shadow 0.2s;
    font-weight: 500;
}
.drawer-nav-link:hover {
    color: var(--nav-hover);
    background: rgba(180,240,255,0.13);
    box-shadow: 0 6px 16px rgba(32,121,205,0.11);
}
.drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--overlay-bg);
    z-index: 1199;
    display: none;
    transition: background 0.19s;
}
.drawer-overlay.active { display: block; }

/* 语言切换器 */
.language-selector {
  position: fixed; bottom: 100px; left: 20px;
  z-index: 1200; background: #fff; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 6px; margin: 0; display: inline-block;
}
.language-selector select {
    border: none; background: transparent; font-size: 14px;
    outline: none; cursor: pointer; margin-bottom: 0;
}

/* 页脚 */
.footer {
  font-size: 14px;
  color: var(--footer-text);
  text-align: center;
  background: var(--footer-bg);
  padding: 15px;
  border-radius: 10px;
  margin-top: 40px;
  width: 100%;
  box-sizing: border-box;
}
.footer a {
  color: #88ee34; text-decoration: underline;
}
.footer a:hover {
  color: #00b7d5; text-decoration: none;
}

/* Cookie 同意横幅 */
#cookieConsentBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(20, 20, 20, 0.9);
  color: #f1f1f1;
  padding: 15px 20px;
  z-index: 2000;
  display: none; /* 默认隐藏，由 JS 控制显示 */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-size: 14px;
}
#cookieConsentBanner.show {
  display: block;
}
.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-text {
  margin: 0;
  flex-grow: 1;
  line-height: 1.6;
}
.cookie-link {
  color: #8ab4f8;
  text-decoration: underline;
}
.cookie-link:hover {
  color: #a7c5f9;
}
.cookie-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}
.cookie-btn.primary {
  background-color: #375dd9;
  color: #fff;
}
.cookie-btn.primary:hover {
  background-color: #4a6ee5;
}
.cookie-btn.secondary {
  background-color: transparent;
  color: #e0e0e0;
  border: 1px solid #777;
}
.cookie-btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #aaa;
}
.cookie-close-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  cursor: pointer;
}
.cookie-close-btn:hover {
  color: #fff;
}

/* =========================
   Avatar dropdown + Modals (global)
   ========================= */

/* 隐藏旧的欢迎文字与登出按钮（改用菜单项） */
#userWelcome {
  display: none !important;
}

#logoutBtn {
  display: none !important;
}

/* 头像下拉菜单容器 */
.avatar-menu {
  position: fixed;
  top: 66px;
  right: 26px;
  min-width: 220px;
  background: var(--container-bg);
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  z-index: 1400;
  display: none;
}

.avatar-menu.active {
  display: block;
}

.avatar-menu-header {
  padding: 12px 14px;
  font-size: 14px;
  opacity: .8;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.avatar-menu-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 15px;
  cursor: pointer;
  transition: background .18s, transform .05s;
}

.avatar-menu-item:hover {
  background: rgba(180,240,255,0.13);
}

.avatar-menu-item:active {
  transform: scale(0.995);
}

html[data-theme='dark'] .avatar-menu {
  border-color: #2f3550;
  box-shadow: 0 12px 34px rgba(0,0,0,0.45);
}
html[data-theme='dark'] .avatar-menu-header {
  border-bottom-color: #2f3550;
}

/* ===== 通用模态框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-overlay.active {
  display: block;
  opacity: 1;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(95vw, 800px); /* 最大宽度改为800px */
  background: var(--container-bg);
  color: var(--text-main);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  border: 1px solid rgba(0,0,0,0.06);
  z-index: 10001;
  display: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  padding: 16px 24px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.modal-close {
  cursor: pointer;
  font-size: 22px;
  opacity: .65;
}

.modal-body {
  padding: 20px 24px;
  max-height: calc(90vh - 120px); /* 限制最大高度，确保页头页脚可见 */
  overflow-y: auto; /* 内容超出时，显示垂直滚动条 */
}

.modal-footer {
  padding: 16px 24px 20px;
  display:flex;
  gap:10px;
  justify-content: flex-end; /* 将子元素（按钮）对齐到右侧 */
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* 模态框内的表单元素 */
.modal .form-row {
  display: grid;
  grid-template-columns: 140px 1fr; /* 标签固定宽度，输入框占据剩余所有空间 */
  align-items: start; /* 顶部对齐，以防内容高度不同 */
  gap: 12px 16px;
  margin-bottom: 16px;
}

.modal label {
  font-size: 14px;
  opacity: .9;
  padding-top: 10px; /* 让标签和输入框垂直居中对齐 */
  font-weight: 500;
}

.modal input, .modal select {
  width: 100%; /* 输入框宽度撑满其grid单元格 */
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  border-radius: 8px;
  box-sizing: border-box;
}

.email-edit-group, .verify-code-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.email-edit-group input, .verify-code-group input {
  flex-grow: 1;
}
.email-edit-group .btn-sm, .verify-code-group .btn-sm {
  flex-shrink: 0; /* 防止按钮被压缩 */
  white-space: nowrap; /* 防止文字换行 */
}

.email-verify-section {
  display: none;
  border-top: 1px dashed #ccc;
  margin-top: 16px;
  padding-top: 16px;
}

.zip-status { margin-left: 8px; font-size: 14px; font-weight: bold; }

.address-group {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
}
.address-group input[id="pf_address_line"] {
  grid-column: 1 / -1;
}

.modal .hint {
  font-size: 12px;
  opacity: .7;
  margin-top: 4px;
  grid-column: 2 / -1; /* 提示信息也放在右侧栏 */
}

/* 按钮 (美化版) */
.btn,
.btn-primary, .btn-secondary, .btn-danger {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.btn-primary:active, .btn-secondary:active, .btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-secondary { background: #e9ecf3; color: #2b2f3a; }
.btn-danger { background: #d93025; color: white; }

.btn { background: #e9ecf3; color: #2b2f3a; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--btn-bg);
  border: 1px solid var(--btn-bg);
}
.btn-outline:hover {
  background: rgba(0,123,255,0.06);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
}

/* 【新增】后台管理表格的特定样式 */
.admin-table td:last-child {
  text-align: right;
  white-space: nowrap; /* 防止按钮换行 */
}

.admin-table td:last-child .btn {
  margin-left: 5px; /* 为按钮之间增加一些间距 */
}

/**
 * =============================================================================
 * 响应式设计 (Responsive Design) - 增强版
 * =============================================================================
 * 针对不同屏幕尺寸，优化通用组件的布局、字体大小和间距。
 */

/* --- 平板与大屏手机 (<= 768px) --- */
@media (max-width: 768px) {
  /* 调整主要内容的左右内边距，使其更贴合屏幕，视觉空间更大 */
  main.main {
    padding: 16vw 4vw 8vw 4vw;
  }
  
  /* [优化] 减少通用区块的垂直外边距，使页面更紧凑 */
  .section {
    margin: 25px auto;
  }
  
  /* 缩小通用区块的标题字体大小，使其在小屏幕上不那么突兀 */
  .section h2 {
    font-size: 1.3em;
  }
  
  /* 简化右上角用户栏：隐藏欢迎文字，只保留头像和按钮，保持界面简洁 */
  #userWelcome {
    display: none;
  }
  
  /* 调整固定元素的边距，使其在小屏幕上位置更协调 */
  .drawer-menu-btn {
    top: 16px;
    left: 16px;
  }
  #userAvatarBar {
    top: 12px;
    right: 16px;
  }

  /* Cookie 横幅内容垂直排列，以适应较窄的宽度 */
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .cookie-buttons {
    width: 100%;
    justify-content: flex-end;
  }
}

/* --- 标准手机 (<= 560px) --- */
@media (max-width: 560px) {
  /* [新增] 模态框内的表单改为单列布局，更适合手机操作 */
  .modal .form-row {
    grid-template-columns: 1fr;
    gap: 8px; /* 减小标签和输入框的间距 */
  }
  .modal label {
    padding-top: 0; /* 移除顶部内边距 */
  }
  .modal .hint {
    grid-column: 1 / -1;
    margin-top: 0; /* 移除顶部外边距 */
  }
  
  /* [新增] 优化模态框页脚按钮，使其堆叠并撑满宽度，便于点按 */
  .modal-footer {
    flex-direction: column-reverse; /* 按钮垂直排列，主按钮在上方 */
    padding: 16px;
    gap: 12px;
  }
  .modal-footer .btn {
    width: 100%;
    box-sizing: border-box;
  }

  /* [新增] 减小模态框内边距，以容纳更多内容 */
  .modal-header, .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}


/* --- 标准手机 (<= 480px) --- */
@media (max-width: 480px) {
  /* 手机端进一步调整内边距 */
  main.main {
    padding: 12vw 5vw 6vw 5vw;
  }
  
  /* 进一步缩小区块标题 */
  .section h2 {
    font-size: 1.2em;
  }
  
  /* 缩小抽屉菜单内的链接字体，以在窄屏内容纳更多文字 */
  .drawer-nav-link {
    font-size: 16px;
  }
  
  /* [新增] 抽屉菜单宽度优化，避免在小屏上占据过多空间 */
  .drawer-sidebar {
    width: min(250px, 80vw);
  }

  /* 优化页脚在手机上的显示效果 */
  .footer {
    font-size: 12px;
    padding: 12px 0;
    margin-top: auto; /* 确保内容不足一屏时，页脚也能吸底 */
    border-radius: 0; /* 在手机上，页脚通栏显示，通常不需要圆角 */
  }
  
  /* 缩小语言选择器并微调位置，减少对内容的遮挡 */
  .language-selector {
    bottom: 15px;
    left: 15px;
    padding: 4px;
  }
  .language-selector select {
    font-size: 12px;
  }
  
  /* 调整头像下拉菜单位置 */
  .avatar-menu {
    right: 16px;
    top: 56px;
    min-width: 200px;
  }
}

/* =============================================================================
 * 图片灯箱 (Lightbox) 样式
 * ============================================================================= */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  transition: transform 0.3s ease;
  transform: scale(0.95);
}

.lightbox-overlay.active .lightbox-image {
  transform: scale(1);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  color: white;
  font-size: 30px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s;
  opacity: 0.7;
  padding: 10px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-close {
  top: 15px;
  right: 25px;
  font-size: 45px;
}

.lightbox-prev {
  left: 15px;
}

.lightbox-next {
  right: 15px;
}

/* =============================================================================
 * 新增: 服务详情弹窗内商家信息、聊天弹窗、注销按钮样式
 * ============================================================================= */
/* 商家信息块 */
.merchant-info-block {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    align-items: center;
}
.merchant-info-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.merchant-info-details h4 {
    margin: 0 0 5px 0;
}
.merchant-info-details p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}
.merchant-info-actions {
    margin-left: auto; /* 将按钮推到最右侧 */
}

/* 商家聊天弹窗 */
.merchant-chat-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 450px;
    z-index: 1600; /* 比普通弹窗更高 */
}

/* 注销账户按钮 */
.btn-delete-account {
    background-color: #dc3545;
    color: white;
    width: 100%;
    margin-top: 10px;
    text-align: center;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.btn-delete-account:hover {
    background-color: #c82333;
}

.welcome-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  background-color: #4e73df; /* 主题色 */
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 16px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.welcome-toast.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
/*
.chat-msg { margin: 8px 0; }
.chat-msg.user  { 
  text-align: right; 
}
.chat-msg.bot   { 
  text-align: left; 
}
.chat-msg-meta  { 
  font-size: 12px; color:#ffffff; 
  margin-bottom:4px; 
}
.chat-msg-body  { 
  display:inline-block; 
  padding:8px 10px; 
  border-radius:8px; 
  background:#f5f5f5; 
  max-width:70%; 
  text-align:left;
 }
.chat-msg.user  .chat-msg-body { 
  background:#e8f2ff; 
}
.chat-msg.send-failed .chat-msg-body { 
  background:#ffe8e8; 
}
*/