/* Immigration second-level mega navigation.
   Typography is restricted to the canonical six-level site system. */
.identity-mega-trigger{
  display:flex;
  height:100%;
  flex:0 0 auto;
  align-items:stretch;
}

.home-section-nav .identity-mega-trigger>a{
  height:100%;
  padding:0 13px;
  border-radius:7px 0 0 7px;
  font-family:var(--site-font-sans)!important;
  font-size:var(--site-type-meta)!important;
  font-weight:700!important;
  line-height:1.5!important;
}

.identity-mega-toggle{
  display:grid;
  width:30px;
  height:100%;
  padding:0;
  place-items:center;
  border:0;
  border-radius:0 7px 7px 0;
  background:transparent;
  color:#9a6b25;
  cursor:pointer;
  transition:background-color .2s ease,color .2s ease;
}

.identity-mega-toggle svg{
  width:10px;
  height:7px;
  fill:none;
  stroke:currentColor;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-width:1.6;
  transition:transform .2s ease;
}

.identity-mega-trigger:hover>a,
.identity-mega-trigger:focus-within>a,
.identity-mega-trigger.is-open>a,
.identity-mega-trigger:hover>.identity-mega-toggle,
.identity-mega-trigger:focus-within>.identity-mega-toggle,
.identity-mega-trigger.is-open>.identity-mega-toggle{
  background:#edf4fb;
  color:#0c5aa6;
}

.identity-mega-trigger>a.is-active,
.identity-mega-trigger>a.is-active+.identity-mega-toggle{
  background:#edf4fb;
  color:#0c5aa6;
}

.identity-mega-trigger.is-open>.identity-mega-toggle svg{
  transform:rotate(180deg);
}

.identity-mega-toggle:focus-visible{
  outline:2px solid #0c5aa6;
  outline-offset:-2px;
}

.identity-mega-panels{
  position:absolute;
  z-index:120;
  top:100%;
  right:0;
  left:0;
}

.identity-mega-panel{
  max-height:min(480px,calc(100vh - 150px));
  overflow:auto;
  border-top:1px solid #cfdae3;
  border-bottom:1px solid #c7d4de;
  background:#f5f8fb;
  box-shadow:0 24px 44px rgba(5,37,70,.16);
}

.identity-mega-panel[hidden],
.identity-residency-projects[hidden]{
  display:none!important;
}

.identity-mega-shell{
  width:auto;
  margin-right:48px;
  margin-left:var(--identity-menu-left,48px);
  padding:20px 0 24px;
}

.identity-mega-heading{
  margin-bottom:16px;
}

.identity-residency-projects header span{
  display:block;
  color:#a16c1e;
  font-family:var(--site-font-sans);
  font-size:var(--site-type-meta);
  font-weight:900;
  line-height:1.5;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.identity-mega-heading h2,
.identity-residency-projects h3{
  margin:0;
  color:#082f60;
  font-family:var(--site-font-sans)!important;
  font-size:var(--site-type-lead)!important;
  font-weight:700!important;
  line-height:1.5!important;
  letter-spacing:normal!important;
}

.identity-citizenship-grid{
  display:grid;
  width:min(520px,100%);
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(4,minmax(46px,auto));
  grid-auto-flow:column;
  gap:8px;
}

.identity-citizenship-panel .identity-mega-heading{
  width:min(520px,100%);
  margin-bottom:12px;
}

.identity-citizenship-panel .identity-mega-shell{
  padding-top:16px;
  padding-bottom:18px;
}

.identity-citizenship-country{
  display:flex;
  min-width:0;
  min-height:46px;
  padding:8px 11px;
  align-items:center;
  gap:9px;
  border:1px solid #d6e0e7;
  background:#fff;
  color:#173a60;
  font-family:var(--site-font-sans);
  font-size:var(--site-type-meta);
  font-weight:700;
  line-height:1.5;
  transition:border-color .2s ease,background-color .2s ease,color .2s ease;
}

.identity-citizenship-country img{
  width:28px;
  height:21px;
  flex:0 0 auto;
  border:1px solid #d5e0e8;
  object-fit:cover;
}

.identity-citizenship-country span{
  min-width:0;
}

.identity-citizenship-country:hover,
.identity-citizenship-country:focus-visible{
  border-color:#bd8a36;
  background:#fffaf1;
  color:#0c5aa6;
}

.identity-citizenship-country:focus-visible,
.identity-residency-country-choice a:focus-visible,
.identity-residency-project-links a:focus-visible{
  outline:2px solid #0c5aa6;
  outline-offset:2px;
}

.identity-residency-country-grid{
  display:grid;
  width:min(820px,calc(100% - 380px));
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}

.identity-residency-country-choice{
  position:relative;
  display:grid;
  min-width:0;
  grid-template-columns:minmax(0,1fr) 32px;
  border:1px solid #d6e0e7;
  background:#fff;
  transition:border-color .2s ease,background-color .2s ease;
}

.identity-residency-country-choice.is-active{
  z-index:4;
}

.identity-residency-country-choice>a{
  display:flex;
  min-width:0;
  min-height:43px;
  padding:8px 4px 8px 9px;
  align-items:center;
  gap:8px;
  color:#173a60;
  font-family:var(--site-font-sans);
  font-size:var(--site-type-meta);
  font-weight:700;
  line-height:1.5;
}

.identity-residency-country-choice>a img{
  width:28px;
  height:21px;
  flex:0 0 auto;
  border:1px solid #d5e0e8;
  object-fit:cover;
}

.identity-residency-country-choice>a span{
  min-width:0;
  overflow-wrap:anywhere;
}

.identity-residency-country-choice>a small{
  display:grid;
  min-width:20px;
  height:20px;
  margin-left:auto;
  padding:0 4px;
  place-items:center;
  border-radius:10px;
  background:#edf3f8;
  color:#5c7184;
  font-family:var(--site-font-sans);
  font-size:var(--site-type-meta);
  font-weight:700;
  line-height:1;
}

.identity-residency-country-choice>button{
  display:grid;
  padding:0;
  place-items:center;
  border:0;
  border-left:1px solid #e0e7ec;
  background:transparent;
  color:#8b641f;
  cursor:pointer;
}

.identity-residency-country-choice>button svg{
  width:7px;
  height:11px;
  fill:none;
  stroke:currentColor;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-width:1.6;
}

.identity-residency-country-choice:hover,
.identity-residency-country-choice:focus-within,
.identity-residency-country-choice.is-active{
  border-color:#bd8a36;
  background:#fffaf1;
}

.identity-residency-country-choice.is-active>a,
.identity-residency-country-choice.is-active>button{
  color:#0c5aa6;
}

.identity-residency-country-choice>button:focus-visible{
  outline:2px solid #0c5aa6;
  outline-offset:-2px;
}

.identity-residency-projects{
  position:absolute;
  z-index:5;
  top:var(--identity-project-offset,0px);
  left:calc(100% + 8px);
  width:370px;
  min-width:0;
  padding:16px 18px;
  border:1px solid #cbd9e3;
  background:#fff;
  box-shadow:0 16px 34px rgba(5,37,70,.14);
}

.identity-residency-projects header{
  display:flex;
  margin-bottom:12px;
  align-items:center;
  gap:10px;
}

.identity-residency-projects header img{
  width:32px;
  height:24px;
  flex:0 0 auto;
  border:1px solid #d5e0e8;
  object-fit:cover;
}

.identity-residency-project-links{
  display:grid;
  border-top:1px solid #dce5eb;
}

.identity-residency-project-links a{
  display:flex;
  min-width:0;
  min-height:39px;
  padding:8px 2px;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid #e3e9ee;
  color:#254562;
  font-family:var(--site-font-sans);
  font-size:var(--site-type-meta);
  font-weight:700;
  line-height:1.5;
}

.identity-residency-project-links a span{
  min-width:0;
}

.identity-residency-project-links a svg{
  width:14px;
  height:10px;
  flex:0 0 auto;
  fill:none;
  stroke:#b77d27;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-width:1.5;
}

.identity-residency-project-links a:hover,
.identity-residency-project-links a:focus-visible{
  color:#0c5aa6;
}

@media(max-width:1000px){
  .identity-residency-country-grid{
    width:min(640px,calc(100% - 330px));
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .identity-residency-projects{
    width:320px;
  }
}

@media(max-width:760px){
  .home-section-nav .identity-mega-trigger>a{
    padding-right:8px;
  }

  .identity-mega-toggle{
    width:34px;
  }

  .identity-mega-panel{
    max-height:calc(100vh - 142px);
  }

  .identity-mega-shell{
    margin-right:16px;
    margin-left:16px;
    padding:16px 0 20px;
  }

  .identity-mega-heading{
    margin-bottom:13px;
  }

  .identity-citizenship-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(4,minmax(46px,auto));
    gap:7px;
  }

  .identity-citizenship-country{
    min-height:46px;
    padding:8px;
    font-size:var(--site-type-meta);
  }

  .identity-residency-country-grid{
    width:100%;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .identity-residency-country-choice{
    grid-template-columns:minmax(0,1fr) 30px;
  }

  .identity-residency-country-choice.is-active{
    grid-column:1 / -1;
  }

  .identity-residency-country-choice>a{
    padding-left:7px;
    gap:6px;
  }

  .identity-residency-country-choice>a small{
    display:none;
  }

  .identity-residency-projects{
    position:relative;
    top:auto;
    left:auto;
    width:auto;
    grid-column:1 / -1;
    padding:14px;
    border-width:1px 0 0;
    box-shadow:none;
  }
}
