.ys-cb-widget {
  position: relative;
  display: inline-block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #1f2937;
}

.ys-cb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #c7cdd6;
  border-radius: 999px;
  background: #ffffff;
  color: #1f2937;
  font: inherit;
  cursor: pointer;
}

.ys-cb-btn:hover {
  border-color: #8a94a3;
}

.ys-cb-popover {
  box-sizing: border-box;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  width: 320px;
  max-width: calc(100vw - 16px);
  padding: 18px;
  border: 1px solid #dfe3ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.ys-cb-popover[hidden] {
  display: none;
}

.ys-cb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ys-cb-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.ys-cb-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -4px -4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
}

.ys-cb-close-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.ys-cb-sub {
  margin: 6px 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #4b5563;
}

.ys-cb-form {
  display: block;
}

.ys-cb-label {
  display: block;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
}

.ys-cb-input {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 12px;
  padding: 9px 10px;
  border: 1px solid #c7cdd6;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  font: inherit;
}

.ys-cb-hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ys-cb-status {
  margin: 0 0 10px;
  min-height: 18px;
  font-size: 13px;
  line-height: 1.4;
  color: #b42318;
}

.ys-cb-status.ys-cb-success {
  color: #067647;
}

.ys-cb-ok2 {
  display: block;
  margin-top: 4px;
}

.ys-cb-send {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #1f6feb;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ys-cb-send:disabled {
  opacity: 0.6;
  cursor: default;
}

.ys-cb-btn:focus-visible,
.ys-cb-close:focus-visible,
.ys-cb-input:focus-visible,
.ys-cb-send:focus-visible {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
}

@media (max-width: 639px) {
  .ys-cb-popover {
    position: fixed;
    inset: 0;
    width: auto;
    max-width: none;
    border: 0;
    border-radius: 0;
    padding: 20px;
    overflow-y: auto;
  }
}
