.qm-ecl-floating-button {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 9998;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.32);
  cursor: pointer;
}

.qm-ecl-floating-button:hover,
.qm-ecl-floating-button:focus {
  background: #1d4ed8;
}

.qm-ecl-root[hidden] {
  display: none;
}

.qm-ecl--modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.qm-ecl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.qm-ecl-panel {
  position: relative;
  width: min(100%, 420px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 26px;
  background: #fff;
  color: #172033;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.qm-ecl--inline .qm-ecl-panel {
  box-shadow: none;
}

.qm-ecl-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-size: 22px;
  line-height: 28px;
  cursor: pointer;
}

.qm-ecl-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.25;
  color: #172033;
}

.qm-ecl-form label {
  display: block;
  margin-bottom: 14px;
}

.qm-ecl-form label span {
  display: block;
  margin-bottom: 7px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.qm-ecl-form input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: #172033;
  font-size: 15px;
}

.qm-ecl-form input:focus {
  border-color: #2563eb;
  outline: 2px solid rgba(37, 99, 235, 0.18);
}

.qm-ecl-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.qm-ecl-send-code,
.qm-ecl-submit {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.qm-ecl-send-code {
  min-width: 110px;
  padding: 0 14px;
  white-space: nowrap;
}

.qm-ecl-submit {
  width: 100%;
  margin-top: 4px;
}

.qm-ecl-send-code:hover,
.qm-ecl-submit:hover,
.qm-ecl-send-code:focus,
.qm-ecl-submit:focus {
  background: #1d4ed8;
}

.qm-ecl-send-code:disabled,
.qm-ecl-submit:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.qm-ecl-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.qm-ecl-message--success {
  color: #15803d;
}

.qm-ecl-message--error {
  color: #b91c1c;
}

.qm-ecl-has-status,
.qm-ecl-has-status .headnav,
.qm-ecl-has-status .h-container,
.qm-ecl-has-status .header-r,
.qm-ecl-header-right-mounted {
  overflow: visible !important;
}

.qm-ecl-has-status {
  position: relative;
  z-index: 10000;
}

.qm-ecl-header-right-mounted {
  position: relative;
  z-index: 10001;
}

.qm-ecl-header-buttons-mounted {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  overflow: visible !important;
}

.qm-ecl-header-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  vertical-align: middle;
  z-index: 10002;
}

.qm-ecl-header-login-button {
  min-width: 56px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: #ff6b75;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 42px;
  box-shadow: 0 10px 22px rgba(255, 107, 117, 0.28);
  cursor: pointer;
  white-space: nowrap;
}

.qm-ecl-header-login-button:hover,
.qm-ecl-header-login-button:focus {
  background: #f55763;
  color: #fff;
  outline: none;
}

.qm-ecl-header-profile {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 10003;
}

.qm-ecl-header-avatar-button {
  width: 42px;
  height: 42px;
  border: 2px solid #ff7b84;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  overflow: hidden;
}

.qm-ecl-header-avatar-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.qm-ecl-header-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 210px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: #172033;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 10004;
}

.qm-ecl-header-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 15px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: #fff;
  transform: rotate(45deg);
}

.qm-ecl-header-profile:hover .qm-ecl-header-popover,
.qm-ecl-header-profile:focus-within .qm-ecl-header-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.qm-ecl-header-user {
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
}

.qm-ecl-header-user strong,
.qm-ecl-header-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qm-ecl-header-user strong {
  color: #172033;
  font-size: 15px;
  line-height: 1.4;
}

.qm-ecl-header-user span {
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
}

.qm-ecl-header-logout {
  display: block;
  margin-top: 10px;
  border-radius: 6px;
  padding: 9px 10px;
  background: #f8fafc;
  color: #ef4444;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.qm-ecl-header-logout:hover,
.qm-ecl-header-logout:focus {
  background: #fff1f2;
  color: #dc2626;
}

@media (max-width: 480px) {
  .qm-ecl-floating-button {
    right: 16px;
    bottom: 18px;
  }

  .qm-ecl-panel {
    padding: 22px;
  }

  .qm-ecl-code-row {
    grid-template-columns: 1fr;
  }

  .qm-ecl-send-code {
    width: 100%;
  }

  .qm-ecl-header-status {
    margin-right: 8px;
  }

  .qm-ecl-header-login-button {
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
    line-height: 38px;
  }

  .qm-ecl-header-avatar-button {
    width: 38px;
    height: 38px;
  }
}
