:root {
  /* Header background color as space-separated RGB for easy alpha usage via: rgb(var(--header-bg-color-rgb) / <alpha>) */
  --header-bg-color-rgb: 71 194 110;

  /* override flag paths, to include cache busting */
  --iti-path-flags-1x: url("/intl-tel-input/img/flags.webp?1770149818342");
  --iti-path-flags-2x: url("/intl-tel-input/img/flags@2x.webp?1770149818342");
}

html {
  /* fix: links with # scroll values in (e.g. docs/options.html#separatedialcode) scroll until subtitle is below header, as it has position:sticky */
  scroll-padding-top: 70px;
}

body {
  min-height: 100vh;
  background-repeat: no-repeat;
  background-size: cover;
}

body.iti-page--homepage {
  background-image:
    linear-gradient(182deg, rgba(var(--bs-body-bg-rgb), .012), rgba(var(--bs-body-bg-rgb), 1) 87%), 
    radial-gradient(ellipse at 12% 18%, rgba(28, 115, 245, .45), transparent 55%), 
    radial-gradient(ellipse at 88% 14%, rgba(255, 212, 120, .45), transparent 55%), 
    radial-gradient(ellipse at 90% 56%, rgba(128, 63, 240, .42), transparent 52%), 
    radial-gradient(ellipse at 10% 60%, rgba(224, 76, 135, .42), transparent 52%);
}

* {
  box-sizing: border-box;
}
  
/* vue and react logos in news section on homepage */
p img {
  vertical-align: baseline;
}

/* TOP NAVBAR */
.iti-navbar {
  padding: 0.75rem 0;
  background-color: rgb(var(--header-bg-color-rgb));
}
.iti-navbar .navbar-toggler {
  padding: 0;
  border: 0;
}

/* LAYOUT */
.iti-gutter {
  --bs-gutter-x: 3rem;
}
/* never show the right sidebar on mobile (or on some desktop pages) */
/* NOTE: can't include left-sidebar here, because it is always used on mobile */
.iti-right-sidebar {
  display: none;
}
@media (min-width: 992px) {
  .iti-layout-right-sidebar {
    display: grid;
    grid-template-areas: "main ads";
    grid-template-columns: 5fr 1fr;
    gap: 1.5rem;
  }
  .iti-layout-both-sidebars {
    display: grid;
    grid-template-areas: "nav main ads";
    grid-template-columns: 1fr 4fr 1fr;
    gap: 1.5rem;
  }
}
#bdNavbar .nav-link {
  color: white;
}
#bdNavbar .nav-link.active {
  font-weight: bold;
}

/* Header docs dropdown: active item uses header green */
#bdNavbar .dropdown-item.active,
#bdNavbar .dropdown-item:active {
  background-color: rgb(var(--header-bg-color-rgb));
  color: white;
}

/* Header nav dropdown: open on hover (desktop) + keyboard focus */
@media (hover: hover) and (pointer: fine) {
  #bdNavbar .dropdown:hover > .dropdown-menu {
    display: block;
  }
}
#bdNavbar .dropdown:focus-within > .dropdown-menu {
  display: block;
}
.offcanvas-title a {
  color: var(--bs-body-color);
  text-decoration: none;
}
/* left sidebar */
.iti-layout-both-sidebars .iti-left-sidebar {
  grid-area: nav;
}
/* right sidebar */
.iti-layout-right-sidebar .iti-right-sidebar,
.iti-layout-both-sidebars .iti-right-sidebar {
  grid-area: ads;
}
.iti-left-sidebar .nav-link {
  color: var(--bs-body-color);
}
.nav--primary-links .nav-link {
  font-weight: 600;
}
.nav-pills .nav-link.active {
  background-color: rgb(var(--header-bg-color-rgb));
}
.nav-pills .nav-link:not(.active):hover {
  background-color: rgb(var(--header-bg-color-rgb) / 0.5);
}
@media (min-width: 992px) {
  .iti-layout-right-sidebar .iti-right-sidebar,
  .iti-layout-both-sidebars .iti-left-sidebar,
  .iti-layout-both-sidebars .iti-right-sidebar {
    position: sticky;
    top: 5rem;
    display: block !important;
    height: calc(100vh - 6rem);
    padding-left: 0.25rem;
    margin-left: -0.25rem;
    overflow-y: auto;
  }
}
.iti-main {
  grid-area: main;
}


/* DEMO STYLES */
h2,
h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}
h1 {
  margin-bottom: 20px;
}

/* Docs heading permalinks (generated by markdown-it-anchor) */
.iti-main :is(h1, h2, h3, h4, h5, h6) {
  position: relative;
}
.iti-main :is(h1, h2, h3, h4, h5, h6) > .header-anchor {
  height: 100%;
  opacity: 0;
  position: absolute;
  left: -20px;
  padding-right: 8px; /* ensure no hover gap between title and anchor */
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  color: inherit;
}
.iti-main :is(h1, h2, h3, h4, h5, h6):is(:hover) > .header-anchor {
  opacity: 1;
}
.iti-main .header-anchor .iti-anchor-icon {
  display: block;
}

/* bootstrap override */
@media (min-width: 1200px) {
  .h2,
  h2 {
    font-size: 1.7rem;
  }
}
.section {
  margin-bottom: 30px;
}
.demo input[type=tel] {
  width: 250px;
}
.demo ::placeholder {
  color: #bbb;
}
.actions {
  margin-top: 20px;
}
.actions a {
  margin-right: 10px;
}
/* fix the hover state looking weird with bootstrap's big border radius on the input */
.iti__selected-country-primary {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}

/* form styling (for homepage AND example pages) */
input:not([type="checkbox"]),
.button,
select,
.form-select {
  height: 38px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 3px;
  color: inherit;
}
/* fix: the above padding breaks the ITI search input padding */
input.iti__search-input {
  padding-left: 30px;
  padding-right: 28px;
}
select,
.form-select {
  padding-left: 8px; /* for some reason this is required to look consistent */
}
input,
select,
.form-select {
  border: 1px solid #ccc;
  width: 250px;
}
.button {
  color: #fff;
  background-color: #428bca;
  border: 1px solid #357ebd;
}
.button:hover {
  background-color: #3276b1;
  border-color: #285e8e;
  cursor: pointer;
}

/* for dark mode users */
@media (prefers-color-scheme: dark) {
  :root {
    /* input dark mode styling
    (bootstrap styles only work on inputs with .form-control) */
    input {
      background-color: var(--bs-body-bg);
      border-color: var(--bs-border-color);
      color: var(--bs-body-color);
    }
    /* plugin overrides */
    --iti-border-color: #5b5b5b;
    --iti-dialcode-color: #999999;
    --iti-dropdown-bg: var(--bs-dark);
    --iti-icon-color: #aaaaaa;
    --iti-hover-color: #30363d;
  }

  /* bootstrap's dark mode seems to neglect select's border-color */
  select,
  .form-select {
    border-color: var(--bs-border-color);
  }

  /* multidropdown down arrow */
  .iti-playground .iti-playground-multidropdown-toggle.dropdown-toggle::after {
    border-top-color: rgba(222, 226, 230, 0.85);
  }

  /* bootstrap's dark mode theme doesn't seem to support changing the bg color on a disabled input */
  input[disabled] {
    background-color: #3c3c3c !important;
  }
  
  /* bootstrap's dark mode placeholder color is way too bright */
  input::placeholder,
  .demo input::placeholder,
  input.form-control::placeholder,
  textarea.form-control::placeholder {
    color: #5a5a5a;
  }
}

.iti-live-results {
  display: inline-block; /* shrink to fit content */
  margin: 20px 0;
  border: 1px solid rgb(var(--header-bg-color-rgb));
  padding: 10px;
  border-radius: 3px;
  background-color: rgb(var(--header-bg-color-rgb) / 0.3);
  font-style: italic;
  text-align: left;
}





/* HOMEPAGE */
.homepage-content {
  margin-top: 60px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.homepage-content h1 {
  font-size: 41px;
  font-weight: 600;
}
.homepage-content p.subtitle {
  color: rgba(33, 37, 41, 0.75);
}
@media (prefers-color-scheme: dark) {
  .homepage-content p.subtitle {
    color: rgba(222, 226, 230, 0.75);
  }
}
.homepage-content .iti-live-results {
  display: block;
}
.homepage-content .section {
  margin-bottom: 60px;
}
@media (min-width: 992px) {
  .homepage-content {
    margin-top: 100px;
    max-width: 700px;
  }
  .homepage-content h1 {
    font-size: 58px;
  }
  .homepage-content p.subtitle {
    font-size: 23px;
  }
}
.section--homepage-demo {
  margin-top: 10px;
}
/* homepage: make the demo input width match the live results box */
.section--homepage-demo .iti,
.section--homepage-demo input[type=tel] {
  width: 100%;
}
/* to match the other sections, which have a <p> at the bottom with this margin */
.section--homepage-demo .btn-primary {
  margin-bottom: 16px;
}
.section--twilio h2 {
  margin-bottom: 0;
}
.section--features ul {
  text-align: left;
}

/* playground: disable hover styling on collapsed multidropdown toggle */
.iti-playground .iti-playground-multidropdown-toggle {
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  --bs-btn-bg: var(--bs-body-bg);
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-border-color: var(--bs-border-color, #ced4da);
  --bs-btn-hover-bg: var(--bs-btn-bg);
  --bs-btn-hover-color: var(--bs-btn-color);
  --bs-btn-hover-border-color: var(--bs-btn-border-color);
  --bs-btn-active-bg: var(--bs-btn-bg);
  --bs-btn-active-color: var(--bs-btn-color);
  --bs-btn-active-border-color: var(--bs-btn-border-color);
}

/* playground: option info tooltip */
.iti-playground .iti-playground-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 0;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color, #ced4da);
  color: var(--bs-secondary-color, #6c757d);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  user-select: none;
  cursor: help;
}

.iti-playground .iti-playground-labelgroup {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.iti-playground .iti-playground-labelgroup > .form-label {
  margin-bottom: 0;
}
/* preserve bootstrap-like spacing for stacked (mobile) label + control */
.iti-playground .iti-playground-control:not(.iti-playground-control--check) > .iti-playground-labelgroup {
  margin-bottom: var(--bs-form-label-margin-bottom, 0.5rem);
}
.iti-playground .iti-playground-info:focus-visible {
  outline: 2px solid rgb(var(--header-bg-color-rgb));
  outline-offset: 2px;
}

.iti-playground .iti-playground-multidropdown-toggle.dropdown-toggle::after {
  margin-left: auto;
}

/* playground: on wider screens, align label + control horizontally to save space */
@media (min-width: 600px) {
  .iti-playground .iti-playground-control:not(.iti-playground-control--check) {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
  }
  .iti-playground .iti-playground-control:not(.iti-playground-control--check) > .iti-playground-labelgroup {
    margin-bottom: 0;
  }
  .iti-playground .iti-playground-control:not(.iti-playground-control--check) > .form-control,
  .iti-playground .iti-playground-control:not(.iti-playground-control--check) > .form-select,
  .iti-playground .iti-playground-control:not(.iti-playground-control--check) > .dropdown {
    min-width: 0;
  }

  /* On mobile, checkboxes appear on LHS. Here, we move them to the RHS. */
  .iti-playground .iti-playground-control.iti-playground-control--check {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    grid-template-areas: "label control";
    column-gap: 12px;
    row-gap: 0;
    align-items: center;
    padding-left: 0; /* override bootstrap .form-check */
  }
  .iti-playground .iti-playground-control.iti-playground-control--check > .iti-playground-labelgroup {
    grid-area: label;
    margin-bottom: 0;
  }
  .iti-playground .iti-playground-control.iti-playground-control--check > .form-check-input {
    grid-area: control;
    margin-left: 0; /* override bootstrap negative margin */
    float: none; /* override bootstrap float */
    justify-self: start;
  }
}
.form-control,
.form-select {
  width: 100%;
}
