/* ===============================
   HB Domains – Dark UI
   Musta + punainen, modal teksti valkoinen
   =============================== */

.hbdom {
  --hbdom-accent: #d6111e;
  --hbdom-card-bg: #141417;
  --hbdom-border: #242428;
  --hbdom-text: #ffffff;
  --hbdom-muted: #9ca3af;
  --hbdom-shadow: 0 10px 30px rgba(0,0,0,0.65);
  color: var(--hbdom-text);
}

/* Search */
.hbdom-search {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hbdom-search__input {
  background: #0f0f12;
  color: var(--hbdom-text);
  border: 1px solid var(--hbdom-border);
  border-radius: 12px;
  padding: 12px 14px;
  width: min(420px, 100%);
}

.hbdom-search__input::placeholder { color: var(--hbdom-muted); }

.hbdom-search__input:focus {
  outline: none;
  border-color: var(--hbdom-accent);
  box-shadow: 0 0 0 3px rgba(214,17,30,0.35);
}

.hbdom-search__button,
.hbdom-btn {
  background: linear-gradient(135deg, #d6111e, #9f0d16);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.hbdom-search__button:hover,
.hbdom-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(214,17,30,0.45);
}

/* Count */
.hbdom-count {
  margin-bottom: 20px;
  font-weight: 900;
  color: #000 !important;
}

/* Grid */
.hbdom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

/* Card */
.hbdom-card {
  background: radial-gradient(circle at top, #1a1a1f, var(--hbdom-card-bg));
  border: 1px solid var(--hbdom-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--hbdom-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.hbdom-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.85);
}

.hbdom-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #1f1f24;
}

.hbdom-card__title {
  font-size: 19px;
  color: var(--hbdom-accent);
  margin: 4px 0 0;
}

.hbdom-card__excerpt {
  color: var(--hbdom-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Share */
.hbdom-card__share {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hbdom-card__shareLabel {
  font-size: 12px;
  font-weight: 900;
  color: var(--hbdom-muted);
}

.hbdom-share-btn {
  background: #0f0f12;
  border: 1px solid #2a2a2f;
  color: var(--hbdom-accent);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease;
}

.hbdom-share-btn:hover {
  background: rgba(214,17,30,0.15);
  box-shadow: 0 0 0 2px rgba(214,17,30,0.25);
}

/* Pagination */
.hbdom-pagination {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hbdom-page {
  background: #0f0f12;
  border: 2px solid var(--hbdom-accent);
  color: var(--hbdom-accent);
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: all .15s ease;
}

.hbdom-page:hover { background: var(--hbdom-accent); color: #fff; }

.hbdom-page.is-active {
  background: var(--hbdom-accent);
  color: #fff;
  cursor: default;
}

/* Modal */
.hbdom-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.hbdom-modal.is-open { display: block; }

.hbdom-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(2px);
}

.hbdom-modal__content {
  position: relative;
  background: radial-gradient(circle at top, #1b1b20, #0e0e11);
  color: #ffffff;

  width: min(880px, calc(100% - 24px));
  margin: 48px auto;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid #2a2a2f;
  box-shadow: 0 25px 80px rgba(0,0,0,0.9);

  max-height: calc(100vh - 96px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.hbdom-modal__close {
  position: sticky;
  top: 6px;
  float: right;
  font-size: 34px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Modal content */
.hbdom-modal-title { color: var(--hbdom-accent); margin-bottom: 14px; }

.hbdom-modal-image {
  max-width: 100%;
  border-radius: 16px;
  margin-bottom: 16px;
  border: 1px solid #242428;
}

.hbdom-modal-share {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hbdom-modal-share__label { font-weight: 900; color: var(--hbdom-muted); }

.hbdom-modal-body { color: #ffffff; line-height: 1.7; }

/* Force all modal text to white (WP content can include many tags) */
.hbdom-modal__content,
.hbdom-modal__content p,
.hbdom-modal__content li,
.hbdom-modal__content span,
.hbdom-modal__content div {
  color: #ffffff;
}

/* Links in modal */
.hbdom-modal__content a {
  color: #ff3b45;
  font-weight: 800;
  text-decoration: underline;
}

.hbdom-modal__content a:hover { color: #ff6a72; }

/* Scroll lock */
body.hbdom-modal-open { overflow: hidden; }
