/* Region, category and guide navigation only. Customer cards keep their styles. */
a:has(> .widget.box-item.photo-navigation-card),
a:has(> .widget.box-item.photo-navigation-card):hover,
a:has(> .widget.box-item.photo-navigation-card):focus,
a:has(> .widget.box-item.photo-navigation-card):active {
  display: block;
  text-decoration: none;
}

.widget.box-item.photo-navigation-card {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #003c70;
  box-shadow: 0 5px 16px rgba(0, 35, 62, .10);
  font-family: var(--portal-font-family);
  transform: none;
  transition: transform .24s ease, box-shadow .24s ease;
  will-change: auto;
}

/* Async guide wrappers stay empty until their existing request supplies markup.
   Reserve their grid space without displaying an unlinked blue placeholder. */
.widget.box-item.photo-navigation-card:empty {
  visibility: hidden;
}

.widget.box-item.photo-navigation-card > .box-item-content.has-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content: flex-end;
  width: 100%;
  height: auto;
  min-height: 264px;
  max-height: none;
  padding: 80px 0 0;
  border-radius: inherit;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

/* Only grids directly containing these navigation boxes use equal-height rows.
   Preserve Bootstrap's column widths and all unrelated customer/offer grids. */
:is(.row, .container, .container-fluid, [class*="col-"]):has(> [class*="col-"] > .photo-navigation-card, > [class*="col-"] > a > .photo-navigation-card) {
  display: flex;
  flex-wrap: wrap;
}

:is(.row, .container, .container-fluid, [class*="col-"]):has(> [class*="col-"] > .photo-navigation-card, > [class*="col-"] > a > .photo-navigation-card)::before,
:is(.row, .container, .container-fluid, [class*="col-"]):has(> [class*="col-"] > .photo-navigation-card, > [class*="col-"] > a > .photo-navigation-card)::after {
  display: none;
}

:is(.row, .container, .container-fluid, [class*="col-"]):has(> [class*="col-"] > .photo-navigation-card, > [class*="col-"] > a > .photo-navigation-card) > [class*="col-"]:has(> .photo-navigation-card, > a > .photo-navigation-card) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  float: none;
}

:is(.row, .container, .container-fluid, [class*="col-"]):has(> [class*="col-"] > .photo-navigation-card, > [class*="col-"] > a > .photo-navigation-card) > :is(h1, h2, h3) {
  flex: 0 0 100%;
  width: 100%;
}

[class*="col-"] > a:has(> .widget.box-item.photo-navigation-card) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

/* Related guides need room for whole translated words. Their columns can
   reflow earlier than the short region names, including inside nested grids. */
:is(.row, .container, .container-fluid, [class*="col-"]):has(> [class*="col-"] > .photo-navigation-card, > [class*="col-"] > a > .photo-navigation-card) > [class*="col-"]:has(> .widget.box-item.photo-navigation-card) {
  min-width: min(100%, 300px);
  flex-grow: 1;
}

.widget.box-item.photo-navigation-card .box-item-cover {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 18, 36, 0) 24%, rgba(0, 24, 44, .18) 48%, rgba(0, 24, 44, .86) 100%);
  pointer-events: none;
}

/* Normal flow lets longer translations increase the card height without clipping. */
.widget.box-item.photo-navigation-card .box-item-text {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 20px !important;
  /* Follow the caption's height so the first line of a long translation
     remains readable even when it extends into the bright part of the photo. */
  background: linear-gradient(180deg, rgba(0, 24, 44, 0), rgba(0, 24, 44, .62) 20px);
  color: #fff;
  text-align: start;
}

.widget.box-item.photo-navigation-card .box-item-text > a,
.widget.box-item.photo-navigation-card .box-item-text > h4 {
  flex: 1 1 min-content;
  min-width: 0;
}

.widget.box-item.photo-navigation-card .box-item-text a,
.widget.box-item.photo-navigation-card .box-item-text h4 {
  margin: 0;
  padding: 0;
  color: #fff;
  font-family: inherit;
  font-size: clamp(20px, 1.6vw, 23px) !important;
  font-weight: 600;
  line-height: 1.4;
  text-align: start;
  text-transform: none;
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 20, 40, .22);
  white-space: normal;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.widget.box-item.photo-navigation-card .box-item-text > a,
.widget.box-item.photo-navigation-card .box-item-text > a h4 {
  font-size: 20px !important;
}

/* Keep the existing link and destination; give it the full photo as a hit area. */
.widget.box-item.photo-navigation-card .box-item-text > a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

/* Decorative arrow has no text to translate and does not intercept the link. */
.widget.box-item.photo-navigation-card .box-item-text::after {
  content: "";
  position: relative;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  margin-bottom: 1px;
  margin-inline-start: auto;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  background-color: rgba(255, 255, 255, .12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  transition: transform .24s ease, background-color .24s ease;
}

.widget.box-item.photo-navigation-card:hover {
  transform: none;
  box-shadow: 0 5px 16px rgba(0, 35, 62, .10);
}

.widget.box-item.photo-navigation-card:focus-within,
a:focus-visible > .widget.box-item.photo-navigation-card {
  outline: 3px solid #1479b8;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .widget.box-item.photo-navigation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 35, 62, .16);
  }

  .widget.box-item.photo-navigation-card:hover .box-item-text::after {
    transform: translateX(2px);
    background-color: rgba(255, 255, 255, .22);
  }
}

@media (max-width: 767px) {
  :is(.row, .container, .container-fluid, [class*="col-"]):has(> [class*="col-"] > .photo-navigation-card, > [class*="col-"] > a > .photo-navigation-card) > [class*="col-"]:has(> .photo-navigation-card, > a > .photo-navigation-card) {
    width: 100%;
  }

  .widget.box-item.photo-navigation-card > .box-item-content.has-cover {
    min-height: 240px;
  }

  .widget.box-item.photo-navigation-card .box-item-text a,
  .widget.box-item.photo-navigation-card .box-item-text h4 {
    font-size: 22px !important;
  }
}

@media (max-width: 375px) {
  .widget.box-item.photo-navigation-card .box-item-text > h4 {
    font-size: 20px !important;
  }

  .widget.box-item.photo-navigation-card .box-item-text > a,
  .widget.box-item.photo-navigation-card .box-item-text > a h4 {
    font-size: 18px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .widget.box-item.photo-navigation-card,
  .widget.box-item.photo-navigation-card .box-item-text::after {
    transition: none;
  }

  .widget.box-item.photo-navigation-card:hover,
  .widget.box-item.photo-navigation-card:hover .box-item-text::after {
    transform: none;
  }
}

/* Reserve room for complete translated names in narrow photo cards. */
.widget.box-item.photo-navigation-card { container-type:inline-size; container-name:photo-navigation-card; }
@container photo-navigation-card (max-width:280px) {
 .widget.box-item.photo-navigation-card .box-item-text { padding-left:8px!important; padding-right:8px!important; }
 .widget.box-item.photo-navigation-card .box-item-text > h4 { font-size:clamp(17px,7.8cqw,23px)!important; }
}
/* Shared editorial footer. Translation calls and account controls stay in the masters. */
footer.yi-footer {
  --yi-footer-blue: #073959;
  --yi-footer-ink: #f5f8fa;
  --yi-footer-muted: #c5d6e0;
  --yi-footer-accent: #ffa56a;
  --yi-footer-line: rgba(255, 255, 255, .16);
  display: block;
  clear: both;
  margin: 0;
  padding: 0;
  border-top: 4px solid var(--yi-footer-accent);
  background: var(--yi-footer-blue);
  color: var(--yi-footer-ink);
  font-family: var(--portal-font-family);
  font-size: 15px;
  line-height: 1.7;
  text-align: left;
}

.yi-footer *, .yi-footer *::before, .yi-footer *::after { box-sizing: border-box; }
.yi-footer .yi-footer-inner { max-width: 1180px; margin: 0 auto; padding: 44px 36px 26px; }
.yi-footer h2, .yi-footer h3, .yi-footer p { margin: 0; padding: 0; color: inherit; text-shadow: none; }
.yi-footer .yi-footer-wordmark { margin-bottom: 18px; font-size: 15px; font-weight: 700; letter-spacing: 2px; }
.yi-footer .yi-footer-wordmark span { color: var(--yi-footer-accent); font-size: 23px; line-height: 0; }
.yi-footer .yi-footer-intro h2 { margin-bottom: 16px; font-size: 30px; font-weight: 600; line-height: 1.35; letter-spacing: -.6px; text-wrap: balance; }
.yi-footer .yi-footer-intro p { max-width: 940px; color: var(--yi-footer-muted); font-size: 15px; line-height: 1.85; }
.yi-footer .yi-footer-navigation { display: grid; grid-template-columns: 1.15fr 1.25fr .9fr; gap: 44px; margin-top: 32px; padding: 30px 0 32px; border-top: 1px solid var(--yi-footer-line); }
.yi-footer .yi-footer-navigation > * { min-width: 0; }
.yi-footer .yi-footer-navigation h3 { margin-bottom: 16px; font-size: 17px; font-weight: 600; line-height: 1.5; }
.yi-footer .yi-footer-navigation h3::after { content: ''; display: block; width: 24px; height: 2px; margin-top: 10px; background: var(--yi-footer-accent); }
.yi-footer ul { list-style: none; margin: 0; padding: 0; }
.yi-footer li { margin: 0; padding: 0; }
.yi-footer a { color: var(--yi-footer-muted); text-decoration: none; }
.yi-footer a:hover, .yi-footer a:focus-visible { color: var(--yi-footer-accent); text-decoration: underline; text-underline-offset: 4px; }
.yi-footer a:focus-visible, .yi-footer button:focus-visible { outline: 2px solid var(--yi-footer-accent); outline-offset: 4px; }
.yi-footer .yi-footer-links a { display: inline-block; max-width: 100%; padding: 6px 0; font-size: 15px; line-height: 1.65; }
.yi-footer .yi-footer-links .yi-footer-offers { color: var(--yi-footer-accent); font-weight: 600; }
.yi-footer .yi-footer-account { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; }
.yi-footer .yi-footer-login, .yi-footer .yi-footer-account .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  color: var(--yi-footer-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  box-shadow: none;
}
/* Invisible server controls leave whitespace; only a rendered control needs this gap. */
.yi-footer .yi-footer-account > :first-child { margin-top: 19px; }
.yi-footer .yi-footer-login .fa { flex-shrink: 0; }
.yi-footer .yi-footer-account .btn-danger { border-color: #dc9999; }
.yi-footer .yi-footer-account .btn:hover, .yi-footer .yi-footer-account .btn:focus-visible,
.yi-footer .yi-footer-login:hover, .yi-footer .yi-footer-login:focus-visible { border-color: var(--yi-footer-accent); background: rgba(255, 255, 255, .1); color: var(--yi-footer-ink); text-decoration: none; }
.yi-footer .yi-footer-social-links { display: grid; gap: 10px; }
.yi-footer .yi-footer-social-links a { display: flex; align-items: center; gap: 11px; width: fit-content; max-width: 100%; min-height: 44px; font-size: 14px; }
.yi-footer .yi-footer-social-icon { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 9px; background: rgba(255, 255, 255, .05); color: var(--yi-footer-ink); font-size: 19px; }
.yi-footer .yi-footer-social-links .yi-footer-external { color: #a9c1d0; font-size: 11px; transform: rotate(45deg); }
.yi-footer .yi-footer-story { border-top: 1px solid var(--yi-footer-line); padding: 26px 0 24px; }
.yi-footer .yi-footer-story .yi-footer-signature { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; font-family: var(--portal-font-family) !important; font-size: 25px; font-style: italic; font-weight: 400; line-height: 1.4; letter-spacing: normal; }
.yi-footer .yi-footer-tricolore { display: flex; flex-shrink: 0; width: 24px; height: 15px; border-radius: 3px; overflow: hidden; }
.yi-footer .yi-footer-tricolore i { width: 8px; background: #f7f5ee; }
.yi-footer .yi-footer-tricolore i:first-child { background: #52ad89; }
.yi-footer .yi-footer-tricolore i:last-child { background: #ed7770; }
.yi-footer .yi-footer-story p { color: var(--yi-footer-muted); font-size: 14px; line-height: 1.8; }
.yi-footer .yi-footer-story .yi-footer-keywords { margin-top: 12px; color: #aec7d6; font-size: 12px; }
.yi-footer .yi-footer-legal { padding-top: 18px; border-top: 1px solid var(--yi-footer-line); color: #aec7d6; font-size: 12px; line-height: 1.85; }
.yi-footer .yi-footer-legal p { font-size: 12px; line-height: 1.85; }
.yi-footer .yi-footer-copyright { margin-top: 6px; }
.yi-footer .yi-footer-legal a { display: inline-block; color: var(--yi-footer-muted); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 991px) {
  .yi-footer .yi-footer-inner { padding: 34px 28px 24px; }
  .yi-footer .yi-footer-navigation { gap: 28px; }
  .yi-footer .yi-footer-navigation h3 { font-size: 16px; }
  .yi-footer .yi-footer-links a { font-size: 14px; }
}
@media (max-width: 767px) {
  .yi-footer .yi-footer-inner { padding: 30px 24px 24px; }
  .yi-footer .yi-footer-intro h2 { font-size: 27px; }
  .yi-footer .yi-footer-intro p { font-size: 14px; }
  .yi-footer .yi-footer-navigation { grid-template-columns: 1fr 1fr; gap: 26px; }
  .yi-footer .yi-footer-social { grid-column: 1 / -1; }
  .yi-footer .yi-footer-social-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
  .yi-footer .yi-footer-links a { padding: 10px 0; min-height: 44px; }
  .yi-footer .yi-footer-social-links .yi-footer-external { display: none; }
  .yi-footer .yi-footer-legal a { min-height: 44px; padding-block: 10px; }
}
@media (max-width: 479px) {
  .yi-footer .yi-footer-inner { padding-inline: 22px; }
  .yi-footer .yi-footer-navigation { grid-template-columns: 1fr; }
  .yi-footer .yi-footer-intro h2 { font-size: 26px; }
  .yi-footer .yi-footer-story .yi-footer-signature { font-size: 23px; }
}
@media (prefers-reduced-motion: no-preference) {
  .yi-footer a, .yi-footer button { transition: color .15s, border-color .15s, background-color .15s; }
}

/* In-page navigation: keep the existing labels and counters in their original nodes. */
#page .page-index {
  float: none;
  clear: both;
  box-sizing: border-box;
  width: 100%;
  max-width: 1140px;
  margin: 24px auto 32px !important;
  padding: 16px 0 12px;
  border-top: 1px solid #dce5e9;
  border-bottom: 1px solid #dce5e9;
  text-align: left;
}

/* Region pages place this group directly in #page, without a padded container. */
#page > .page-index { width: calc(100% - 30px); }

#page .page-index-title {
  margin: 0 0 4px;
  color: #5b6c78;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-transform: none;
}

#page .page-index-title .fa { margin-right: 8px; font-size: 12px; }

#page .page-index-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  min-width: 0;
}

#page .page-index-links > [data-scrollto] {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
  color: #225c8b;
  font-size: 16px !important;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
}

#page .page-index-links > [data-scrollto]:hover,
#page .page-index-links > [data-scrollto]:focus {
  background: transparent;
  color: #163f60;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#page .page-index-links > [data-scrollto]:focus-visible {
  outline: 2px solid #225c8b;
  outline-offset: 4px;
}

#page .page-index-links > [data-scrollto] > .fa:not(.page-index-arrow) { display: none; }
#page .page-index-links .page-index-arrow { flex: 0 0 auto; color: #687e8d; font-size: 14px; }

#page .page-index-links .btn-badge,
#page .page-index-links .badge {
  position: static;
  flex: 0 0 auto;
  top: auto;
  right: auto;
  margin: 0;
  padding: 2px 7px;
  border: 0;
  border-radius: 5px;
  background: #edf2f6;
  color: #465c6e;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

#page .page-index[hidden],
#page .page-index-links > [hidden] { display: none !important; }



@media (max-width: 767px) {
  #page .page-index { margin-top: 20px !important; margin-bottom: 24px !important; }
  #page .page-index-links { gap: 4px 20px; }
}

@media print {
  #page .page-index { display: none; }
}

/* Shared presentation for the public searches only; editor forms are excluded. */
:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) 76px;
    align-items: stretch;
    gap: 8px;
    padding: 9px;
}

.offers-search #offers-search-bar.public-search-fields {
    grid-template-columns: minmax(0, 1fr) 76px;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field {
    position: relative;
    min-width: 0;
    border: 1px solid #e1e8ed;
    border-radius: 11px;
    background: #f6f8fa;
    text-align: left;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field:hover {
    border-color: #b8cbd8;
    background: #fff;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field:focus-within {
    border-color: #437fa9;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67, 127, 169, .15);
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-caption {
    position: absolute;
    z-index: 1;
    top: 9px;
    left: 46px;
    right: 28px;
    color: #42657c;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    overflow-wrap: anywhere;
    pointer-events: none;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 14px;
    width: 20px;
    transform: translateY(-50%);
    color: #55778e;
    font-size: 20px;
    line-height: 24px;
    text-align: center;
    pointer-events: none;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field > .select2-container {
    display: block;
    width: 100% !important;
    min-width: 0;
    margin: 0;
    border: 0;
    float: none;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .select2-selection--single {
    height: auto !important;
    min-height: 76px;
    border: 0;
    border-radius: 10px;
    background: transparent;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .select2-selection__rendered {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    height: auto !important;
    min-height: 76px;
    padding: 29px 30px 10px 46px;
    color: #223e4f;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 15px;
    font-weight: 500;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .select2-selection__arrow {
    right: 8px;
    height: 20px;
    padding: 0;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .selected {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0;
    padding: 0;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .selected > span {
    display: none;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .selected > strong {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .placeholder > strong {
    font-weight: 400;
    color: #536b7b;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .selected > small {
    margin: 2px 0 0;
    padding: 0;
    color: #536b7b;
    font-size: 13px !important;
    text-align: left;
    overflow-wrap: anywhere;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .selected > small:empty {
    display: none !important;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .select2-selection:focus-visible {
    outline: 2px solid #437fa9;
    outline-offset: -2px;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field > select:not(.select2-hidden-accessible) {
    width: 100%;
    min-height: 76px;
    height: auto;
    padding: 29px 30px 10px 46px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: #223e4f;
    font-size: 15px;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields > button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    min-width: 0;
    min-height: 78px;
    height: auto;
    margin: 0;
    padding: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
}

:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields > button svg {
    flex-shrink: 0;
}

@media (max-width: 767px) {
    :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields,
    .offers-search #offers-search-bar.public-search-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        padding: 7px;
    }
    :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields > button {
        min-height: 50px;
        font-size: 16px;
    }
    :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields > button > span {
        display: inline;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field { transition: none; }
}

/* Give compact search values the full row below the existing caption. */
:is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field {
  container: public-search-field / inline-size;
}
@container public-search-field (max-width: 330px) {
  :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .select2-selection__rendered {
    padding: 32px 8px 10px;
  }
  :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .selected > strong {
    font-size: 15px;
  }
  :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-caption {
    left: 38px;
  }
  :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-icon {
    top: 9px;
    left: 12px;
    font-size: 16px;
    line-height: 18px;
    transform: none;
  }
  :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-field .select2-selection__arrow {
    top: 8px !important;
    transform: none !important;
  }
}
@media (max-width: 359px) {
  #portalSearchDialog #searchBoxToggle { padding-inline: 8px; }
}

/* Match the home search hierarchy in the shared dialog and offers search. */
body :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields > button.btn {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
}

body :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields > button.btn > span {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

body :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields > button.btn svg {
    width: 21px;
    height: 21px;
}

@media (max-width: 767px) {
    body :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields > button.btn > span {
        display: inline;
        min-width: 0;
    }

    body :is(.home-hero, #searchBoxToggle, .offers-search) .public-search-fields > button.btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Only the public search lists opt in. Keep Select2 positioning and filtering intact. */
.select2-dropdown.public-search-dropdown {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border: 1px solid #d6e0e6 !important;
    border-radius: 12px !important;
    background: #fff;
    color: #223e4f;
    box-shadow: 0 12px 30px rgba(2, 24, 37, .16);
    font-family: var(--portal-font-family);
    text-align: left;
}

.select2-dropdown.public-search-dropdown .select2-search--dropdown {
    flex: 0 0 auto;
    padding: 8px;
}

.select2-dropdown.public-search-dropdown .select2-search__field {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #d6e0e6 !important;
    border-radius: 8px !important;
    background: #f7fafc;
    color: #223e4f;
    font-family: var(--portal-font-family) !important;
    font-size: 16px;
    line-height: 1.5;
}

.select2-dropdown.public-search-dropdown .select2-search__field:focus {
    border-color: #437fa9 !important;
    outline: 2px solid rgba(67, 127, 169, .2);
    outline-offset: 0;
}

/* The list alone scrolls; its existing viewport-specific height limits still apply. */
.select2-dropdown.public-search-dropdown .select2-results {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    max-height: none !important;
    overflow: hidden !important;
}

.select2-dropdown.public-search-dropdown .select2-results__options {
    box-sizing: border-box;
    min-height: 0;
    margin: 0;
    padding: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.select2-dropdown.public-search-dropdown .select2-results__option {
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px !important;
    border-radius: 7px;
    color: #223e4f;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.select2-dropdown.public-search-dropdown .select2-results__option[aria-disabled="true"] {
    color: #526977;
}

.select2-dropdown.public-search-dropdown .select2-results__option[aria-selected="true"] {
    background: #eef4f8;
}

/* A real text column keeps every wrapped line beside the icon, however long the label. */
.select2-dropdown.public-search-dropdown .select2-results__option > div:has(> strong) {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 2px;
    align-items: start;
    align-content: center;
    height: auto !important;
    min-height: 44px !important;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.select2-dropdown.public-search-dropdown .select2-results__option > div > span {
    position: static;
    display: block;
    grid-column: 1;
    grid-row: 1 / span 2;
    float: none;
    width: 24px;
    height: auto;
    margin: 0;
    padding: 0;
    transform: none;
    color: #526977;
    font-size: 21px;
    line-height: 24px;
    text-align: center;
}

.select2-dropdown.public-search-dropdown .select2-results__option > div > strong,
.select2-dropdown.public-search-dropdown .select2-results__option > div > small {
    grid-column: 2;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: inherit;
    line-height: 1.5 !important;
    text-align: left;
    text-indent: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
}

.select2-dropdown.public-search-dropdown .select2-results__option > div > strong {
    font-size: 15px;
    font-weight: 600;
}

.select2-dropdown.public-search-dropdown .select2-results__option > div > small {
    color: #526977;
    font-size: 13px;
}

.select2-dropdown.public-search-dropdown .select2-results__option > div > small:empty {
    display: none !important;
}

.select2-dropdown.public-search-dropdown .select2-results__option strong b,
.select2-dropdown.public-search-dropdown .select2-results__option small b {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.select2-dropdown.public-search-dropdown .select2-results__option--highlighted[aria-selected] {
    background: #003c70 !important;
    color: #fff !important;
}

.select2-dropdown.public-search-dropdown .select2-results__option--highlighted[aria-selected] > div > span,
.select2-dropdown.public-search-dropdown .select2-results__option--highlighted[aria-selected] > div > strong,
.select2-dropdown.public-search-dropdown .select2-results__option--highlighted[aria-selected] > div > small {
    color: inherit;
}

/* Home suggestions use the visible viewport, including portrait software keyboards. */
body.homepage > .select2-container--open.public-home-dropdown {
    position: fixed !important;
    top: var(--public-home-list-top) !important;
    bottom: var(--public-home-list-bottom) !important;
    left: var(--public-home-list-left) !important;
    width: var(--public-home-list-width) !important;
    z-index: 1051;
}

body.homepage > .select2-container--open.public-home-dropdown .select2-dropdown {
    position: relative;
    top: auto;
    bottom: auto;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-height: var(--public-home-list-height) !important;
    overflow: hidden;
}

body.homepage > .select2-container--open.public-home-dropdown .select2-results {
    min-height: 0;
    max-height: none !important;
    overflow: hidden !important;
}

/* On narrow result lists, keep the icon and type above the complete label. */
.select2-dropdown.public-search-dropdown {
  container: public-search-dropdown / inline-size;
}
@container public-search-dropdown (max-width: 330px) {
  .select2-dropdown.public-search-dropdown .select2-results__option {
    padding-inline: 6px !important;
  }
  .select2-dropdown.public-search-dropdown .select2-results__option > div > span {
    grid-column: 1;
    grid-row: 1;
  }
  .select2-dropdown.public-search-dropdown .select2-results__option > div > small {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  .select2-dropdown.public-search-dropdown .select2-results__option > div > strong {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 14px;
  }
}
@container public-search-dropdown (max-width: 270px) {
  .select2-dropdown.public-search-dropdown .select2-results__option > div > strong {
    font-size: 13px;
  }
}

/* YourItaly icon layer: local Lucide 0.468.0 SVGs, ISC license in ../Img/icons/lucide/.
   Existing classes, translations, size utilities and brand icons stay compatible.
   Browsers without CSS masks keep the existing Font Awesome / Glyphicon glyphs. */
@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .fa.fa-search { --yi-icon-image: url("/Assets/Img/icons/lucide/search.svg?v=20261104-1"); }
  .fa.fa-tag, .fa.fa-calendar-check-o { --yi-icon-image: url("/Assets/Img/icons/lucide/tag.svg?v=20261104-1"); }
  .fa.fa-map-marker { --yi-icon-image: url("/Assets/Img/icons/lucide/map-pin.svg?v=20261104-1"); }
  .fa.fa-search-plus { --yi-icon-image: url("/Assets/Img/icons/lucide/zoom-in.svg?v=20261104-1"); }
  .fa.fa-calendar { --yi-icon-image: url("/Assets/Img/icons/lucide/calendar-days.svg?v=20261104-1"); }
  .fa.fa-calendar-o { --yi-icon-image: url("/Assets/Img/icons/lucide/calendar-clock.svg?v=20261104-1"); }
  .fa.fa-ticket { --yi-icon-image: url("/Assets/Img/icons/lucide/ticket.svg?v=20261104-1"); }
  .fa.fa-paperclip { --yi-icon-image: url("/Assets/Img/icons/lucide/paperclip.svg?v=20261104-1"); }
  .fa.fa-map { --yi-icon-image: url("/Assets/Img/icons/lucide/map.svg?v=20261104-1"); }
  .fa.fa-map-signs { --yi-icon-image: url("/Assets/Img/icons/lucide/signpost.svg?v=20261104-1"); }
  .fa.fa-arrows-h { --yi-icon-image: url("/Assets/Img/icons/lucide/ruler.svg?v=20261104-1"); }
  .fa.fa-location-arrow { --yi-icon-image: url("/Assets/Img/icons/lucide/navigation.svg?v=20261104-1"); }
  .fa.fa-envelope { --yi-icon-image: url("/Assets/Img/icons/lucide/mail.svg?v=20261104-1"); }
  .fa.fa-phone { --yi-icon-image: url("/Assets/Img/icons/lucide/phone.svg?v=20261104-1"); }
  .fa.fa-user { --yi-icon-image: url("/Assets/Img/icons/lucide/user-round.svg?v=20261104-1"); }
  .fa.fa-lock { --yi-icon-image: url("/Assets/Img/icons/lucide/lock-keyhole.svg?v=20261104-1"); }
  .fa.fa-users, .fa.fa-group { --yi-icon-image: url("/Assets/Img/icons/lucide/users-round.svg?v=20261104-1"); }
  .fa.fa-headphones { --yi-icon-image: url("/Assets/Img/icons/lucide/headset.svg?v=20261104-1"); }
  .fa.fa-image, .fa.fa-picture-o { --yi-icon-image: url("/Assets/Img/icons/lucide/images.svg?v=20261104-1"); }
  .fa.fa-globe { --yi-icon-image: url("/Assets/Img/icons/lucide/globe.svg?v=20261104-1"); }
  .fa.fa-times, .fa.fa-close, .fa.fa-remove { --yi-icon-image: url("/Assets/Img/icons/lucide/x.svg?v=20261104-1"); }
  .fa.fa-arrow-up { --yi-icon-image: url("/Assets/Img/icons/lucide/arrow-up.svg?v=20261104-1"); }
  .fa.fa-arrow-right { --yi-icon-image: url("/Assets/Img/icons/lucide/arrow-right.svg?v=20261104-1"); }
  .fa.fa-pencil { --yi-icon-image: url("/Assets/Img/icons/lucide/pencil.svg?v=20261104-1"); }
  .fa.fa-trash, .fa.fa-trash-o { --yi-icon-image: url("/Assets/Img/icons/lucide/trash-2.svg?v=20261104-1"); }
  .fa.fa-info, .fa.fa-info-circle { --yi-icon-image: url("/Assets/Img/icons/lucide/info.svg?v=20261104-1"); }
  .fa.fa-file-text-o { --yi-icon-image: url("/Assets/Img/icons/lucide/file-text.svg?v=20261104-1"); }
  .fa.fa-list-ul { --yi-icon-image: url("/Assets/Img/icons/lucide/list-checks.svg?v=20261104-1"); }
  .fa.fa-play-circle-o { --yi-icon-image: url("/Assets/Img/icons/lucide/circle-play.svg?v=20261104-1"); }
  .fa.fa-cloud-upload { --yi-icon-image: url("/Assets/Img/icons/lucide/cloud-upload.svg?v=20261104-1"); }
  .fa.fa-plus-circle { --yi-icon-image: url("/Assets/Img/icons/lucide/circle-plus.svg?v=20261104-1"); }
  .fa.fa-line-chart { --yi-icon-image: url("/Assets/Img/icons/lucide/chart-no-axes-combined.svg?v=20261104-1"); }
  .fa.fa-certificate { --yi-icon-image: url("/Assets/Img/icons/lucide/badge-check.svg?v=20261104-1"); }
  .fa.fa-chevron-left { --yi-icon-image: url("/Assets/Img/icons/lucide/chevron-left.svg?v=20261104-1"); }
  .fa.fa-chevron-right { --yi-icon-image: url("/Assets/Img/icons/lucide/chevron-right.svg?v=20261104-1"); }
  .fa.fa-angle-down { --yi-icon-image: url("/Assets/Img/icons/lucide/chevron-down.svg?v=20261104-1"); }
  .glyphicon.glyphicon-chevron-up { --yi-icon-image: url("/Assets/Img/icons/lucide/chevron-up.svg?v=20261104-1"); }
  .fa.fa-toggle-on { --yi-icon-image: url("/Assets/Img/icons/lucide/toggle-right.svg?v=20261104-1"); }

  .fa.fa-search::before,
  .fa.fa-tag::before,
  .fa.fa-calendar-check-o::before,
  .fa.fa-map-marker::before,
  .fa.fa-search-plus::before,
  .fa.fa-calendar::before,
  .fa.fa-calendar-o::before,
  .fa.fa-ticket::before,
  .fa.fa-paperclip::before,
  .fa.fa-map::before,
  .fa.fa-map-signs::before,
  .fa.fa-arrows-h::before,
  .fa.fa-location-arrow::before,
  .fa.fa-envelope::before,
  .fa.fa-phone::before,
  .fa.fa-user::before,
  .fa.fa-lock::before,
  .fa.fa-users::before,
  .fa.fa-group::before,
  .fa.fa-headphones::before,
  .fa.fa-image::before,
  .fa.fa-picture-o::before,
  .fa.fa-globe::before,
  .fa.fa-times::before,
  .fa.fa-close::before,
  .fa.fa-remove::before,
  .fa.fa-arrow-up::before,
  .fa.fa-arrow-right::before,
  .fa.fa-pencil::before,
  .fa.fa-trash::before,
  .fa.fa-trash-o::before,
  .fa.fa-info::before,
  .fa.fa-info-circle::before,
  .fa.fa-file-text-o::before,
  .fa.fa-list-ul::before,
  .fa.fa-play-circle-o::before,
  .fa.fa-cloud-upload::before,
  .fa.fa-plus-circle::before,
  .fa.fa-line-chart::before,
  .fa.fa-certificate::before,
  .fa.fa-chevron-left::before,
  .fa.fa-chevron-right::before,
  .fa.fa-angle-down::before,
  .glyphicon.glyphicon-chevron-up::before,
  .fa.fa-toggle-on::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-image: var(--yi-icon-image);
    mask-image: var(--yi-icon-image);
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    forced-color-adjust: none;
  }
}

/* Shared icon presentation. Labels keep the portal's translated, whole-word text. */
.yi-section-title {
    display: flex;
    /* Keep the badge beside translated labels; only the label wraps. */
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 12px;
    max-inline-size: 100%;
    line-height: 1.4;
    text-align: start;
}

.yi-section-title > .yi-section-label {
    flex: 0 1 auto;
    min-inline-size: 0;
    max-inline-size: 100%;
    white-space: normal;
}

.yi-section-title.yi-section-title--center {
    justify-content: center;
    text-align: center;
}

.yi-section-title > .yi-section-icon {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    inline-size: 44px;
    block-size: 44px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #edf4fa;
    color: #003c70;
    font-size: 26px;
    line-height: 1;
}

.yi-section-title > .yi-section-icon::before {
    vertical-align: 0;
}

/* These headings already have a responsive icon container. Keep its geometry. */
.about-page-shell .about-heading-icon,
.corporate-form-card .corporate-form-title > .fa {
    border-color: transparent;
    background: #edf4fa;
    color: #003c70;
}

/* SVGs already used in the cards share the same visual weight as the new set. */
.about-page-shell .about-heading-icon::before,
.corporate-form-card .corporate-form-title > .fa::before {
    vertical-align: 0;
}

/* A translated direction label may occupy more than one line. */
#ContentPlaceHolderMain_CalcolaPercorso {
    height: auto;
    min-height: 44px;
    white-space: normal;
    line-height: 1.5;
}

@media (max-width: 767px) {
    h1.yi-section-title {
        font-size: 24px;
    }

    .yi-section-title > .yi-section-icon {
        flex-basis: 40px;
        inline-size: 40px;
        block-size: 40px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

@media (max-width: 374px) {
    h1.yi-section-title {
        font-size: 21px;
    }
}

@media (forced-colors: active) {
    .yi-section-title > .yi-section-icon {
        border: 1px solid ButtonText;
        color: ButtonText;
        background: Canvas;
    }
}

/* Public navigation only: keep existing labels, destinations and action classes. */
.btn.portal-nav-button,
.widget.offerta .buttons > a.btn {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 48px;
    padding: 11px 22px;
    border: 1px solid #003c70;
    border-radius: 12px;
    background: #003c70;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 60, 112, .10);
    font-family: var(--portal-font-family);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    vertical-align: middle;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

/* Inline text keeps translated labels and any existing nested spans together. */
.btn.portal-nav-button {
    display: inline-block;
}

.btn.portal-nav-button:hover,
.btn.portal-nav-button:focus,
.btn.portal-nav-button:active,
.widget.offerta .buttons > a.btn:hover,
.widget.offerta .buttons > a.btn:focus,
.widget.offerta .buttons > a.btn:active {
    border-color: #002b50;
    background: #002b50;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 60, 112, .14);
    text-decoration: none;
    transform: none;
}

.btn.portal-nav-button:focus-visible,
.widget.offerta .buttons > a.btn:focus-visible {
    outline: 3px solid #003c70;
    outline-offset: 3px;
}

/* Retain existing arrows, offer icons and full-width card actions. */
.btn.portal-nav-button.btn-all-offers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.widget.offerta .buttons > a.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    margin: 0;
}

.widget.offerta .buttons > a.btn > .fa {
    flex: 0 0 auto;
}

.widget.offerta .buttons > a.btn > .offer-action-label,
.btn.portal-nav-button > .offers-all-text {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
}

@media (max-width: 767px) {
    .btn.portal-nav-button,
    .widget.offerta .buttons > a.btn {
        padding-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn.portal-nav-button,
    .widget.offerta .buttons > a.btn {
        transition: none;
    }
}

/* Shared by the public and corporate layouts; supersedes legacy affix rules. */
#top-link-block,
#top-link-block.affix,
#top-link-block.affix-top {
  --back-to-top-edge: 24px;
  --back-to-top-lift: 0px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: auto;
  left: auto;
  right: calc(var(--back-to-top-edge) + env(safe-area-inset-right, 0px));
  /* Match the floating contact button at every breakpoint. */
  bottom: calc(12px + env(safe-area-inset-bottom, 0px) + var(--back-to-top-lift));
  z-index: 1000;
  width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 12px;
  background: #003c70;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 38, 72, .22);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#top-link-block.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#top-link-block svg { display: block; flex: none; width: 24px; height: 24px; }
#top-link-block:focus-visible { outline: 3px solid #fa7636; outline-offset: 3px; }
#top-link-block:active { background: #002b50; }

/* Keep the final footer links reachable, even without a floating contact spacer. */
.yi-footer .yi-footer-inner {
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

@media (hover: hover) {
  #top-link-block:hover { background: #002b50; box-shadow: 0 6px 20px rgba(0, 38, 72, .3); }
}

@media (max-width: 767px) {
  #top-link-block, #top-link-block.affix, #top-link-block.affix-top { --back-to-top-edge: 16px; }
  .yi-footer .yi-footer-inner { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: no-preference) {
  #top-link-block { transition: opacity .18s ease, background-color .18s ease, box-shadow .18s ease; }
}

@media print {
  #top-link-block, #top-link-block.affix, #top-link-block.affix-top { display: none; }
  .yi-footer .yi-footer-inner { padding-bottom: 26px; }
}

/* Reserved-area dialogs share the public site's type, spacing and blue palette. */
@font-face {
  font-family: "Portal Dialog Icons";
  src: url("/Assets/Fonts/fontawesome-webfont.woff2") format("woff2");
  font-style: normal;
  font-weight: normal;
  font-display: block;
}
@font-face {
  font-family: "Portal Dialog Calendar Icons";
  src: url("/Assets/Fonts/glyphicons-halflings-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: normal;
  font-display: block;
}
.management-modal .select2-container .comune > span,
.management-modal .select2-container .localita > span,
.management-modal .select2-container .struttura > span { font-family: "Portal Dialog Icons" !important; }
.management-modal .bootstrap-datetimepicker-widget .glyphicon { font-family: "Portal Dialog Calendar Icons" !important; }
.management-modal {
  padding-right: 0 !important;
  padding-left: 0 !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.management-modal .modal-dialog {
  width: calc(100% - 32px);
  max-width: 660px;
  margin: 24px auto;
}
.management-modal--wide .modal-dialog { max-width: 800px; }
.management-modal .modal-content {
  border: 1px solid #dce3e9;
  border-radius: 18px;
  background: #fff;
  color: #173c56;
  box-shadow: 0 20px 65px rgba(0, 24, 47, .26);
}
.management-modal .modal-header {
  position: relative;
  min-height: 86px;
  padding: 24px 80px 24px 24px;
  border-bottom: 1px solid #dce7ef;
  border-radius: 18px 18px 0 0;
  background: #eef4f8;
  text-align: left;
}
.management-modal .modal-header .modal-title {
  margin: 0;
  color: #173c56;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: none;
}
.management-modal .management-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #dce3e9;
  border-radius: 12px;
  background: #fff;
  color: #173c56;
  cursor: pointer;
}
.management-modal .management-modal-close .fa { font-size: 18px; }
.management-modal .modal-body { padding: 24px; }
.management-modal .modal-body p,
.management-modal .modal-body li { font-size: 15px; line-height: 1.65; }
#modal-aggiungievento.management-modal .modal-body p {
  padding: 14px 16px;
  border: 1px solid #f0d8bb;
  border-radius: 12px;
  background: #fff7ed;
  color: #86400d;
  font-size: 15px;
  line-height: 1.65;
}
.management-modal .modal-body h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
}
.management-modal .modal-body h3 {
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.management-modal .modal-body label,
.management-modal .modal-body strong { font-size: 14px; line-height: 1.5; }
.management-modal .form-control + strong { display: block; margin-top: 18px; margin-bottom: 8px; }
.management-modal .modal-body > .row > .col-lg-3 { margin-bottom: 16px; }
.management-modal .modal-body strong { overflow-wrap: anywhere !important; }
.management-modal .modal-body .btn {
  min-height: 44px;
  height: auto;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
}
.management-modal .modal-body .btn-primary { background: #003c70; color: #fff !important; }
.management-modal .modal-body .row {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}
.management-modal .form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 48px;
  padding: 10px 12px;
  border: 1px solid #dce3e9;
  border-radius: 12px;
  background: #fff;
  color: #173c56;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: none;
}
.management-modal textarea.form-control {
  height: auto;
  min-height: 150px;
  max-height: 55vh;
  resize: vertical;
}
.management-modal .form-control:focus {
  border-color: #287ab9;
  box-shadow: 0 0 0 3px rgba(40, 122, 185, .15);
}
.management-modal .modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e5ebef;
  text-align: left;
}
.management-modal .modal-footer::before,
.management-modal .modal-footer::after { display: none; }
.management-modal .modal-body > .modal-footer {
  margin: 24px -24px -24px;
}
.management-modal .modal-footer .btn,
.sweet-alert .btn {
  min-height: 48px;
  height: auto;
  max-width: 100%;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  text-align: center;
  text-transform: none;
}
.management-modal .modal-footer .btn-primary,
.management-modal .modal-footer .btn-success,
.management-modal .modal-footer .btn-info,
.sweet-alert .btn-primary,
.sweet-alert .btn-info,
.sweet-alert .btn-error,
.sweet-alert .btn-success { background: #003c70; border-color: #003c70; color: #fff !important; }
.management-modal .modal-footer .btn-danger,
.sweet-alert .btn-danger { background: #b63232; border-color: #b63232; color: #fff !important; }
.management-modal .modal-footer .btn-default,
.sweet-alert .btn-default { background: #f1f5f8; border-color: #dce3e9; color: #173c56 !important; }
.management-modal .modal-footer .btn-warning,
.sweet-alert .btn-warning { background: #a84b11; border-color: #a84b11; color: #fff !important; }
.management-modal button:focus-visible,
.management-modal a:focus-visible,
.sweet-alert .btn:focus-visible,
.sweet-alert button:focus-visible { outline: 3px solid #287ab9; outline-offset: 3px; }
.management-modal .ios-switch { width: 100%; table-layout: fixed; }
.management-modal .modal-body > .row > table.ios-switch { width: calc(100% - 30px); margin: 0 15px; }
.management-modal .ios-switch td { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; vertical-align: top; }
.management-modal .ios-switch label { flex: 1 1 auto; min-width: 0; margin: 0; font-weight: 500; overflow-wrap: anywhere !important; }
.management-modal .switchery { flex: 0 0 auto; margin-bottom: 4px; }
.management-modal input[type="checkbox"] { margin-right: 8px; }
.management-modal .clear { height: 16px !important; }

/* Vendor widgets have fixed inline widths; keep them inside the form. */
.management-modal .ajax-upload-dragdrop,
.management-modal .ajax-file-upload-statusbar {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #dce3e9;
  border-radius: 12px;
  background: #f6f9fb;
  color: #536675;
  font-size: 14px;
  line-height: 1.6;
}
.management-modal .ajax-upload-dragdrop { border-style: dashed; }
.management-modal .ajax-upload-dragdrop > span { display: block; }
.management-modal .ajax-upload-dragdrop .btn:focus-within {
  outline: 3px solid #287ab9;
  outline-offset: 3px;
}
.management-modal .ajax-file-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  height: auto;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 10px 16px;
  border: 1px solid #003c70;
  border-radius: 10px;
  background: #003c70;
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  white-space: normal;
  box-shadow: none;
  text-shadow: none;
}
.management-modal .ajax-file-upload-filename,
.management-modal .ajax-file-upload-error {
  width: auto;
  max-width: 100%;
  margin: 4px 0;
  font-size: 14px;
  overflow-wrap: anywhere !important;
}
.management-modal .ajax-file-upload-progress { width: 100%; max-width: 100%; margin: 8px 0; box-sizing: border-box; }
.management-modal .ajax-file-upload-filename { color: #536675; }
.management-modal .ajax-file-upload-error { color: #9b2d2d; }
.management-modal .ajax-file-upload-bar { background: #003c70; color: #fff; border-radius: 6px; }
.management-modal .ajax-file-upload-red,
.management-modal .ajax-file-upload-green {
  max-width: 100%;
  min-height: 44px;
  height: auto;
  margin: 6px 6px 0 0;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere !important;
  box-shadow: none;
  text-shadow: none;
}
.management-modal .ajax-file-upload-red { background: #86400d; border-color: #86400d; color: #fff; }
.management-modal .ajax-file-upload-green { background: #2c7b52; border-color: #2c7b52; color: #fff; }
.management-modal .modal-body .select2,
.management-modal .modal-body .select2-container { width: 100% !important; max-width: 100%; float: none; }
.management-modal .select2-container .select2-selection--single {
  height: auto;
  min-height: 48px;
  border: 1px solid #dce3e9;
  border-radius: 12px;
}
.management-modal .select2-container .select2-selection__rendered {
  height: auto;
  min-height: 46px;
  padding: 10px 34px 10px 12px;
  color: #173c56;
  font-size: 16px;
  line-height: 1.5;
  white-space: normal;
}
.management-modal .select2-container .select2-selection__arrow { top: 0; height: 46px; padding-top: 0; }
.management-modal .select2 .placeholder strong { height: auto; padding: 0; font-size: 15px; line-height: 1.6; text-align: left; }
.management-modal .select2 .comune,
.management-modal .select2 .struttura,
.management-modal .select2 .localita { height: auto; min-height: 32px; padding: 0; }
.management-modal .select2 .comune strong,
.management-modal .select2 .struttura strong,
.management-modal .select2 .localita strong { line-height: 1.5; }
.management-modal > .select2-container { width: auto !important; max-width: calc(100% - 24px); float: none; }
.management-modal .select2-dropdown {
  max-width: calc(100vw - 48px);
  border: 1px solid #dce3e9;
  border-radius: 12px;
  background: #fff;
  color: #173c56;
  box-shadow: 0 8px 28px rgba(0, 24, 47, .14);
}
.management-modal .select2-search--dropdown { padding: 8px; }
.management-modal .select2-search__field {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #dce3e9;
  border-radius: 8px;
  font-size: 16px;
}
.management-modal .select2-results__option { min-height: 44px; padding: 10px; font-size: 15px; line-height: 1.5; }
.management-modal .select2-results__option > div { height: auto; min-height: 40px; }
.management-modal .select2-results__option strong { line-height: 1.5; white-space: normal; overflow-wrap: anywhere !important; }
.management-modal .select2-container--default .select2-results__option--highlighted[aria-selected] { background: #003c70; color: #fff; }
.management-modal .select2-results__option--highlighted small { color: #e3edf5; }
.management-modal .select2-search__field:focus { outline: 2px solid rgba(40, 122, 185, .25); outline-offset: 0; border-color: #287ab9; }
.management-modal .bootstrap-datetimepicker-widget.dropdown-menu {
  width: 19em;
  max-width: calc(100% - 30px);
  padding: 10px;
  border: 1px solid #dce3e9;
  border-radius: 12px;
  background: #fff;
  color: #173c56;
  font-size: 14px;
  box-shadow: 0 8px 28px rgba(0, 24, 47, .14);
}
.management-modal .bootstrap-datetimepicker-widget table { table-layout: fixed; width: 100%; }
.management-modal .bootstrap-datetimepicker-widget table th,
.management-modal .bootstrap-datetimepicker-widget table td.day { height: 32px; line-height: 32px; }
.management-modal .bootstrap-datetimepicker-widget table th.picker-switch { width: auto; line-height: 1.5; }
.management-modal .bootstrap-datetimepicker-widget table th.prev::after,
.management-modal .bootstrap-datetimepicker-widget table th.next::after,
.management-modal .bootstrap-datetimepicker-widget .picker-switch::after { content: none; }
.management-modal .bootstrap-datetimepicker-widget table td span { width: 30%; height: auto; min-height: 40px; line-height: 40px; }

/* Existing confirmation/error behavior is retained by SweetAlert v1. */
.sweet-overlay { background: rgba(0, 24, 47, .48); }
.sweet-alert {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 520px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  left: 50%;
  right: auto;
  top: 50%;
  margin: 0 !important;
  padding: 24px;
  transform: translate(-50%, -50%);
  overflow-y: auto;
  border: 1px solid #dce3e9;
  border-radius: 18px;
  background: #fff;
  color: #173c56;
  box-shadow: 0 20px 65px rgba(0, 24, 47, .26);
  -webkit-overflow-scrolling: touch;
}
.sweet-alert h2 { margin: 18px 0 12px; font-size: 24px; font-weight: 700; line-height: 1.4; }
.sweet-alert p { margin: 0 0 24px; color: #536675; font-size: 16px; line-height: 1.65; }
.sweet-alert h2,
.sweet-alert p,
.management-modal .modal-title,
.management-modal .modal-body h2 { overflow-wrap: anywhere !important; }
.sweet-alert .btn { margin: 6px; }
.sweet-alert .btn:focus { border-color: #287ab9; box-shadow: 0 0 0 3px rgba(40, 122, 185, .15); }
.sweet-alert .icon { margin: 8px auto 16px; }
.sweet-alert .icon.info { border-color: #287ab9; }
.sweet-alert .icon.info::before,
.sweet-alert .icon.info::after { background: #287ab9; }
.sweet-alert .icon.error { border-color: #b63232; }
.sweet-alert .icon.error .line { background: #b63232; }
.sweet-alert .icon.success { border-color: #2c7b52; }
.sweet-alert .icon.success .line { background: #2c7b52; }
.sweet-alert.showSweetAlert { animation: portal-alert-in .18s ease-out; }
.sweet-alert.hideSweetAlert { animation: portal-alert-out .15s ease-in; }
@keyframes portal-alert-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes portal-alert-out { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(.96); } }

/* Inline feedback uses the same cards, with distinct semantic colors. */
body .alert {
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere !important;
}
body .alert p { font-size: inherit; line-height: inherit; }
body .alert-info { color: #164a70; background: #eef5fb; border-color: #cbdfee; }
body .alert-success { color: #246142; background: #edf8f1; border-color: #c4e1ce; }
body .alert-warning { color: #86400d; background: #fff7ed; border-color: #f0d8bb; }
body .alert-danger { color: #9b2d2d; background: #fff1f1; border-color: #eecaca; }
body .alert-dismissable,
body .alert-dismissible { padding-right: 42px; }

/* Specific dialog colors mask the generic button hover. Keep their resting style. */
.management-modal .modal-body .btn-primary:not(:where(.modal-footer .btn)),
.management-modal .modal-footer :is(.btn-info, .btn-success),
.management-modal .ajax-file-upload,
.sweet-alert :is(.btn-info, .btn-success) {
  --portal-dialog-hover-background: #002b50;
  --portal-dialog-hover-border: #002b50;
}
.management-modal .modal-footer .btn-default,
.sweet-alert .btn-default {
  --portal-dialog-hover-background: #dfedf7;
  --portal-dialog-hover-border: #9fbdd3;
}
.management-modal .modal-footer .btn-warning,
.sweet-alert .btn-warning {
  --portal-dialog-hover-background: #86400d;
  --portal-dialog-hover-border: #86400d;
}
.management-modal .ajax-file-upload-red {
  --portal-dialog-hover-background: #6e340b;
  --portal-dialog-hover-border: #6e340b;
}
.management-modal .ajax-file-upload-green {
  --portal-dialog-hover-background: #21623f;
  --portal-dialog-hover-border: #21623f;
}
.management-modal :is(.modal-body .btn-primary:not(:where(.modal-footer .btn)), .modal-footer .btn-info, .modal-footer .btn-success, .modal-footer .btn-default, .modal-footer .btn-warning, .ajax-file-upload, .ajax-file-upload-red, .ajax-file-upload-green),
.sweet-alert :is(.btn-info, .btn-success, .btn-default, .btn-warning) {
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
@media (hover: hover) {
  .management-modal :is(.modal-body .btn-primary:not(:where(.modal-footer .btn)), .modal-footer .btn-info, .modal-footer .btn-success, .modal-footer .btn-default, .modal-footer .btn-warning, .ajax-file-upload, .ajax-file-upload-red, .ajax-file-upload-green):not(:disabled):not([disabled]):not(.disabled):not(.aspNetDisabled):not([aria-disabled="true"]):not(:where(fieldset[disabled] *)):hover,
  .sweet-alert :is(.btn-info, .btn-success, .btn-default, .btn-warning):not(:disabled):not([disabled]):not(.disabled):not(.aspNetDisabled):not([aria-disabled="true"]):not(:where(fieldset[disabled] *)):hover {
    background: var(--portal-dialog-hover-background);
    border-color: var(--portal-dialog-hover-border);
    box-shadow: 0 3px 8px rgba(0, 60, 112, .12);
  }
}
.management-modal :is(.modal-body .btn-primary:not(:where(.modal-footer .btn)), .modal-footer .btn-info, .modal-footer .btn-success, .modal-footer .btn-default, .modal-footer .btn-warning, .ajax-file-upload, .ajax-file-upload-red, .ajax-file-upload-green):not(:disabled):not([disabled]):not(.disabled):not(.aspNetDisabled):not([aria-disabled="true"]):not(:where(fieldset[disabled] *)):is(:focus-visible, :active),
.management-modal :is(.ajax-file-upload, .ajax-upload-dragdrop .btn-primary):not(:disabled):not([disabled]):not(.disabled):not(.aspNetDisabled):not([aria-disabled="true"]):not(:where(fieldset[disabled] *)):focus-within,
.sweet-alert :is(.btn-info, .btn-success, .btn-default, .btn-warning):not(:disabled):not([disabled]):not(.disabled):not(.aspNetDisabled):not([aria-disabled="true"]):not(:where(fieldset[disabled] *)):is(:focus-visible, :active) {
  background: var(--portal-dialog-hover-background);
  border-color: var(--portal-dialog-hover-border);
  box-shadow: 0 3px 8px rgba(0, 60, 112, .12);
}
.management-modal .ajax-file-upload:not([disabled]):not(.disabled):not(.aspNetDisabled):not([aria-disabled="true"]):not(:where(fieldset[disabled] *)):focus-within {
  outline: 3px solid #287ab9;
  outline-offset: 3px;
}

@media (hover: hover) {
  .management-modal .management-modal-close:hover { background: #eef4f8; }
  .management-modal .modal-footer .btn-primary:hover,
  .sweet-alert .btn-error:hover,
  .sweet-alert .btn-primary:hover { background: #002e57; }
  .management-modal .modal-footer .btn-danger:hover,
  .sweet-alert .btn-danger:hover { background: #962626; }
}
@media (max-width: 575px), (max-height: 480px) {
  .management-modal .modal-dialog { width: calc(100% - 24px); margin: 12px auto; }
  .management-modal .modal-body { padding: 20px; }
  .management-modal .modal-footer { padding: 18px 20px; }
  .management-modal .modal-body > .modal-footer { margin: 24px -20px -20px; }
  .sweet-alert { width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 20px; }
}
@media (max-width: 575px) {
  .management-modal .modal-header { padding: 76px 20px 20px; }
  .management-modal .modal-footer .btn { width: 100%; }
  .management-modal .modal-body h3 { overflow-wrap: anywhere !important; }
  .sweet-alert .btn { width: 100%; margin: 6px 0; }
}
@media (max-width: 359px) {
  .management-modal .modal-header { padding-right: 16px; padding-left: 16px; }
  .management-modal .modal-header .modal-title { font-size: 20px; }
  .management-modal .modal-body { padding: 16px; }
  .management-modal .modal-footer { padding: 16px; }
  .management-modal .modal-body > .modal-footer { margin: 20px -16px -16px; }
  .sweet-alert { padding: 18px; }
  .sweet-alert h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .sweet-alert, .sweet-alert * { animation: none !important; }
  .management-modal :is(.modal-body .btn-primary:not(:where(.modal-footer .btn)), .modal-footer .btn-info, .modal-footer .btn-success, .modal-footer .btn-default, .modal-footer .btn-warning, .ajax-file-upload, .ajax-file-upload-red, .ajax-file-upload-green),
  .sweet-alert :is(.btn-info, .btn-success, .btn-default, .btn-warning) { transition: none; }
}

