/* jpura-chat.css */

/* Toggle button */
.jpuraChat-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #07103a; /* navy */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(7,16,58,0.25);
  z-index: 2147483000; /* very high */
  transition: transform .18s ease, background .18s ease;
}
.jpuraChat-toggle:focus { outline: 3px solid rgba(12, 73, 204, 0.2); transform: scale(1.05); }

/* Container */
.jpuraChat-container {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 360px;
  max-width: calc(100% - 56px);
  height: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(7,16,58,0.18);
  z-index: 2147482999;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Hidden utility */
.jpuraChat-hidden { display: none; }

/* Header */
.jpuraChat-header {
  background: #07103a;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jpuraChat-header-left { display:flex; align-items:center; gap:10px; }
.jpuraChat-logo { width:36px; height:36px; object-fit:contain; border-radius:6px; }
.jpuraChat-title { font-weight:600; font-size:14px; }

/* Close button */
.jpuraChat-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

/* Messages area */
.jpuraChat-messages {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
  flex: 1 1 auto;
}

/* Message bubbles */
.jpuraChat-msg {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  font-size: 14px;
  word-wrap: break-word;
}

.jpuraChat-msg--bot {
  background: #f0f2f7;
  color: #0a0a0a;
  align-self: flex-start;
  border-top-left-radius: 6px;
}

.jpuraChat-msg--user {
  background: #07103a;
  color: #ffffff;
  align-self: flex-end;
  border-top-right-radius: 6px;
}

/* Timestamp small */
.jpuraChat-ts {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 6px;
  text-align: right;
}

/* Input area (form) */
.jpuraChat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e8eef9;
  background: #fff;
}
.jpuraChat-input {
  flex: 1;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #e1e7f6;
  outline: none;
  font-size: 14px;
  background: #fbfdff;
}
.jpuraChat-input:focus { box-shadow: 0 0 0 3px rgba(10,24,100,0.08); border-color: #cbd8ff; }

.jpuraChat-send {
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  background: #0f3bd6;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

/* Responsive smaller screens: expand to full width at bottom */
@media (max-width: 480px) {
  .jpuraChat-container {
    right: 10px;
    left: 10px;
    bottom: 20px;
    width: auto;
    height: 70vh;
    max-height: 70vh;
  }
  .jpuraChat-toggle { right: 12px; bottom: 12px; }
}
