/* Wrapper */
.msb-wrapper {
  max-width: 560px;
  margin: 20px auto;
  padding: 18px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(16,24,40,0.04);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111827;
}

/* Title */
.msb-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 700;
}

/* Input + Button */
.msb-inputwrap {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
#msb-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
}
#msb-input:focus { box-shadow: 0 0 0 4px rgba(59,130,246,0.08); border-color: #3b82f6; }
.msb-btn, #msb-check {
  padding: 10px 14px;
  background: #0b69d0;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}
.msb-btn:hover, #msb-check:hover { background: #055bb0; }

/* FAQ dropdown (standout) */
.msb-faq { margin-top: 8px; }
.msb-faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg,#f5f9ff,#eef6ff);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d7e9ff;
  color: #064e9a;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.msb-caret { transition: transform 0.25s ease; font-size: 14px; }
.msb-faq-header.active .msb-caret { transform: rotate(180deg); }
.msb-faq-content {
  display: none;
  margin-top: 8px;
  padding: 12px;
  background: #fbfdff;
  border-radius: 8px;
  border: 1px solid #eef3f8;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.45;
}

/* Result */
.msb-result { margin-top: 14px; font-size: 15px; }
.msb-error { color: #c02424; font-weight: 700; }

/* Bars */
.msb-bars { display: flex; gap: 6px; margin-top: 8px; }
.msb-bars .bar {
  width: 12px;
  height: 20px;
  background: #eef2f7;
  border-radius: 3px;
  transition: background 0.2s ease, transform 0.18s ease;
  display: inline-block;
}
.msb-bars .bar.filled { background: #0b69d0; transform: translateY(-2px); }

/* Tooltip */
.msb-tooltip { position: relative; display: inline-block; margin-left: 8px; color: #0b69d0; font-weight: 700; cursor: help; }
.msb-tooltiptext {
  visibility: hidden;
  opacity: 0;
  width: 260px;
  background: rgba(17,24,39,0.95);
  color: #fff;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 135%;
  transition: opacity 0.18s ease;
  z-index: 99;
  line-height: 1.4;
}
.msb-tooltip:hover .msb-tooltiptext { visibility: visible; opacity: 1; }

/* Network selector */
#msb-network-wrap { margin-top: 14px; display: flex; gap: 10px; align-items: center; }
#msb-network { padding: 8px 10px; border-radius: 8px; border: 1px solid #d8dde6; }

/* Speed cards */
.msb-speed { margin-top: 12px; }
.msb-speed-grid { display: flex; gap: 12px; margin-top: 8px; }
.msb-speed-card {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #eef3f8;
  background: linear-gradient(180deg,#ffffff,#fbfdff);
  font-size: 14px;
}
.msb-speed-card h4 { margin: 0 0 8px 0; font-size: 15px; color: #0b69d0; }
.msb-speed-card ul { padding-left: 18px; margin: 0; }

/* Hidden/visible helpers */
.msb-hidden { display: none !important; }
.msb-visible { display: block !important; }

/* small measured label */
.msb-dbm-value { margin-top: 8px; color: #4b5563; font-size: 13px; }
