/* The IP lookup tool: the visitor's own address, the query form and the result
   panels. Hero, content sections, cards and FAQ come from tool_page.css. */

/* The starfield behind the hero is a full-size absolutely positioned image at
   z-index 0, so anything interactive on top of it needs its own stacking
   context or the image swallows every click. */
.ipl {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 auto 56px auto;
  padding: 0 16px;
}

.ipl-self {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.ipl-self-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.ipl-self-value {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
}

.ipl-self-value--muted {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
}

.ipl-self-lookup {
  margin-left: auto;
}

.ipl-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ipl-copy:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* Form */

.ipl-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.ipl-field {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  min-width: 0;
}

.ipl-field-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}

.ipl-field input {
  width: 100%;
  border-radius: 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 22px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ipl-field input:focus {
  outline: none;
  border-color: #8c46ff;
  background: rgba(0, 0, 0, 0.42);
}

.ipl-field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ipl-submit {
  flex: 0 0 auto;
  height: 46px;
}

.ipl-submit:disabled,
.ipl-self-lookup:disabled {
  opacity: 0.5;
  cursor: default;
}

.ipl-submit.is-busy {
  cursor: progress;
}

.ipl-message {
  margin: 14px 0 0 0;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 21px;
  color: #fff;
  background: rgba(110, 0, 255, 0.18);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
}

.ipl-message.is-error {
  background: rgba(255, 88, 88, 0.16);
  border-color: rgba(255, 120, 120, 0.34);
}

/* Results */

.ipl-results {
  margin-top: 20px;
}

.ipl-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 6px;
}

.ipl-heading-address {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
}

.ipl-heading-kind {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(110, 0, 255, 0.24);
  color: #d9b3ff;
  font-size: 12px;
}

.ipl-note {
  margin: 0 0 16px 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 22px;
}

.ipl-panel {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.ipl-panel-title {
  margin: 0 0 12px 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.ipl-panel-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ipl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 0;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}

.ipl-row:first-child {
  border-top: none;
}

.ipl-row-label {
  flex: 0 0 190px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.ipl-row-value {
  flex: 1 1 200px;
  min-width: 0;
  color: #fff;
  font-size: 14px;
  line-height: 22px;
  word-break: break-word;
}

a.ipl-row-value {
  color: #c9a2ff;
  text-decoration: underline;
}

/* The long ones -- a 128-bit address in binary, an exploded IPv6 -- need to
   wrap anywhere rather than push the panel wider than the page. */
.ipl-row-value.is-mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}

.ipl-attribution {
  margin: 18px 0 0 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12.5px;
  line-height: 19px;
}

.ipl-attribution a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .ipl-self-lookup {
    margin-left: 0;
    width: 100%;
  }

  .ipl-submit {
    width: 100%;
  }

  .ipl-row-label {
    flex: 1 1 100%;
  }

  .ipl-heading-address {
    font-size: 20px;
  }
}
