/* ============================================================
 * Custom HBE styles — minimal, no animations, matches blog theme
 * ============================================================ */

.hbe,
.hbe:after,
.hbe:before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.hbe-container {
  margin: 0 auto;
}

.hbe-content {
  text-align: left;
  font-size: 100%;
  padding: 1.5rem 0;
}

.hbe-form {
  margin: 0;
  padding: 0;
  width: 20rem;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ---- input ---- */
.hbe-input {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 0 0.75rem;
  width: 100%;
  vertical-align: top;
}

.hbe-input-field {
  line-height: normal;
  font-size: 0.95rem;
  margin: 0;
  display: block;
  float: none;
  width: 100%;
  padding: 0.5rem 0;
  background: transparent;
  color: #333;
  font-weight: 400;
  font-family: "JetBrains Mono", "Menlo", "Meslo LG", monospace;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.2s;
}

.hbe-input-field:focus {
  border-bottom-color: #3498db;
  outline: none;
}

.hbe-input-field::placeholder {
  color: #999;
  font-weight: 400;
}

/* ---- button ---- */
.hbe-button {
  display: inline-block;
  align-self: center;
  flex-grow: 0;
  margin: 0.5rem 0 1rem;
  padding: 0.4rem 1.5rem;
  width: auto;
  max-width: 100%;
  min-width: auto;
  height: auto;
  line-height: 1.5;
  font-size: 0.85rem;
  font-family: "JetBrains Mono", "Menlo", "Meslo LG", monospace;
  font-weight: 500;
  color: #3498db;
  text-align: center;
  text-indent: 0;
  text-shadow: none;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  background: transparent;
  border: 1.5px solid #3498db;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  transition: background 0.15s, color 0.15s;
}

.hbe-button:hover,
.hbe-button:focus {
  background: #3498db;
  color: #fff;
  box-shadow: none;
  outline: none;
}

.hbe-button:active {
  top: 0;
  box-shadow: none;
}

.hbe-button:after {
  display: none;
  content: none;
}

.hbe-button:disabled,
.hbe-button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.7;
}

.hbe-button[aria-busy="true"]::after {
  content: "";
  display: inline-block;
  margin-left: 0.5em;
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.15em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: hbe-spin 0.7s linear infinite;
}

.hbe-button-hidden {
  display: none;
}

@keyframes hbe-spin {
  to { transform: rotate(360deg); }
}

/* ---- error ---- */
.hbe-error {
  width: 100%;
  min-height: 2.4em;
  margin: 0.25rem 0;
  padding: 0;
  color: #e74c3c;
  font-size: 0.8rem;
  line-height: 1.45;
  font-family: "JetBrains Mono", "Menlo", "Meslo LG", monospace;
  background: transparent;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hbe-error:not(:empty) {
  background: transparent;
  border-radius: 0;
}

/* ---- dark mode ---- */
@media (prefers-color-scheme: dark) {
  .hbe-input-field {
    background: transparent;
    color: #e6e6e6;
    border-bottom-color: #444;
  }
  .hbe-input-field:focus {
    border-bottom-color: #3498db;
  }
  .hbe-button {
    color: #5ba4e6;
    border-color: #5ba4e6;
  }
  .hbe-button:hover,
  .hbe-button:focus {
    background: #5ba4e6;
    color: #1a1a1a;
  }
  .hbe-error {
    color: #ff6b6b;
  }
}
