/* Kerio Control comparison and quotation dialogs. */

body.gfi-modal-open {
  overflow: hidden;
}

body.gfi-modal-open #jvLabelWrap,
body.gfi-modal-open #jcont {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.gfi-modal[hidden] {
  display: none !important;
}

.gfi-modal {
  position: fixed;
  z-index: 100100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(2, 10, 29, 0.8);
  opacity: 0;
  overscroll-behavior: contain;
  transition: opacity 220ms ease;
}

.gfi-modal.is-open {
  opacity: 1;
}

.gfi-modal__panel {
  position: relative;
  width: min(100%, 1320px);
  max-height: min(900px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(120, 151, 226, 0.28);
  border-radius: 28px;
  background: #0c1530;
  color: #dce7ff;
  box-shadow: 0 36px 110px rgba(0, 5, 20, 0.62);
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition:
    opacity 260ms var(--gfi-ease),
    transform 260ms var(--gfi-ease);
}

.gfi-modal.is-open .gfi-modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gfi-modal--quote .gfi-modal__panel {
  width: min(100%, 1040px);
  overflow-y: auto;
}

.gfi-modal--compare .gfi-modal__panel {
  display: grid;
  height: min(900px, calc(100vh - 48px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.gfi-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 32px 24px;
  border-bottom: 1px solid rgba(142, 167, 225, 0.16);
  background: #111d40;
}

.gfi-modal__header > div {
  max-width: 850px;
}

.gfi-modal__eyebrow {
  margin-bottom: 8px;
  color: #79d8ec;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.gfi-modal__header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 1.08;
}

.gfi-modal__header p:last-child {
  max-width: 760px;
  margin: 12px 0 0;
  color: #adbad6;
  font-size: 0.96rem;
  line-height: 1.55;
}

.gfi-modal__close {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(144, 169, 227, 0.3);
  border-radius: 14px;
  background: #172448;
  color: #dce7ff;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.gfi-modal__close:hover {
  border-color: #79d8ec;
  background: #1d2f5e;
  color: #fff;
  transform: rotate(4deg);
}

.gfi-modal__close svg {
  width: 21px;
  height: 21px;
}

.gfi-compare-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(142, 167, 225, 0.14);
  background: #0f1936;
  color: #c9d6f2;
  font-size: 0.82rem;
}

.gfi-compare-summary > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid rgba(139, 170, 238, 0.2);
  border-radius: 999px;
  background: #151f40;
}

.gfi-compare-summary i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 5px rgba(110, 231, 183, 0.12);
}

.gfi-compare-summary strong {
  color: #fff;
}

.gfi-compare-summary small {
  margin-left: auto;
  color: #8493b4;
}

.gfi-compare-table-wrap {
  min-height: 0;
  overflow: auto;
  scrollbar-color: #35528f #0d1730;
  scrollbar-width: thin;
}

.gfi-compare-table {
  width: 100%;
  min-width: 1420px;
  border-spacing: 0;
  color: #d9e4fb;
  font-size: 0.82rem;
  line-height: 1.45;
}

.gfi-compare-table th,
.gfi-compare-table td {
  padding: 17px 14px;
  border-right: 1px solid rgba(137, 164, 222, 0.1);
  border-bottom: 1px solid rgba(137, 164, 222, 0.12);
  vertical-align: top;
}

.gfi-compare-table thead th {
  position: sticky;
  z-index: 3;
  top: 0;
  background: #162448;
  color: #9fb2d9;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-align: left;
  text-transform: uppercase;
}

.gfi-compare-table thead th:first-child {
  z-index: 5;
  left: 0;
}

.gfi-compare-table tbody th {
  position: sticky;
  z-index: 2;
  left: 0;
  width: 150px;
  min-width: 150px;
  background: #101a37;
  text-align: left;
}

.gfi-compare-table tbody tr {
  transition: background-color 180ms ease;
}

.gfi-compare-table tbody tr:hover td {
  background: #14203f;
}

.gfi-compare-table tbody tr.is-current td,
.gfi-compare-table tbody tr.is-current th {
  background: #182a57;
}

.gfi-compare-table tbody tr.is-current th {
  box-shadow: inset 4px 0 #70c9df;
}

.gfi-compare-model {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  color: #fff;
}

.gfi-compare-model span {
  font-size: 1.08rem;
  font-weight: 820;
  letter-spacing: -0.015em;
}

.gfi-compare-model small {
  color: #8ca1cb;
  font-size: 0.65rem;
  font-weight: 650;
}

.gfi-compare-model:hover span {
  color: #79d8ec;
}

.gfi-compare-table th em {
  display: inline-flex;
  margin-top: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #79d8ec;
  color: #07142d;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gfi-compare-table__fit {
  width: 210px;
  min-width: 210px;
  color: #b7c6e5;
}

.gfi-compare-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #79d8ec;
  font-weight: 780;
  white-space: nowrap;
}

.gfi-compare-open svg {
  width: 16px;
  transition: transform 180ms ease;
}

.gfi-compare-open:hover svg {
  transform: translateX(4px);
}

.gfi-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  border-top: 1px solid rgba(142, 167, 225, 0.16);
  background: #111d40;
}

.gfi-modal__footer p {
  max-width: 730px;
  margin: 0;
  color: #96a7c9;
  font-size: 0.78rem;
  line-height: 1.5;
}

.gfi-modal__footer .gfi-button {
  flex: 0 0 auto;
  min-height: 48px;
}

.gfi-quote-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(0, 1.5fr);
  min-height: 580px;
}

.gfi-quote-context {
  padding: 30px;
  border-right: 1px solid rgba(142, 167, 225, 0.16);
  background: #101a38;
}

.gfi-quote-context__device {
  display: grid;
  min-height: 155px;
  margin-bottom: 25px;
  place-items: center;
  padding: 20px;
  border: 1px solid rgba(142, 167, 225, 0.16);
  border-radius: 20px;
  background: #172345;
}

.gfi-quote-context__device img {
  width: 100%;
  max-height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.24));
  transition: transform 240ms var(--gfi-ease);
}

.gfi-quote-context__device:hover img {
  transform: translateY(-4px);
}

.gfi-quote-context > p {
  margin: 0 0 6px;
  color: #8fa1c7;
  font-size: 0.75rem;
}

.gfi-quote-context h3 {
  margin: 0 0 23px;
  color: #fff;
  font-size: 1.42rem;
}

.gfi-quote-context ul {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gfi-quote-context li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #c6d3ee;
  font-size: 0.84rem;
  line-height: 1.45;
}

.gfi-quote-context li svg {
  flex: 0 0 auto;
  width: 18px;
  margin-top: 2px;
  color: #6ee7b7;
}

.gfi-quote-context .gfi-quote-context__note {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(142, 167, 225, 0.14);
  color: #7f91b8;
  line-height: 1.55;
}

.gfi-quote-form {
  position: relative;
  padding: 30px;
  background: #0c1530;
}

.gfi-quote-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.gfi-field {
  display: grid;
  gap: 7px;
}

.gfi-field--wide {
  grid-column: 1 / -1;
}

.gfi-field > span,
.gfi-quote-human > div > span {
  color: #becbea;
  font-size: 0.77rem;
  font-weight: 720;
}

.gfi-field b,
.gfi-quote-human b {
  color: #79d8ec;
}

.gfi-field input,
.gfi-field select,
.gfi-field textarea,
.gfi-quote-human input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(139, 168, 228, 0.28);
  border-radius: 12px;
  background: #131f40;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.gfi-field input,
.gfi-field select,
.gfi-quote-human input {
  padding: 0 14px;
}

.gfi-field textarea {
  min-height: 106px;
  padding: 12px 14px;
  resize: vertical;
}

.gfi-field select {
  cursor: pointer;
}

.gfi-field input::placeholder,
.gfi-field textarea::placeholder {
  color: #7082aa;
}

.gfi-field input:focus,
.gfi-field select:focus,
.gfi-field textarea:focus,
.gfi-quote-human input:focus {
  border-color: #70c9df;
  background: #17264b;
  box-shadow: 0 0 0 4px rgba(112, 201, 223, 0.12);
}

.gfi-quote-form.is-validated .gfi-field input:invalid,
.gfi-quote-form.is-validated .gfi-field textarea:invalid,
.gfi-quote-form.is-validated .gfi-field select:invalid {
  border-color: rgba(255, 116, 139, 0.72);
}

.gfi-field small {
  color: #7f91b8;
  font-size: 0.68rem;
  line-height: 1.4;
}

.gfi-quote-human {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto;
  align-items: end;
  gap: 12px;
  margin-top: 19px;
  padding: 14px;
  border: 1px solid rgba(112, 201, 223, 0.22);
  border-radius: 15px;
  background: #101d3d;
}

.gfi-quote-human > div {
  display: grid;
  gap: 4px;
}

.gfi-quote-human strong {
  min-height: 25px;
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.gfi-quote-human label {
  display: block;
}

.gfi-quote-human input {
  text-align: center;
}

.gfi-quote-human button {
  min-height: 48px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: #213460;
  color: #9fc8ea;
  cursor: pointer;
  font: inherit;
  font-size: 0.73rem;
  font-weight: 760;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.gfi-quote-human button:hover {
  background: #294273;
  color: #fff;
}

.gfi-quote-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
  color: #9aabd0;
  cursor: pointer;
  font-size: 0.73rem;
  line-height: 1.45;
}

.gfi-quote-consent input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #20b9d4;
}

.gfi-quote-status {
  min-height: 22px;
  margin: 13px 0 8px;
  color: #ff9aac;
  font-size: 0.78rem;
  font-weight: 650;
}

.gfi-quote-status.is-success {
  color: #6ee7b7;
}

.gfi-quote-submit {
  width: 100%;
  min-height: 52px;
  justify-content: center;
}

.gfi-quote-submit[disabled] {
  cursor: wait;
  opacity: 0.55;
}

.gfi-quote-submit.is-loading svg {
  animation: gfi-quote-loading 800ms linear infinite;
}

.gfi-quote-form__hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.gfi-quote-success {
  grid-column: 2;
  align-self: center;
  max-width: 440px;
  margin: 60px auto;
  padding: 38px;
  text-align: center;
}

.gfi-quote-success > span {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 20px;
  background: #183d43;
  color: #6ee7b7;
}

.gfi-quote-success svg {
  width: 32px;
}

.gfi-quote-success h3 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.8rem;
}

.gfi-quote-success p {
  margin-bottom: 25px;
  color: #aab9d8;
}

@keyframes gfi-quote-loading {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .gfi-modal {
    padding: 14px;
  }

  .gfi-modal__panel {
    max-height: calc(100vh - 28px);
    border-radius: 22px;
  }

  .gfi-modal__header {
    padding: 23px 22px 20px;
  }

  .gfi-compare-summary {
    flex-wrap: wrap;
    padding: 15px 22px;
  }

  .gfi-compare-summary small {
    width: 100%;
    margin-left: 0;
  }


  .gfi-modal__footer {
    padding: 17px 22px;
  }

  .gfi-quote-layout {
    grid-template-columns: 1fr;
  }

  .gfi-quote-context {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 6px 20px;
    padding: 22px;
    border-right: 0;
    border-bottom: 1px solid rgba(142, 167, 225, 0.16);
  }

  .gfi-quote-context__device {
    grid-row: 1 / 5;
    min-height: 112px;
    margin: 0;
    padding: 12px;
  }

  .gfi-quote-context > p,
  .gfi-quote-context h3,
  .gfi-quote-context ul {
    grid-column: 2;
  }

  .gfi-quote-context h3 {
    margin-bottom: 10px;
  }

  .gfi-quote-context ul {
    gap: 7px;
  }

  .gfi-quote-context .gfi-quote-context__note {
    display: none;
  }

  .gfi-quote-success {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .gfi-modal {
    align-items: end;
    padding: 0;
  }

  .gfi-modal__panel,
  .gfi-modal--quote .gfi-modal__panel {
    width: 100%;
    max-height: 94dvh;
    border-radius: 24px 24px 0 0;
  }

  .gfi-modal--compare .gfi-modal__panel {
    height: 94dvh;
  }

  .gfi-modal__header {
    gap: 15px;
    padding: 20px 18px 17px;
  }

  .gfi-modal__header h2 {
    font-size: 1.55rem;
  }

  .gfi-modal__header p:last-child {
    font-size: 0.81rem;
  }

  .gfi-modal__close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .gfi-compare-summary {
    padding: 13px 18px;
  }

  .gfi-compare-summary > span {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 0.72rem;
  }


  .gfi-compare-table {
    min-width: 1320px;
  }

  .gfi-compare-table th,
  .gfi-compare-table td {
    padding: 14px 12px;
  }

  .gfi-compare-table tbody th {
    width: 128px;
    min-width: 128px;
  }

  .gfi-modal__footer {
    display: grid;
    gap: 12px;
    padding: 14px 18px 18px;
  }

  .gfi-modal__footer .gfi-button {
    width: 100%;
    justify-content: center;
  }

  .gfi-quote-context {
    grid-template-columns: 92px 1fr;
    gap: 4px 14px;
    padding: 17px 18px;
  }

  .gfi-quote-context__device {
    min-height: 86px;
    border-radius: 15px;
  }

  .gfi-quote-context > p {
    font-size: 0.67rem;
  }

  .gfi-quote-context h3 {
    margin-bottom: 6px;
    font-size: 1.13rem;
  }

  .gfi-quote-context ul {
    gap: 3px;
  }

  .gfi-quote-context li {
    font-size: 0.68rem;
  }

  .gfi-quote-context li:nth-child(3) {
    display: none;
  }

  .gfi-quote-form {
    padding: 20px 18px 24px;
  }

  .gfi-quote-form__fields {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .gfi-field--wide {
    grid-column: auto;
  }

  .gfi-quote-human {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .gfi-quote-human button {
    grid-column: 1 / -1;
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gfi-modal,
  .gfi-modal__panel,
  .gfi-modal__close,
  .gfi-compare-table tbody tr,
  .gfi-compare-open svg,
  .gfi-quote-context__device img {
    transition: none !important;
  }

  .gfi-quote-submit.is-loading svg {
    animation: none !important;
  }
}
