/* Wrachat current design. Component layout and active theme; edit this file directly. */
:root {
  font-family: Inter,system-ui,-apple-system,sans-serif;
  color: var(--widget-text);
  background: var(--widget-background);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100dvh;
}

button,input,select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline: 2px solid var(--widget-primary);
  outline-offset: 2px;
}

.hidden,[hidden] {
  display: none!important;
}

.widget {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #52637855;
  overflow: hidden;
}

header {
  display: flex;
  align-items: center;
  background: var(--widget-header);
  border-bottom: 1px solid #66788d33;
}

.icon-button {
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--widget-text);
  flex-shrink: 0;
  padding: 0;
}

.icon-button:hover {
  background: #ffffff15;
}

.profile-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--widget-primary);
  border-radius: 50%;
  background: var(--widget-bot);
  font-weight: 700;
  overflow: hidden;
}

.profile-avatar img,.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-title {
  min-width: 0;
  flex: 1;
}

.header-title b {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-title small {
  opacity: .7;
  display: block;
  margin-top: 3px;
}

.home {
  padding: 17px;
  overflow: auto;
  flex: 1;
}

.banner {
  position: relative;
  background: linear-gradient(130deg,var(--widget-operator),var(--widget-header));
  overflow: hidden;
}

.banner h1 {
  position: relative;
  margin: 0 0 10px;
  white-space: pre-wrap;
}

.banner p {
  position: relative;
  line-height: 1.5;
  margin: 0;
  opacity: .8;
}

.banner img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: .22;
}

h2 {
  font-size: 10px;
  letter-spacing: 1.8px;
  opacity: .7;
  margin: 22px 0 11px;
}

.quick-links {
  display: grid;
}

.quick-links button {
  border: 1px solid #7b9ba944;
  background: var(--widget-header);
  color: var(--widget-text);
  display: flex;
}

.quick-links span {
  font-size: 22px;
  color: var(--widget-primary);
  width: 24px;
  text-align: center;
}

.quick-links i {
  margin-left: auto;
  font-style: normal;
  opacity: .6;
}

.external-links {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.external-links a {
  flex: 1;
  padding: 11px 8px;
  color: var(--widget-text);
  border: 1px solid #7b9ba944;
  border-radius: 8px;
  font-size: 10px;
  text-decoration: none;
  text-align: center;
}

select {
  width: 100%;
  padding: 12px;
  border: 1px solid #7b9ba944;
  background: var(--widget-header);
  color: var(--widget-text);
  border-radius: 9px;
  font-size: 12px;
  margin: 0 0 10px;
}

.primary {
  border: 0;
  background: var(--widget-primary);
  color: var(--accent-text);
  border-radius: 9px;
  padding: 13px;
  width: 100%;
  font-weight: 700;
  font-size: 13px;
}

.chat-area {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.widget-messages {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.message-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.message-row.mine {
  justify-content: flex-end;
}

.message-avatar {
  border-radius: 50%;
  border: 1px solid #7b9ba977;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: var(--widget-header);
}

.bubble {
  max-width: 85%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  padding: 11px 12px;
  background: var(--widget-operator);
  color: var(--widget-text);
}

.bubble.bot {
  background: var(--widget-bot);
}

.bubble.visitor {
  border-radius: 12px 12px 3px 12px;
  background: var(--widget-header);
}

.bubble .sender {
  font-size: 10px;
  opacity: .75;
  display: block;
  font-weight: 650;
  margin-bottom: 3px;
}

.bubble time {
  display: block;
  text-align: right;
  font-size: 9px;
  opacity: .65;
  margin-top: 5px;
}

#widgetForm {
  display: flex;
  align-items: center;
  border-top: 1px solid #7b9ba944;
  background: var(--widget-header);
}

#widgetInput {
  flex: 1;
  background: var(--widget-background);
  border: 1px solid #7b9ba955;
  color: var(--widget-text);
}

.send {
  background: var(--widget-primary);
  color: var(--accent-text);
  border: 0;
}

#sendStatus {
  background: var(--widget-header);
  color: var(--widget-text);
}

.emoji-picker {
  background: var(--widget-header);
  padding: 8px;
  display: flex;
  justify-content: space-around;
}

.emoji-picker button {
  background: none;
  border: 0;
  font-size: 21px;
  padding: 5px;
}

.reset-card {
  border: 1px solid #7b9ba955;
  background: var(--widget-header);
  margin-left: 36px;
}

.reset-card label {
  margin-bottom: 10px;
}

.reset-card input {
  background: var(--widget-background);
  color: var(--widget-text);
  margin-top: 6px;
  border: 1px solid #7b9ba966;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

@media(max-width:340px) {
  header {
    gap: 5px;
    padding: 10px 6px;
  }

  .home {
    padding: 12px;
  }

}

.chat-attachment {
  display: block;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  margin-top: 8px;
}

.member-gate {
  display: flex;
  flex-direction: column;
  background: var(--widget-background);
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--widget-header) transparent;
}

.gate-content {
  flex-shrink: 0;
}

.gate-intro {
  margin-bottom: 28px;
}

.gate-symbol {
  display: grid;
  place-items: center;
  color: var(--widget-primary);
  background: color-mix(in srgb,var(--widget-primary) 9%,var(--widget-background));
  border: 1px solid color-mix(in srgb,var(--widget-primary) 25%,transparent);
  box-shadow: 0 0 44px color-mix(in srgb,var(--widget-primary) 8%,transparent);
}

.gate-intro h1 {
  font-weight: 750;
  color: var(--widget-text);
}

.gate-intro>p {
  font-size: 14px;
  line-height: 1.65;
  max-width: 290px;
  margin: 0 auto;
  color: var(--widget-text);
  opacity: .68;
}

.gate-form {
  width: 100%;
}

.gate-form>label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 10px;
}

.gate-input {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb,var(--widget-text) 28%,var(--widget-background));
  padding: 0 15px;
  background: color-mix(in srgb,var(--widget-header) 50%,var(--widget-background));
  transition: border-color .15s,box-shadow .15s;
}

.gate-input>svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  color: var(--widget-text);
  opacity: .55;
}

.gate-input:focus-within {
  border-color: var(--widget-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--widget-primary) 15%,transparent);
}

#memberUserId {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--widget-text);
  padding: 16px 0;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
}

#memberUserId::placeholder {
  color: var(--widget-text);
  opacity: .43;
}

#memberUserId:autofill {
  border-radius: 8px;
}

.gate-hint {
  margin: 10px 0 0;
  color: var(--widget-text);
}

.gate-status {
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
  color: var(--widget-text);
}

.gate-status:empty {
  display: none;
}

.gate-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 14px;
  width: 100%;
  padding: 14px 42px;
  border: 0;
  line-height: 1.4;
  font-weight: 750;
  background: var(--widget-primary);
  color: var(--accent-text);
  transition: filter .15s,transform .15s;
}

.gate-submit>svg {
  position: absolute;
  right: 18px;
  width: 22px;
  height: 22px;
}

.gate-submit:hover:not(:disabled) {
  filter: brightness(1.07);
}

.gate-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.gate-submit:disabled {
  opacity: .6;
}

.gate-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
  min-height: 58px;
  border-top: 1px solid color-mix(in srgb,var(--widget-text) 10%,transparent);
  padding: 16px 20px;
  color: var(--widget-text);
}

.gate-footer>span:first-child {
  color: var(--widget-primary);
  font-size: 18px;
  font-weight: 850;
}

.gate-footer>span:last-child {
  opacity: .55;
}

.gate-footer b {
  font-weight: 550;
}

@media(max-width:340px) {
  .gate-content {
    padding: 24px 18px;
  }

  .gate-intro h1 {
    font-size: 23px;
  }

  .gate-intro>p {
    font-size: 13px;
  }

  .gate-symbol {
    width: 66px;
    height: 66px;
    margin-bottom: 20px;
  }

  .gate-intro {
    margin-bottom: 24px;
  }

}

@media(max-height:560px) {
  .gate-content {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .gate-symbol {
    width: 54px;
    height: 54px;
    margin-bottom: 15px;
  }

  .gate-symbol svg {
    width: 31px;
    height: 31px;
  }

  .gate-intro {
    margin-bottom: 20px;
  }

  .gate-intro h1 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .gate-submit {
    margin-top: 18px;
  }

  .gate-footer {
    min-height: 44px;
    padding: 10px;
  }

}

@media(prefers-reduced-motion:reduce) {
  .gate-input,.gate-submit {
    transition: none;
  }

}

:root {
  --widget-primary: #2563eb;
  --widget-background: #f5f9ff;
  --widget-header: #ffffff;
  --widget-bot: #ffffff;
  --widget-operator: #e9f2ff;
  --widget-text: #10254d;
  --accent-text: #ffffff;
  --widget-line: color-mix(in srgb,var(--widget-text) 12%,transparent);
}

.widget {
  border: 1px solid var(--widget-line);
  border-radius: 18px;
  background: var(--widget-background);
}

header {
  min-height: 72px;
  padding: 14px 16px;
  gap: 10px;
  background: var(--widget-header);
  border-bottom: 1px solid var(--widget-line);
}

.header-title b {
  font-size: 14px;
}

.header-title small {
  font-size: 11px;
}

.icon-button {
  width: 34px;
  height: 36px;
  font-size: 24px;
}

.profile-avatar,.message-avatar {
  background: var(--widget-primary);
  color: var(--accent-text);
  border: 0;
}

.profile-avatar {
  width: 41px;
  height: 41px;
  font-size: 20px;
}

.member-gate {
  background: linear-gradient(var(--widget-header),var(--widget-background));
  padding: 30px 23px 15px;
}

.gate-content {
  width: 100%;
  max-width: 390px;
  margin: auto;
}

.gate-intro {
  text-align: center;
}

.gate-symbol {
  width: 78px;
  height: 78px;
  margin: 20px auto 26px;
  border: 0;
  background: color-mix(in srgb,var(--widget-primary) 9%,var(--widget-header));
  color: var(--widget-primary);
  border-radius: 50%;
  box-shadow: none;
}

.gate-symbol svg {
  width: 40px;
  height: 40px;
}

.gate-intro h1 {
  font-size: 26px;
  letter-spacing: -.8px;
  margin: 0 0 14px;
  line-height: 1.2;
}

.gate-intro p {
  font-size: 14px;
  line-height: 1.8;
  opacity: .7;
  max-width: 290px;
  margin: 0 auto;
}

.gate-form {
  margin: 32px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gate-form label {
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 9px;
}

.gate-input {
  border: 1px solid var(--widget-line);
  background: var(--widget-header);
  border-radius: 9px;
  min-height: 50px;
}

.gate-input input {
  background: transparent;
  color: var(--widget-text);
  font-size: 14px;
}

.gate-hint {
  font-size: 11px;
  line-height: 1.6;
  opacity: .75;
}

.gate-submit {
  margin-top: 22px;
  background: var(--widget-primary);
  color: var(--accent-text);
  border-radius: 9px;
  min-height: 50px;
  box-shadow: 0 5px 15px color-mix(in srgb,var(--widget-primary) 12%,transparent);
  font-size: 14px;
}

.gate-footer {
  font-size: 10px;
  opacity: .6;
  border: 0;
  margin-top: 25px;
}

.home:not(.member-gate) {
  padding: 18px;
}

.banner {
  background: linear-gradient(125deg,color-mix(in srgb,var(--widget-primary) 14%,var(--widget-header)),var(--widget-header));
  padding: 25px 20px;
  border: 0;
  border-radius: 14px;
  min-height: 145px;
}

.banner:after {
  content: '•••';
  position: absolute;
  font-size: 26px;
  letter-spacing: 3px;
  right: 18px;
  bottom: 18px;
  color: var(--widget-primary);
  background: color-mix(in srgb,var(--widget-primary) 12%,var(--widget-header));
  border-radius: 15px;
  padding: 0 12px;
}

.banner h1 {
  max-width: 220px;
  font-size: 25px;
  letter-spacing: -.7px;
  line-height: 1.25;
}

.banner p {
  max-width: 230px;
  font-size: 12px;
}

.quick-links {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 11px;
  margin: 18px 0;
}

.quick-links button {
  position: relative;
  min-height: 120px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 8px;
  background: var(--widget-header);
  border-color: var(--widget-line);
  border-radius: 13px;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
}

.quick-links button span {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb,var(--widget-primary) 9%,var(--widget-header));
}

.quick-links svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-links button i {
  position: absolute;
  right: 10px;
  bottom: 17px;
  font-size: 16px;
}

.quick-links #resetMenu {
  order: -1;
}

.home>h2 {
  display: none;
}

.external-links a,.home select {
  background: var(--widget-header);
  border-color: var(--widget-line);
  font-size: 12px;
}

.primary {
  min-height: 46px;
}

.widget-messages {
  padding: 20px 13px;
  background: var(--widget-background);
}

.bubble {
  background: var(--widget-bot);
  color: var(--widget-text);
  border: 1px solid var(--widget-line);
  font-size: 13px;
  line-height: 1.65;
  border-radius: 14px;
}

.bubble.visitor {
  background: var(--widget-primary);
  color: var(--accent-text);
  border: 0;
}

.bubble.operator:not(.bot) {
  background: var(--widget-operator);
}

.message-avatar {
  width: 29px;
  height: 29px;
  flex-shrink: 0;
}

.reset-card {
  background: var(--widget-header);
  border: 1px solid var(--widget-line);
  border-radius: 14px;
  padding: 17px;
  margin: 14px 0 14px 36px;
  max-width: none;
  width: auto;
  box-shadow: 0 3px 12px #163d7206;
}

.reset-card h3 {
  font-size: 15px;
  margin: 0 0 16px;
  letter-spacing: -.3px;
}

.reset-card label {
  display: block;
  font-size: 12px;
  margin: 12px 0 6px;
}

.reset-card input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--widget-line);
  border-radius: 8px;
  background: var(--widget-background);
  color: var(--widget-text);
  font-size: 13px;
}

.reset-card button {
  width: 100%;
  background: var(--widget-primary);
  color: var(--accent-text);
  border: 0;
  border-radius: 8px;
  min-height: 43px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 650;
}

.reset-card p {
  font-size: 10px;
  line-height: 1.6;
  opacity: .7;
}

.service-identity {
  background: var(--widget-header);
  border-color: var(--widget-line);
  border-radius: 10px;
  font-size: 11px;
}

.service-identity button {
  border: 1px solid var(--widget-line);
  border-radius: 6px;
  padding: 6px 10px;
  background: var(--widget-background);
  color: var(--widget-primary);
}

#widgetForm {
  background: var(--widget-header);
  border-top: 1px solid var(--widget-line);
  gap: 6px;
  padding: 12px 10px;
}

#widgetInput {
  background: var(--widget-background);
  border: 1px solid var(--widget-line);
  color: var(--widget-text);
  min-width: 0;
  min-height: 44px;
  font-size: 13px;
  border-radius: 24px;
  padding: 10px 13px;
}

.send {
  background: var(--widget-primary);
  color: var(--accent-text);
  width: 43px;
  height: 43px;
  border-radius: 50%;
  flex-shrink: 0;
}

#sendStatus {
  background: var(--widget-header);
  font-size: 10px;
  padding: 0 12px 8px;
  margin: 0;
}

.ocean-contacts {
  border: 1px solid var(--widget-line);
  border-radius: 10px;
  background: var(--widget-header);
  padding: 13px;
  margin: 0 0 13px;
  font-size: 12px;
}

.ocean-contacts summary {
  cursor: pointer;
  color: var(--widget-text);
  min-height: 22px;
}

.ocean-contacts .external-links {
  margin-bottom: 0;
}

.ocean-contacts:has(.external-links a:not([hidden])) {
  display: block;
}

.ocean-contacts:not(:has(.external-links a:not([hidden]))) {
  display: none;
}

@media(max-width:480px) {
  input,select {
    font-size: 16px!important;
  }

  .widget {
    border-radius: 0;
    height: 100dvh;
  }

  .member-gate {
    padding: 25px 22px;
  }

  .gate-intro h1 {
    font-size: 25px;
  }

  .widget-messages {
    padding: 18px 10px;
  }

  .reset-card {
    margin-left: 32px;
  }

  .quick-links button {
    min-height: 112px;
  }

  #widgetForm {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

}

@media(max-height:660px) {
  .gate-symbol {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
  }

  .gate-intro h1 {
    font-size: 23px;
  }

  .gate-form {
    margin-top: 20px;
  }

  .gate-submit {
    margin-top: 12px;
  }

  .gate-footer {
    margin-top: 12px;
  }

  .member-gate {
    padding-top: 20px;
  }

}

.gate-content {
  padding: 0;
}

.widget {
  max-width: 460px;
  margin: 0 auto;
}

.icon-button svg,.send svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* Post-chat satisfaction form */
.visitor-feedback{border:1px solid var(--widget-primary,#0e766e);border-radius:14px;padding:16px;margin:14px 0;color:var(--widget-text,#173044);background:var(--widget-background,#fff);width:100%;box-sizing:border-box}.visitor-feedback h3{margin:0 0 12px;font-size:1rem}.visitor-feedback fieldset{border:0;padding:0;margin:0 0 12px;display:flex;gap:6px;flex-wrap:wrap}.visitor-feedback legend{font-size:.8rem;margin-bottom:8px}.visitor-feedback fieldset label{flex:1;min-width:36px;text-align:center;cursor:pointer}.visitor-feedback input[type=radio]{width:auto;display:block;margin:0 auto 5px;accent-color:var(--widget-primary,#0e766e)}.visitor-feedback textarea{display:block;width:100%;box-sizing:border-box;resize:vertical;margin:8px 0 12px;color:inherit;background:transparent;border:1px solid var(--widget-primary,#0e766e);border-radius:8px;padding:8px}.visitor-feedback button{width:100%;background:var(--widget-primary,#0e766e);color:var(--accent-text,#fff);padding:12px;border:0;border-radius:8px;cursor:pointer}.visitor-feedback button:disabled{opacity:.6}.visitor-feedback p{font-size:.85rem;margin:8px 0 0}
