/*
 * Rad Web Hosting Looking Glass theme v2
 * Target: Hybula Looking Glass 1.3.x / Bootstrap 5.3.x
 * Shared across DAL-1, NYC-1, PAR-1 and TYO-1.
 */

:root,
[data-bs-theme="light"] {
  --rwh-primary: #0c71b9;
  --rwh-primary-rgb: 12, 113, 185;
  --rwh-cyan: #0a89c0;
  --rwh-violet: #312c7e;
  --rwh-navy: #07152f;
  --rwh-navy-2: #0b2348;
  --rwh-ink: #12213b;
  --rwh-muted: #65758c;
  --rwh-border: rgba(14, 42, 76, .12);
  --rwh-card: rgba(255, 255, 255, .92);
  --rwh-canvas: #f4f8fc;
  --rwh-soft: #eaf3fa;
  --rwh-shadow: 0 18px 54px rgba(9, 33, 61, .10);
  --bs-primary: var(--rwh-primary);
  --bs-primary-rgb: var(--rwh-primary-rgb);
  --bs-link-color: var(--rwh-primary);
  --bs-link-hover-color: #075a94;
  --bs-body-bg: var(--rwh-canvas);
  --bs-body-color: var(--rwh-ink);
  --bs-border-color: var(--rwh-border);
}

[data-bs-theme="dark"] {
  --rwh-primary: #49aef0;
  --rwh-primary-rgb: 73, 174, 240;
  --rwh-cyan: #48c0e8;
  --rwh-violet: #5c55ba;
  --rwh-navy: #050d1d;
  --rwh-navy-2: #0a1934;
  --rwh-ink: #eef6ff;
  --rwh-muted: #9fb2ca;
  --rwh-border: rgba(255, 255, 255, .10);
  --rwh-card: rgba(8, 22, 46, .88);
  --rwh-canvas: #050d1d;
  --rwh-soft: #0c1c37;
  --rwh-shadow: 0 22px 65px rgba(0, 0, 0, .30);
  --bs-primary: var(--rwh-primary);
  --bs-primary-rgb: var(--rwh-primary-rgb);
  --bs-link-color: #75c8fa;
  --bs-link-hover-color: #a9dfff;
  --bs-body-bg: var(--rwh-canvas);
  --bs-body-color: var(--rwh-ink);
  --bs-border-color: var(--rwh-border);
}

html {
  min-height: 100%;
  background: var(--rwh-canvas);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.01em;
  background:
    radial-gradient(circle at 5% 10%, rgba(var(--rwh-primary-rgb), .15), transparent 28rem),
    radial-gradient(circle at 95% 18%, rgba(49, 44, 126, .12), transparent 30rem),
    var(--rwh-canvas);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background-image:
    linear-gradient(rgba(var(--rwh-primary-rgb), .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--rwh-primary-rgb), .045) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Hide Hybula's stock masthead only when our custom hero is present. */
body:has(.rwh-site-hero) .main-container > header {
  display: none !important;
}

.main-container {
  width: min(1180px, calc(100% - 32px)) !important;
  max-width: 1180px;
  padding: 34px 0 0 !important;
}

/* Fallback styling if the custom hero is disabled. */
.main-container > header {
  gap: 24px;
  margin-bottom: 28px !important;
  padding: 10px 4px 24px !important;
  border-bottom-color: var(--rwh-border) !important;
}

.main-container > header img,
.rwh-hero-brand img {
  width: auto !important;
  max-width: min(275px, 100%);
  height: auto !important;
  max-height: 60px;
  object-fit: contain;
}

main > .row,
main > .row.pb-5,
main > .row.mb-5 {
  margin-right: 0;
  margin-left: 0;
  margin-bottom: 0 !important;
  padding-bottom: 26px !important;
}

.card {
  position: relative;
  overflow: visible;
  border: 1px solid var(--rwh-border) !important;
  border-radius: 20px !important;
  background: var(--rwh-card) !important;
  box-shadow: var(--rwh-shadow) !important;
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.card::before {
  content: "";
  display: block;
  height: 3px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--rwh-primary), var(--rwh-cyan), var(--rwh-violet));
}

/*
 * Bootstrap's Locations control is an absolutely positioned dropdown inside
 * the Network card. The original v2 theme used overflow:hidden on .card to
 * clip the decorative top edge, which also clipped the bottom of that menu.
 * Keep cards overflow-visible and raise whichever card owns an open menu so
 * the dropdown can paint cleanly above adjacent cards.
 */
.card:has(.dropdown-menu.show) {
  z-index: 1055;
}

.card .dropdown-menu {
  z-index: 1060;
}

.card-body {
  padding: clamp(20px, 3vw, 32px) !important;
}

.card-title,
h1.fs-4.card-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px !important;
  font-size: clamp(1.12rem, 1.6vw, 1.42rem) !important;
  font-weight: 800;
  letter-spacing: -.025em;
}

.card-title::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rwh-primary), var(--rwh-cyan));
  box-shadow: 0 0 0 5px rgba(var(--rwh-primary-rgb), .11);
}

label,
.text-muted {
  color: var(--rwh-muted) !important;
}

label.mb-2.text-muted {
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.form-control,
.form-select,
.input-group-text {
  min-height: 46px;
  border-color: var(--rwh-border) !important;
  background-color: color-mix(in srgb, var(--rwh-card) 90%, transparent 10%) !important;
  color: var(--bs-body-color) !important;
}

.form-control,
.form-select {
  border-radius: 11px;
}

.input-group > .input-group-text:first-child,
.input-group > label.input-group-text:first-child {
  border-radius: 11px 0 0 11px;
}

.input-group > .form-control:last-child,
.input-group > .form-select:last-child,
.input-group > .btn:last-child {
  border-radius: 0 11px 11px 0;
}

.input-group-text {
  color: var(--rwh-muted) !important;
  font-weight: 700;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--rwh-primary-rgb), .65) !important;
  box-shadow: 0 0 0 .22rem rgba(var(--rwh-primary-rgb), .12) !important;
}

.btn {
  min-height: 42px;
  border-radius: 10px;
  padding-inline: 15px;
  font-weight: 750;
  letter-spacing: -.01em;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  border-color: transparent !important;
  background: linear-gradient(135deg, #0c71b9, #0a89c0) !important;
  box-shadow: 0 9px 22px rgba(12, 113, 185, .22);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #0a64a6, #087aa9) !important;
  box-shadow: 0 12px 28px rgba(12, 113, 185, .28);
}

.btn-outline-secondary {
  border-color: var(--rwh-border) !important;
  color: var(--bs-body-color) !important;
  background: color-mix(in srgb, var(--rwh-card) 84%, transparent 16%);
}

.btn-outline-secondary:hover {
  border-color: var(--rwh-primary) !important;
  color: #fff !important;
  background: var(--rwh-primary) !important;
}

.dropdown-menu {
  padding: 8px;
  border: 1px solid var(--rwh-border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--rwh-card) 97%, transparent 3%);
  box-shadow: 0 18px 45px rgba(11, 22, 48, .16);
  backdrop-filter: blur(18px);
}

.dropdown-item {
  border-radius: 8px;
  padding: 9px 11px;
}

code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: .48rem .68rem;
  border: 1px solid var(--rwh-border);
  border-radius: 9px;
  background: rgba(var(--rwh-primary-rgb), .065);
  color: var(--bs-body-color);
}

#outputCard {
  border: 1px solid rgba(72, 192, 232, .18) !important;
  border-radius: 14px !important;
  background: #061020 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04) !important;
}

#outputCard::before {
  display: none;
}

#outputContent {
  min-height: 90px;
  max-height: 560px;
  overflow: auto;
  font-size: .86rem;
  line-height: 1.65;
  color: #d8ebf8;
  white-space: pre-wrap;
  word-break: break-word;
}

.form-check-input:checked {
  border-color: var(--rwh-primary);
  background-color: var(--rwh-primary);
}

.alert-danger {
  border-radius: 12px;
}

/* Hero */
.rwh-site-hero {
  position: relative;
  width: 100%;
  padding: 26px 16px 0;
}

.rwh-hero-shell {
  position: relative;
  overflow: hidden;
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 77% 12%, rgba(72, 192, 232, .21), transparent 18rem),
    radial-gradient(circle at 95% 98%, rgba(92, 85, 186, .36), transparent 23rem),
    linear-gradient(135deg, #06142d 0%, #0b2348 56%, #0b5f93 135%);
  box-shadow: 0 26px 74px rgba(5, 13, 29, .24);
}

.rwh-hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 100%);
}

.rwh-hero-shell::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -145px;
  top: -150px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.017);
}

.rwh-hero-topbar,
.rwh-hero-grid,
.rwh-pop-nav {
  position: relative;
  z-index: 1;
}

.rwh-hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(24px, 5vw, 54px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.rwh-hero-brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.rwh-hero-brand img {
  max-height: 48px;
  max-width: 245px;
}

.rwh-network-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(237, 247, 255, .74);
  font-size: .79rem;
  font-weight: 700;
}

.rwh-network-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5fe0a2;
  box-shadow: 0 0 0 5px rgba(95, 224, 162, .12);
}

.rwh-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .65fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  padding: clamp(38px, 6vw, 70px) clamp(24px, 5vw, 54px) clamp(34px, 5vw, 58px);
}

.rwh-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: #8ed8ff;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rwh-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: #49aef0;
}

.rwh-eyebrow b {
  color: rgba(255,255,255,.38);
  font-weight: 500;
}

.rwh-hero-copy h1 {
  max-width: 720px;
  margin: 0 0 17px;
  font-size: clamp(2.35rem, 5.2vw, 4.75rem);
  line-height: .95;
  font-weight: 850;
  letter-spacing: -.062em;
}

.rwh-hero-copy p {
  max-width: 690px;
  margin: 0;
  color: rgba(236, 247, 255, .76);
  font-size: clamp(1rem, 1.45vw, 1.14rem);
  line-height: 1.72;
}

.rwh-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.rwh-capabilities span {
  display: inline-flex;
  align-items: center;
  min-height: 33px;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.88);
  font-size: .78rem;
  font-weight: 720;
  backdrop-filter: blur(8px);
}

.rwh-edge-card {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(4, 16, 39, .45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 50px rgba(0,0,0,.12);
  backdrop-filter: blur(14px);
}

.rwh-edge-label {
  color: rgba(255,255,255,.55);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.rwh-edge-code {
  margin-top: 13px;
  color: #77ccff;
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .14em;
}

.rwh-edge-city {
  margin-top: 3px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 820;
  letter-spacing: -.045em;
}

.rwh-edge-region {
  margin-top: 2px;
  color: rgba(255,255,255,.64);
  font-size: .88rem;
}

.rwh-edge-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .75rem;
}

.rwh-edge-meta + .rwh-edge-meta {
  margin-top: 10px;
  padding-top: 10px;
}

.rwh-edge-meta span {
  color: rgba(255,255,255,.48);
}

.rwh-edge-meta strong {
  overflow-wrap: anywhere;
  color: rgba(255,255,255,.88);
  font-weight: 700;
  text-align: right;
}

.rwh-pop-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(3, 13, 31, .22);
}

.rwh-pop-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 16px clamp(14px, 2.5vw, 24px);
  border-right: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.67);
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

.rwh-pop-link:last-child {
  border-right: 0;
}

.rwh-pop-link:hover,
.rwh-pop-link.is-active {
  color: #fff;
  background: rgba(255,255,255,.055);
}

.rwh-pop-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
}

.rwh-pop-link.is-active .rwh-pop-dot {
  background: #4dc4f4;
  box-shadow: 0 0 0 5px rgba(77,196,244,.10);
}

.rwh-pop-link > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  font-size: .78rem;
  line-height: 1.25;
}

.rwh-pop-link b {
  margin-bottom: 2px;
  color: inherit;
  font-size: .72rem;
  letter-spacing: .09em;
}

/* Benchmark-style closing CTA */
.rwh-benchmark-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
  margin: 3px 0 28px;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--rwh-border);
  border-radius: 20px;
  background:
    radial-gradient(circle at 95% 0%, rgba(var(--rwh-primary-rgb), .14), transparent 18rem),
    var(--rwh-card);
  box-shadow: var(--rwh-shadow);
}

.rwh-benchmark-cta .rwh-eyebrow {
  color: var(--rwh-primary);
  margin-bottom: 11px;
}

.rwh-benchmark-cta h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
  line-height: 1.08;
  font-weight: 820;
  letter-spacing: -.04em;
}

.rwh-benchmark-cta p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--rwh-muted);
  line-height: 1.65;
}

.rwh-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 180px;
}

footer {
  margin-top: 8px !important;
  margin-bottom: 16px !important;
  padding: 20px 4px !important;
  border-top: 1px solid var(--rwh-border) !important;
  color: var(--rwh-muted) !important;
  font-size: .82rem;
}

footer img[src*="shields.io"] {
  opacity: .58;
  filter: saturate(.2);
}

.rwh-lg-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  color: var(--rwh-muted);
  font-size: .78rem;
}

.rwh-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px;
}

.rwh-footer-inner a {
  color: var(--rwh-primary);
  text-decoration: none;
  font-weight: 720;
}

.rwh-footer-tagline {
  text-align: center;
}

@media (max-width: 900px) {
  .rwh-hero-grid {
    grid-template-columns: 1fr;
  }

  .rwh-edge-card {
    max-width: 520px;
  }

  .rwh-pop-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .rwh-pop-link:nth-child(2) {
    border-right: 0;
  }

  .rwh-pop-link:nth-child(-n+2) {
    border-bottom: 1px solid rgba(255,255,255,.07);
  }

  .rwh-benchmark-cta {
    grid-template-columns: 1fr;
  }

  .rwh-cta-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 767.98px) {
  .rwh-site-hero {
    padding: 12px 10px 0;
  }

  .rwh-hero-shell {
    border-radius: 19px;
  }

  .rwh-hero-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }

  .rwh-hero-brand img {
    max-width: 220px;
  }

  .rwh-hero-grid {
    gap: 28px;
    padding: 34px 20px 28px;
  }

  .rwh-hero-copy h1 {
    font-size: clamp(2.35rem, 14vw, 3.7rem);
  }

  .rwh-pop-nav {
    grid-template-columns: 1fr 1fr;
  }

  .rwh-pop-link {
    padding: 14px 15px;
  }

  .main-container {
    width: min(100% - 20px, 1180px) !important;
    padding-top: 22px !important;
  }

  .main-container > header {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .main-container > header .col-8,
  .main-container > header .col-4 {
    width: 100%;
  }

 .card {
    border-radius: 17px !important;
  }

  .btn-group.input-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .btn-group.input-group > .btn {
    width: 100%;
    border-radius: 9px !important;
  }

  .rwh-benchmark-cta {
    border-radius: 17px;
  }

  .rwh-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .rwh-footer-tagline {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .rwh-pop-nav {
    grid-template-columns: 1fr;
  }

  .rwh-pop-link {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
  }

  .rwh-pop-link:last-child {
    border-bottom: 0;
  }

  .rwh-cta-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
