.aiterich-consult-trigger {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: #ffffff;
  background: #0b4ea2;
  box-shadow: 0 8px 20px rgba(8, 25, 56, 0.25);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.aiterich-consult-trigger[hidden],
.aiterich-consult-trigger.ace-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.aiterich-consult-trigger:focus-visible,
.ace-close:focus-visible,
.ace-action:focus-visible {
  outline: 2px solid #0b4ea2;
  outline-offset: 2px;
}

.ace-icon {
  font-size: 16px;
}

.aiterich-consult-panel {
  position: fixed;
  right: 16px;
  bottom: 82px;
  z-index: 9999;
  width: min(360px, calc(100vw - 24px));
  border: 1px solid #d6dde9;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(12, 36, 74, 0.24);
  padding: 14px;
  color: #1e2e47;
}

.ace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ace-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.ace-close {
  border: 0;
  border-radius: 8px;
  background: #eff4fb;
  color: #1e2e47;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.ace-service-name {
  margin: 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.ace-hours,
.ace-promise,
.ace-offline,
.ace-status {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.45;
}

.ace-offline {
  color: #9a3a03;
  background: #fff4e9;
  border-radius: 8px;
  padding: 6px 8px;
}

.ace-qr-wrap {
  margin-top: 8px;
  margin-bottom: 10px;
  border: 1px dashed #b7c4d8;
  border-radius: 12px;
  display: grid;
  place-items: center;
  min-height: 120px;
  background: #f8fbff;
}

.ace-qr {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.ace-qr-placeholder {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #6a7b95;
  background: #e9f0fb;
  font-size: 28px;
  font-weight: 700;
}

.ace-actions {
  display: grid;
  gap: 8px;
}

.ace-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #c4d2e9;
  border-radius: 10px;
  min-height: 38px;
  text-decoration: none;
  color: #10356d;
  background: #ffffff;
  font-size: 13px;
}

.ace-action-primary {
  border: 1px solid #0b4ea2;
  background: #0b4ea2;
  color: #ffffff;
}

@media (max-width: 768px) {
  .aiterich-consult-trigger {
    right: 12px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
    padding: 0;
    gap: 0;
    justify-content: center;
    font-size: 0;
  }

  .ace-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .ace-icon {
    font-size: 18px;
  }

  .aiterich-consult-panel {
    right: 12px;
    left: 12px;
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + 68px);
    width: auto;
    max-height: calc(100dvh - 164px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
