/* Custom Butterfly-native card style for hexo-blog-encrypt v4 */
#article-container #hexo-blog-encrypt.hbe-container {
  max-width: 520px;
  margin: 28px auto 36px;
  padding: 28px 28px 22px;
  background: rgba(73, 177, 245, 0.04);
  border: 1px solid rgba(73, 177, 245, 0.22);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(7, 17, 27, 0.04);
  overflow: visible;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-content {
  padding: 0;
  font-size: 1rem;
  text-align: center;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-content::before {
  content: "";
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background-color: rgba(73, 177, 245, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2349b1f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-input,
#article-container #hexo-blog-encrypt.hbe-container .hbe-input-default {
  position: static;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-input-label,
#article-container #hexo-blog-encrypt.hbe-container .hbe-input-label-default {
  position: static;
  float: none;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--font-color, #4c4948);
  pointer-events: auto;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-input-label-default::before,
#article-container #hexo-blog-encrypt.hbe-container .hbe-input-label-default::after {
  display: none;
  content: none;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-input-label-content,
#article-container #hexo-blog-encrypt.hbe-container .hbe-input-label-content-default,
#article-container #hexo-blog-encrypt.hbe-container .hbe-input-field-default:focus + .hbe-input-label-default .hbe-input-label-content-default,
#article-container #hexo-blog-encrypt.hbe-container .hbe-input--filled .hbe-input-label-default .hbe-input-label-content-default {
  position: static;
  padding: 0;
  color: inherit;
  transform: none;
  -webkit-transform: none;
  transition: none;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-input-field,
#article-container #hexo-blog-encrypt.hbe-container .hbe-input-field-default,
#article-container #hexo-blog-encrypt.hbe-container .hbe-input-field-default:focus,
#article-container #hexo-blog-encrypt.hbe-container .hbe-input--filled .hbe-input-field-default {
  position: static;
  float: none;
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 14px;
  opacity: 1;
  font-size: 15px;
  font-family: inherit;
  font-weight: 400;
  color: var(--font-color, #4c4948);
  background: var(--card-bg, #ffffff);
  border: 1.5px solid #dcdfe6;
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-input-field-default:focus {
  border-color: #49b1f5;
  box-shadow: 0 0 0 3px rgba(73, 177, 245, 0.18);
  outline: none;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-button {
  position: relative;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 180px;
  height: 40px;
  margin: 2px auto 0;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.08em;
  text-align: center;
  text-indent: 0;
  color: #ffffff;
  background: #49b1f5;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(73, 177, 245, 0.28);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-button:hover,
#article-container #hexo-blog-encrypt.hbe-container .hbe-button:focus {
  background: #33a3ef;
  box-shadow: 0 4px 12px rgba(73, 177, 245, 0.36);
  transform: translateY(-1px);
  outline: none;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-button:active {
  top: 0;
  transform: translateY(0);
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-button::after {
  display: none;
  content: none;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-button[aria-busy="true"]::after {
  content: "";
  display: inline-block;
  position: static;
  margin-left: 8px;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 1;
  animation: hbe-spin 0.7s linear infinite;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-error {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  font-family: inherit;
  text-align: center;
  background: transparent;
}

#article-container #hexo-blog-encrypt.hbe-container .hbe-error:not(:empty) {
  margin-top: 2px;
  padding: 8px 12px;
  color: #cf1322;
  background: rgba(207, 19, 34, 0.08);
  border: 1px solid rgba(207, 19, 34, 0.2);
  border-radius: 6px;
}

/* Butterfly dark mode support */
html[data-theme="dark"] #article-container #hexo-blog-encrypt.hbe-container {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(73, 177, 245, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] #article-container #hexo-blog-encrypt.hbe-container .hbe-content::before {
  background-color: rgba(73, 177, 245, 0.16);
}

html[data-theme="dark"] #article-container #hexo-blog-encrypt.hbe-container .hbe-input-field,
html[data-theme="dark"] #article-container #hexo-blog-encrypt.hbe-container .hbe-input-field-default,
html[data-theme="dark"] #article-container #hexo-blog-encrypt.hbe-container .hbe-input-field-default:focus,
html[data-theme="dark"] #article-container #hexo-blog-encrypt.hbe-container .hbe-input--filled .hbe-input-field-default {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] #article-container #hexo-blog-encrypt.hbe-container .hbe-input-field-default:focus {
  border-color: #49b1f5;
  box-shadow: 0 0 0 3px rgba(73, 177, 245, 0.25);
}

html[data-theme="dark"] #article-container #hexo-blog-encrypt.hbe-container .hbe-error:not(:empty) {
  color: #ff7875;
  background: rgba(255, 120, 117, 0.12);
  border-color: rgba(255, 120, 117, 0.28);
}

@media (max-width: 600px) {
  #article-container #hexo-blog-encrypt.hbe-container {
    margin: 18px auto 24px;
    padding: 22px 18px 18px;
  }

  #article-container #hexo-blog-encrypt.hbe-container .hbe-button {
    max-width: 100%;
  }
}
