﻿#header-traveltool {
  --secondary-background-color: var(--color-secondary-600, #44AAA6);
  --primary-font-color:         #3c3c3c;
  --header-color-top-bg:        var(--primary-font-color);
  --header-color-top-text:      #f7f7f7;
  --header-color-nav-bg:        var(--secondary-background-color, #44AAA6);
  --header-color-text:          var(--primary-font-color);
  --header-color-accent:        var(--secondary-background-color, #44AAA6);

  & ul { margin: 0; padding: 0; list-style: none; }

  & .container {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
  }

 & .header__middle-content-container--with-banner{
  position: relative;
}

 & .header__middle-content-container--with-banner .header__banner-container{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

 & .header__middle-content-container--with-banner .header__banner{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

 & .header__middle-content-container--with-banner .header__banner-image{
  max-height: 90px;
  width: auto;
  display: block;
}


  & .header__nav-top {
    background-color: var(--header-color-top-bg);
    color: var(--header-color-top-text);
    font-size: .75rem;
    text-transform: uppercase;
  }

  & .header__nav-top-container {
    min-height: 24px;
    display: flex;
    align-items: center;
  }

  & .header__nav-help {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }

  & .header__nav-help-link,
  & .dropdown__toggle,
  & .dropdown__toggle-content {
    color: var(--header-color-top-text);
    font-size: 12px;
    line-height: 24px;
    text-transform: uppercase;
    margin-left: 8px;
  }

  & .header__nav-help-link { display: inline-flex; align-items: center; }

  & .header__nav-top-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--header-color-top-text);
    font-size: 12px;
    margin: 0 13px;
    line-height: 24px;
  }

  & .header__language,
  & .dropdown { display: flex; align-items: center; }

  & .dropdown { position: relative; }

  & .dropdown__toggle {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    gap: 7px;
  }

  & .image {
    width: 18px;
    height: 18px;
    border: 1px solid #e9e9e9;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    & .image__image {
      width: 100%;
      display: block;
    }
  }

  & .dropdown__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    display: none;
    padding: 8px 0;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 8px 24px rgba(0,0,0,.16);
    z-index: 20;

    &.is-visible { display: block; }
  }

  & .dropdown__item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--header-color-text);
    font-size: 12px;
    padding: 8px 12px;
    white-space: nowrap;
    cursor: pointer;

    &:hover {
      background: #f5f7f8;
      color: var(--header-color-nav-bg);
    }
  }

  & .header__social { display: flex; align-items: center; gap: 12px; }

  & .header__social-link {
    color: var(--header-color-top-text);
    font-size: 13px;
    line-height: 24px;

    & i {
      color: inherit !important;
      font-size: inherit;
    }
  }

  & .header__middle-content { background: #fff; }

  & .header__middle-content-container {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
  }

  & .header__logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;

    & figure { margin: 0; }
  }

  & .header__logo-img {
    max-height: 58px;
    max-width: 320px;
    width: auto;
    display: block;
  }

  & .header__agent-banner,
  & .header__agent { display: flex; align-items: center; }

  & .header__agent-banner { margin-left: auto; }

  & .header__agent {
    gap: 28px;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  & .header__origin,
  & .header__agency {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  & .header__origin {
    padding-right: 24px;
    border-right: 1px solid #ececec;
  }

  & .header__agency-info,
  & .header__origin-content {
    display: flex;
    flex-direction: column;
  }

  & .header__origin-label,
  & .header__agency-heading {
    display: block;
    color: #8a8a8a;
    font-size: 12px;
    line-height: 1.15;
  }

  & .header__agency-heading { text-transform: uppercase; }

  & .header__agency-phone-info {
    display: block;
    color: #8a8a8a;
    font-size: 14px;
    line-height: 1.3;
    margin-top: 2px;
  }

  & .header__origin-origin,
  & .header__agency-agency,
  & .header__agency-phone {
    color: black;
    font-size: 16px;
    line-height: 1.2;
  }

  & .header__origin-origin { text-transform: uppercase; }

  & #botonOrigenes { padding-left: 0; }

  & .header__origin i.nico-plane,
  & .header__agency i.nico-assistant {
    font-size: 3.1rem;
    color: #a8a8a8;
    line-height: 1;
    flex-shrink: 0;
  }

  & .header__origin i.nico-plane::before,
  & .header__agency i.nico-assistant::before {
    font-family: 'nico', sans-serif !important;
  }

  & .header__nav-primary-container {
    background: var(--header-color-nav-bg);
    position: relative;
  }

  & .header__nav-primary-list {
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0 20px;
    line-height: 20px;
  }

  & .header__nav-primary-item {
    position: static;
    border-right: 0;
  }

  & .header__nav-primary-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 7px 20px;
    color: #fff;
    font-size: 14px;
    line-height: 42px;
    text-transform: uppercase;
    transition: background-color .2s ease, color .2s ease;
    white-space: nowrap;
  }

  & .header__nav-primary-item:hover > .header__nav-primary-link,
  & .header__nav-primary-item:focus-within > .header__nav-primary-link {
    background-color: var(--color-secondary-300, #B7E5E3);
    color: var(--color-secondary-600, #44AAA6);
  }

  & .header__nav-arrow {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
  }

  & .header__nav-primary-more-icon {
    font-size: 16px;
    line-height: 1;
  }

  & .header__submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    padding: 28px 40px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: 3px solid var(--header-color-accent);
    box-shadow: 0 12px 30px rgba(0,0,0,.14);
    z-index: 30;
    gap: 40px;
  }

  & .header__nav-primary-item:hover > .header__submenu,
  & .header__nav-primary-item:focus-within > .header__submenu {
    display: flex;
  }

  & .header__submenu-group { min-width: 180px; }

  & .header__submenu-title { margin-bottom: 10px; }

  & .header__submenu-title-text {
    color: var(--header-color-nav-bg);
    font-size: 16px;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
  }

  & .header__submenu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  & .header__submenu-item-link {
    color: #3c3c3c;
    font-size: 15px;
    line-height: 1.35;
    text-transform: capitalize;
  }

  & .header__submenu-item-link:hover,
  & .header__submenu--more-item-link:hover {
    color: var(--header-color-nav-bg);
  }

  & .header__submenu--more {
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 40px;
    min-width: unset;
  }

  & .header__nav-primary-item--more {
    position: static;
    background-color: rgba(0,0,0,0.2);
  }

  & .header__nav-primary-item--more:hover > .header__submenu.header__submenu--more,
  & .header__nav-primary-item--more:focus-within > .header__submenu.header__submenu--more {
    display: grid;
  }

  & .header__submenu--more-item-link {
    display: block;
    color: #3c3c3c;
    font-size: 13px;
    line-height: 1.35;
  }

  & .header__submenu--more-item-title {
    display: block;
    color: var(--header-color-nav-bg);
    font-size: 16px;
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  & .header__submenu--more-item-description {
    margin: 2px 0 0;
    color: #3c3c3c;
    font-size: 15px;
    line-height: 1.35;
  }

  & [data-type="modal-origins"] {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1061;
    background: rgba(0, 45, 130, .92);
    align-items: flex-start;
    justify-content: center;
    padding-top: 48px;

    &.is-visible,
    &[aria-hidden="false"] {
      display: flex !important;
    }

    & .modal__content {
      background: #fff;
      border-radius: 0;
      width: 850px;
      max-width: calc(100vw - 40px);
      max-height: 86vh;
      display: flex;
      flex-direction: column;
      position: relative;
    }

    & .modal__header {
      padding: 16px 22px 12px;
      border-bottom: 1px solid #e0e0e0;
    }

    & .modal-header {
      border-bottom:none;
      padding: 0;
      min-height: 0;
    }

    & .modal-header__title {
      margin: 0;
      font-size: 16px;
      line-height: 1.2;
      color: var(--header-color-nav-bg);
    }

    & .modal__body {
      padding: 16px 22px 20px;
      overflow-y: auto;
    }

    & .modal__close {
      position: absolute;
      padding: 14px 0px;
      right: 14px;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 24px;
      color: #58b9b8;
    }
  }

  & .origin-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block !important;
    column-count: 4;
    column-gap: 42px;
  }

  & .origin-list__item {
    display: block;
    width: 100%;
    break-inside: avoid;
    margin: 0 0 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.35;
    color: #3c3c3c;
    border-radius: 0;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;

    &:hover { background: #f2f2f2; }

    &.selected {
      font-weight: 600;
      color: #3c3c3c;
      background: #e6e6e6;
    }

    &.selected .origin-list__icon {
      color: #58b9b8;
    }
  }

  & .origin-list__icon {
    float: right;
    margin-left: 8px;
    color: #58b9b8;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    display: inline;
  }

  @media (max-width: 991px) {
    & .origin-list {
      column-count: 2;
      column-gap: 20px;
    }

    & .header__nav-top,
    & .header__middle-content,
    & .header__nav-primary-container {
      display: none;
    }

    & .visible-phone,
    & .visible-xs {
      display: block;
    }
  }
}
