/* Brenav storefront support widget */
.support-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 16px 0 13px;
  border: 0;
  border-radius: 30px;
  background: var(--ink, #313928);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(35, 42, 29, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.support-fab:hover { transform: translateY(-2px); background: #3c4531; box-shadow: 0 16px 36px rgba(35, 42, 29, 0.3); }
.support-fab:focus-visible { outline: 3px solid rgba(222, 121, 35, 0.55); outline-offset: 3px; }
.support-fab svg { width: 22px; height: 22px; flex: none; }
.support-fab-label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; }
.support-fab-badge {
  position: absolute;
  top: -4px;
  right: 2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--accent, #de7923);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}
.support-fab-badge[hidden] { display: none; }

.support-panel {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 95;
  width: 372px;
  max-width: calc(100vw - 28px);
  height: 548px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  background: #fbfaf4;
  border: 1px solid rgba(49, 57, 40, 0.14);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(27, 34, 22, 0.26);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.support-panel[hidden] { display: none; }
.support-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.support-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 15px 14px;
  background: var(--ink, #313928);
  color: #fff;
}
.support-head-mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.support-head-mark svg { width: 19px; height: 19px; }
.support-head-copy { flex: 1; min-width: 0; }
.support-head-copy strong { display: block; font-size: 13.5px; letter-spacing: 0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-head-status { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 10.5px; color: rgba(255, 255, 255, 0.72); }
.support-dot { width: 6px; height: 6px; border-radius: 50%; background: #8cc77e; box-shadow: 0 0 0 2px rgba(140, 199, 126, 0.16); }
.support-dot.is-offline { background: #c9a46a; box-shadow: 0 0 0 2px rgba(201, 164, 106, 0.16); }
.support-close {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.support-close:hover { background: rgba(255, 255, 255, 0.12); }
.support-close svg { width: 15px; height: 15px; }

.support-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at 90% 8%, rgba(222, 121, 35, 0.07), transparent 34%),
    #f7f5ec;
}
.support-welcome {
  padding: 14px;
  border: 1px solid rgba(49, 57, 40, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}
.support-welcome strong { display: block; font-size: 12.5px; margin-bottom: 5px; }
.support-welcome p { font-size: 11.5px; line-height: 1.7; color: #656957; margin: 0; }
.support-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.support-quick button {
  padding: 6px 9px;
  border: 1px solid rgba(49, 57, 40, 0.16);
  border-radius: 20px;
  background: #fff;
  color: #4b5140;
  font-size: 10.5px;
  cursor: pointer;
}
.support-quick button:hover { border-color: var(--accent, #de7923); color: #b35f17; }

.support-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 84%; }
.support-msg.is-agent { align-self: flex-end; align-items: flex-end; }
.support-msg.is-system { align-self: center; max-width: 92%; align-items: center; }
.support-msg-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 9.5px; color: #888b78; }
.support-msg-body {
  padding: 9px 12px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid rgba(49, 57, 40, 0.11);
  font-size: 12.5px;
  line-height: 1.65;
  color: #303528;
  white-space: pre-wrap;
  word-break: break-word;
}
.support-msg.is-agent .support-msg-body { background: var(--ink, #313928); border-color: var(--ink, #313928); color: #fff; }
.support-msg.is-system .support-msg-body { background: transparent; border: 0; padding: 2px 0; color: #8a8d7b; font-size: 10.5px; text-align: center; }

.support-msg-attachment {
  display: block;
  max-width: 220px;
  margin-top: 5px;
  border: 1px solid rgba(49, 57, 40, 0.14);
  border-radius: 9px;
  overflow: hidden;
  background: #f4f3ea;
}
.support-msg-attachment img { display: block; width: 100%; max-height: 210px; object-fit: cover; }

.support-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(49, 57, 40, 0.1);
  background: #fff;
}
.support-attach {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border: 1px solid rgba(49, 57, 40, 0.14);
  border-radius: 8px;
  background: #f7f6ee;
}
.support-attach[hidden] { display: none; }
.support-attach img { width: 42px; height: 42px; border-radius: 5px; object-fit: cover; flex: none; }
.support-attach-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #6b6f5c; }
.support-attach-remove {
  width: 24px;
  height: 24px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: rgba(49, 57, 40, 0.08);
  color: #555b4a;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.support-attach-remove:hover { background: rgba(222, 121, 35, 0.15); color: #a95512; }
.support-compose-row { display: flex; align-items: flex-end; gap: 7px; }
.support-compose-tools { position: relative; display: flex; gap: 3px; flex: none; padding-bottom: 1px; }
.support-tool {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #707560;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.support-tool:hover { background: rgba(49, 57, 40, 0.07); color: var(--ink, #313928); }
.support-tool svg { width: 17px; height: 17px; }
.support-emoji-pop {
  position: absolute;
  left: 0;
  bottom: 36px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(7, 30px);
  gap: 2px;
  padding: 7px;
  border: 1px solid rgba(49, 57, 40, 0.14);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 37, 24, 0.16);
}
.support-emoji-pop[hidden] { display: none; }
.support-emoji {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.support-emoji:hover { background: #f1efe4; }
.support-form textarea {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 100px;
  padding: 9px 11px;
  border: 1px solid rgba(49, 57, 40, 0.16);
  border-radius: 9px;
  background: #fff;
  color: #303528;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  resize: none;
  outline: none;
}
.support-form textarea:focus { border-color: var(--ink, #313928); box-shadow: 0 0 0 3px rgba(49, 57, 40, 0.07); }
.support-form textarea::placeholder { color: #9a9c8c; }
.support-send {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: var(--accent, #de7923);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.support-send:hover { background: #c96c1d; }
.support-send[disabled] { opacity: 0.5; cursor: default; }
.support-send svg { width: 18px; height: 18px; }
.support-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px 10px; background: #fff; font-size: 9.5px; color: #9a9c8c; text-align: center; }
.support-foot[hidden] { display: none; }
.support-foot-text { min-width: 0; }
.support-foot-link { color: #b35f17; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.support-foot-link[hidden] { display: none; }

.support-form[hidden] { display: none; }

.support-guest {
  align-self: center;
  width: 100%;
  max-width: 290px;
  margin: auto 0;
  padding: 22px 18px;
  border: 1px solid rgba(49, 57, 40, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}
.support-guest-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(49, 57, 40, 0.06);
  color: var(--ink, #313928);
}
.support-guest-mark svg { width: 21px; height: 21px; }
.support-guest h3 { margin: 0 0 7px; font-size: 14px; color: #303528; }
.support-guest p { margin: 0 0 14px; font-size: 11.5px; line-height: 1.7; color: #656957; }
.support-signin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  background: var(--accent, #de7923);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
}
.support-signin-btn:hover { background: #c96618; }
.support-guest-note { display: block; margin-top: 11px; font-size: 9.5px; color: #9a9c8c; }

.support-notice { padding: 8px 10px; border-radius: 8px; background: #fff3e2; color: #8a4d16; font-size: 10.5px; line-height: 1.55; text-align: center; }
.support-error { padding: 8px 10px; border-radius: 8px; background: #fbeceb; color: #8e3830; font-size: 10.5px; text-align: center; }

@media (max-width: 640px) {
  .support-fab { right: 14px; bottom: 14px; height: 48px; padding: 0 13px; border-radius: 26px; }
  .support-fab-label { display: none; }
  .support-panel { right: 10px; left: 10px; bottom: 72px; width: auto; height: calc(100vh - 90px); max-height: 640px; }
}
