.saikos-chat-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  font-family: Inter, Arial, sans-serif;
}

.saikos-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: #0b0b0b;
  color: #fff;
  padding: 13px 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 35px rgba(0,0,0,.34);
}

.saikos-chat-toggle:hover {
  background: #d20f20;
}

.saikos-chat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d20f20;
  box-shadow: 0 0 0 5px rgba(210,15,32,.12);
}

.saikos-chat-panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(680px, 78vh);
  display: none;
  grid-template-rows: auto 1fr auto auto auto;
  overflow: hidden;
  border: 1px solid #292929;
  background: #0b0b0b;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.48);
}

.saikos-chat-panel.is-open {
  display: grid;
}

.saikos-chat-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid #292929;
}

.saikos-chat-panel-header p {
  margin: 0 0 5px;
  color: #d20f20;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
}

.saikos-chat-panel-header h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
}

.saikos-chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.saikos-chat-widget-messages {
  min-height: 220px;
  overflow-y: auto;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), transparent),
    #101010;
}

.saikos-widget-message {
  display: flex;
  margin-bottom: 10px;
}

.saikos-widget-message.user {
  justify-content: flex-end;
}

.saikos-widget-bubble {
  max-width: 88%;
  padding: 11px 13px;
  border: 1px solid #2d2d2d;
  background: #171717;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
}

.saikos-widget-message.user .saikos-widget-bubble {
  border-color: #d20f20;
  background: #d20f20;
}

.saikos-widget-message.loading .saikos-widget-bubble {
  color: #aaa;
}

.saikos-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 16px;
  border-top: 1px solid #242424;
}

.saikos-chat-quick button {
  border: 1px solid #303030;
  background: transparent;
  color: #fff;
  padding: 7px 9px;
  font-size: 12px;
  cursor: pointer;
}

.saikos-chat-quick button:hover {
  border-color: #d20f20;
}

.saikos-chat-widget-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 0 16px 12px;
}

.saikos-chat-widget-form input {
  min-width: 0;
  border: 1px solid #303030;
  background: #0e0e0e;
  color: #fff;
  padding: 12px;
  outline: none;
}

.saikos-chat-widget-form input:focus {
  border-color: #d20f20;
}

.saikos-chat-widget-form button {
  border: 0;
  background: #d20f20;
  color: #fff;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.saikos-chat-whatsapp {
  display: block;
  margin: 0 16px 16px;
  border: 1px solid #303030;
  color: #fff;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.saikos-chat-whatsapp:hover {
  border-color: #d20f20;
}

@media (max-width: 640px) {
  .saikos-chat-widget {
    right: 12px;
    bottom: 12px;
  }

  .saikos-chat-toggle span:last-child {
    display: none;
  }

  .saikos-chat-toggle {
    width: 52px;
    height: 52px;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
  }

  .saikos-chat-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 74px;
    width: auto;
    max-height: 78vh;
  }
}
