/* Chat ao vivo · homepage */

.home-bottom-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  align-items: start;
  margin: 50px 0;
}

.home-bottom-forum,
.home-bottom-chat {
  min-width: 0;
}

.home-bottom-chat {
  position: sticky;
  top: 16px;
}

.home-bottom-row .forum-section {
  margin: 0;
}

.home-bottom-row .forum-categories {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ravi-chat {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(145deg, #0d1b2a 0%, #1b2838 50%, #0d1b2a 100%);
  border: 1px solid rgba(100, 255, 218, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  min-height: 680px;
  max-height: 860px;
  overflow: hidden;
  position: relative;
}

.ravi-chat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #64ffda, #4fd1c5, #64ffda);
}

.ravi-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px 10px;
  border-bottom: 1px solid rgba(100, 255, 218, 0.12);
}

.ravi-chat-head h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.ravi-chat-actions {
  display: flex;
  gap: 8px;
}

.ravi-chat-btn {
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.25);
  color: #64ffda;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ravi-chat-btn:hover,
.ravi-chat-btn.is-on {
  background: rgba(100, 255, 218, 0.25);
  color: #fff;
}

.ravi-chat-ticket {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(100, 255, 218, 0.12);
  background: rgba(100, 255, 218, 0.06);
}

.ravi-chat-ticket-back {
  background: none;
  border: 0;
  color: #64ffda;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  flex: 0 0 auto;
}

.ravi-chat-ticket strong {
  flex: 1;
  min-width: 0;
  color: #fff;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ravi-chat-online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  background: #8892b0;
}

.ravi-chat-online-dot.is-on {
  background: #64ffda;
  box-shadow: 0 0 6px #64ffda;
}

.ravi-chat-online-dot.is-off {
  background: #ffc45a;
}

.ravi-chat-hours {
  display: none;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(100, 255, 218, 0.3);
  background: rgba(100, 255, 218, 0.06);
}

.ravi-chat-hours.is-on,
.ravi-chat-hours.is-off {
  display: block;
}

.ravi-chat-hours.is-off {
  border-color: rgba(255, 196, 90, 0.45);
  background: rgba(255, 196, 90, 0.08);
}

.ravi-chat-hours strong {
  display: inline;
  color: #e6f1ff;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(100, 255, 218, 0.45);
  padding-bottom: 1px;
}

.ravi-chat-hours.is-off strong {
  color: #ffe7b3;
  border-bottom-color: rgba(255, 196, 90, 0.55);
}

.ravi-chat-hours p {
  margin: 5px 0 0;
  color: #b7c2d4;
  font-size: 11px;
  line-height: 1.4;
}

.ravi-chat-hours a {
  color: #64ffda;
  font-weight: 600;
  text-decoration: underline;
}

.ravi-chat-hours a:hover {
  color: #fff;
}

.ravi-chat-hours-chats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ravi-chat-hours-link {
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.35);
  color: #64ffda;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.ravi-chat-hours-link:hover {
  background: rgba(100, 255, 218, 0.2);
  color: #fff;
}

.ravi-chat-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 12px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(100, 255, 218, 0.16);
}

.ravi-chat-tab {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8892b0;
  border-radius: 16px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.ravi-chat-tab.is-on {
  background: rgba(100, 255, 218, 0.15);
  border-color: rgba(100, 255, 218, 0.35);
  color: #64ffda;
}

.ravi-chat-tab.is-lock {
  opacity: 0.75;
}

.ravi-chat-tab-dm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(100, 255, 218, 0.08);
}

.ravi-chat-tab-x {
  font-size: 11px;
  color: #8892b0;
  padding: 0 2px;
}

.ravi-chat-tab-float {
  font-size: 13px;
  color: #8892b0;
  padding: 0 2px;
  line-height: 1;
}

.ravi-chat-tab-x:hover,
.ravi-chat-tab-float:hover {
  color: #64ffda;
}

.ravi-chat-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-anchor: none;
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 255, 218, 0.42) rgba(7, 20, 32, 0.7);
}

.ravi-chat-empty,
.ravi-chat-hint {
  color: #8892b0;
  font-size: 13px;
  text-align: center;
  padding: 24px 10px;
}

.ravi-chat-msg {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 8px 10px;
}

.ravi-chat-msg.is-mine {
  background: rgba(100, 255, 218, 0.08);
}

.ravi-chat-msg.is-admin {
  border: 1px solid #d4af37;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.25);
}

.ravi-chat-msg.is-gone .ravi-chat-text {
  color: #8892b0;
  font-style: italic;
}

.ravi-chat-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.ravi-chat-av-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  line-height: 0;
}

.ravi-chat-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(100, 255, 218, 0.3);
  display: block;
}

.ravi-chat-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 7px;
  letter-spacing: 0.02em;
}

.ravi-chat-badge.is-admin {
  color: #ffd166;
  background: rgba(255, 209, 102, 0.16);
}

.ravi-chat-badge.is-moderador {
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.16);
}

.ravi-chat-badge.is-suporte {
  color: #64ffda;
  background: rgba(100, 255, 218, 0.16);
}

.ravi-chat-badge.is-product {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 140px;
  color: #e6f1ff;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ravi-chat-badge.is-product img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  flex: 0 0 auto;
}

.ravi-chat-badge.is-guest {
  color: #8892b0;
  background: rgba(136, 146, 176, 0.16);
  font-weight: 600;
}

.ravi-chat-name {
  background: none;
  border: 0;
  color: #64ffda;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.ravi-chat-time {
  margin-left: auto;
  color: #8892b0;
  font-size: 10px;
}

.ravi-chat-origin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.9;
}

.ravi-chat-origin svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ravi-chat-origin.is-web {
  color: #7dd3fc;
}

.ravi-chat-origin.is-app {
  color: #64ffda;
}

.ravi-chat-replybox {
  font-size: 11px;
  color: #8892b0;
  border-left: 2px solid #64ffda;
  padding-left: 8px;
  margin-bottom: 4px;
}

.ravi-chat-text {
  color: #e6f1ff;
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.ravi-chat-tools {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.ravi-chat-tools button {
  background: none;
  border: 0;
  color: #8892b0;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}

.ravi-chat-tools button:hover {
  color: #64ffda;
}

.ravi-chat-compose {
  border-top: 1px solid rgba(100, 255, 218, 0.12);
  padding: 10px 12px 12px;
}

.ravi-chat-replying {
  display: none;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64ffda;
  margin-bottom: 6px;
}

.ravi-chat-replying.is-on {
  display: flex;
}

.ravi-chat-row {
  display: flex;
  gap: 8px;
}

.ravi-chat-row textarea {
  flex: 1;
  min-height: 42px;
  max-height: 90px;
  resize: none;
  border-radius: 10px;
  border: 1px solid rgba(100, 255, 218, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}

.ravi-chat-row textarea:disabled {
  opacity: 0.45;
}

.ravi-chat-send {
  background: linear-gradient(135deg, #64ffda 0%, #4fd1c5 100%);
  color: #0a192f;
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.ravi-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#ravi-chat-floats {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
}

.ravi-chat-float {
  position: fixed;
  left: 24px;
  top: 90px;
  width: 320px;
  max-height: 420px;
  z-index: 2147483001;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(145deg, #0d1b2a, #1b2838);
  border: 1px solid rgba(100, 255, 218, 0.25);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.ravi-chat-float-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(100, 255, 218, 0.08);
  border-radius: 12px 12px 0 0;
  cursor: move;
  user-select: none;
  touch-action: none;
}

.ravi-chat-float-bar strong {
  color: #fff;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ravi-chat-float-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.ravi-chat-float-bar .ravi-chat-float-resolve {
  font-size: 11px;
  font-weight: 600;
  color: #64ffda;
  border: 1px solid rgba(100, 255, 218, 0.35);
  border-radius: 12px;
  padding: 3px 8px;
}

.ravi-chat-float-bar button {
  background: none;
  border: 0;
  color: #8892b0;
  font-size: 16px;
  cursor: pointer;
}

.ravi-chat-float .ravi-chat-log {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.ravi-chat-float .ravi-chat-compose {
  flex: 0 0 auto;
}

.ravi-chat-float .ravi-chat-hours {
  padding: 6px 8px;
  margin-bottom: 6px;
}

.ravi-chat-list {
  display: none;
  position: absolute;
  inset: 52px 10px 10px;
  background: #0d1b2a;
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: 12px;
  z-index: 3;
  overflow-y: auto;
  padding: 8px;
}

.ravi-chat-list.is-on {
  display: block;
}

.ravi-chat-list.is-thread {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.ravi-chat-list.is-thread .ravi-chat-list-head {
  position: static;
  padding: 10px 12px;
  flex: 0 0 auto;
  gap: 8px;
}

.ravi-chat-list.is-thread .ravi-chat-log {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.ravi-chat-list.is-thread .ravi-chat-compose {
  flex: 0 0 auto;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(100, 255, 218, 0.12);
}

.ravi-chat-list-resolve {
  font-size: 12px !important;
  font-weight: 600;
  color: #64ffda !important;
  border: 1px solid rgba(100, 255, 218, 0.35) !important;
  border-radius: 12px !important;
  padding: 3px 8px !important;
}

#ravi-chat-list-overlay.is-thread {
  width: 360px;
  height: min(72vh, 580px);
  max-height: min(72vh, 580px);
}

#ravi-chat-list-overlay.ravi-chat-list {
  position: fixed;
  inset: auto 18px 18px auto;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: min(70vh, 460px);
  z-index: 2147483015;
  pointer-events: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.ravi-chat-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 10px;
  color: #fff;
  font-size: 14px;
  position: sticky;
  top: 0;
  background: #0d1b2a;
  z-index: 1;
}

.ravi-chat-list-head strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ravi-chat-list-head button {
  width: auto;
  background: none;
  border: 0;
  color: #8892b0;
  font-size: 18px;
  cursor: pointer;
  padding: 0 6px;
}

.ravi-chat-list-head .ravi-chat-ticket-back {
  font-size: 12px;
  font-weight: 600;
  color: #64ffda;
}

.ravi-chat-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 0;
  color: #e6f1ff;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}

.ravi-chat-list-row img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(100, 255, 218, 0.25);
  flex: 0 0 auto;
}

.ravi-chat-list-row span {
  min-width: 0;
}

.ravi-chat-list-row strong {
  display: block;
  color: #e6f1ff;
  font-size: 13px;
}

.ravi-chat-list-row em {
  display: block;
  color: #8892b0;
  font-size: 11px;
  font-style: normal;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ravi-chat-list-row em.is-wait {
  color: #ffd166;
}

.ravi-chat-list-row em.is-done {
  color: #64ffda;
}

.ravi-chat-pop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2147483010;
  align-items: center;
  justify-content: center;
}

.ravi-chat-pop.is-on {
  display: flex;
}

.ravi-chat-pop-card {
  background: linear-gradient(145deg, #0d1b2a, #1b2838);
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: 16px;
  padding: 24px;
  width: min(420px, 92vw);
  text-align: center;
  color: #e6f1ff;
}

.ravi-chat-pop-card h3 {
  margin: 0 0 10px;
  color: #fff;
}

.ravi-chat-pop-card a,
.ravi-chat-pop-card button {
  display: inline-block;
  margin: 8px 4px 0;
  padding: 10px 16px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.ravi-chat-pop-card a {
  background: linear-gradient(135deg, #64ffda, #4fd1c5);
  color: #0a192f;
}

.ravi-chat-pop-card button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.ravi-chat-pop-card .ravi-chat-ask-yes {
  background: linear-gradient(135deg, #64ffda, #4fd1c5);
  border: 0;
  color: #0a192f;
}

@media (max-width: 1100px) {
  .home-bottom-row {
    grid-template-columns: 1fr;
  }

  .home-bottom-chat {
    position: static;
  }

  .ravi-chat {
    min-height: 560px;
  }
}

@media (max-width: 640px) {
  .home-bottom-row .forum-categories {
    grid-template-columns: 1fr;
  }
}

.ravi-chat-app-body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0d1b2a;
}

.ravi-chat.is-app {
  min-height: 100%;
  max-height: 100%;
  height: 100%;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.ravi-chat.is-app .ravi-chat-tabs {
  padding: 10px 12px 14px;
  margin: 0;
  border-bottom: 1px solid rgba(100, 255, 218, 0.22);
}

.ravi-chat.is-app .ravi-chat-log {
  padding-top: 18px;
}

.ravi-chat-log::-webkit-scrollbar,
.ravi-chat-list::-webkit-scrollbar,
.ravi-chat-tabs::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.ravi-chat-log::-webkit-scrollbar-track,
.ravi-chat-list::-webkit-scrollbar-track,
.ravi-chat-tabs::-webkit-scrollbar-track {
  background: rgba(7, 20, 32, 0.58);
  border-radius: 999px;
  margin: 4px 0;
}

.ravi-chat-log::-webkit-scrollbar-thumb,
.ravi-chat-list::-webkit-scrollbar-thumb,
.ravi-chat-tabs::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(100, 255, 218, 0.55), rgba(61, 155, 255, 0.4));
  border-radius: 999px;
  border: 2px solid rgba(7, 20, 32, 0.45);
}

.ravi-chat-log::-webkit-scrollbar-thumb:hover,
.ravi-chat-list::-webkit-scrollbar-thumb:hover,
.ravi-chat-tabs::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 255, 218, 0.72);
}

.ravi-chat-list,
.ravi-chat-tabs {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 255, 218, 0.42) rgba(7, 20, 32, 0.7);
}

.ravi-chat.is-app [data-chat="float-out"],
.ravi-chat.is-app .ravi-chat-tab-float,
.ravi-chat-app-body .ravi-chat-float {
  display: none !important;
}
