.fvis-host {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fvis-icon-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fvis-trigger-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  vertical-align: middle;
}

.fvis-trigger {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  vertical-align: middle;
}

.jas-header .fvis-trigger,
.site-header .fvis-trigger,
header .fvis-trigger {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-color: transparent;
  font-size: 18px;
}

.fvis-trigger:hover,
.fvis-trigger:focus {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}

.fvis-header-fallback {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}

.fvis-lock {
  overflow: hidden;
}

.fvis-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 20, 20, 0.56);
}

.fvis-modal[aria-hidden="false"] {
  display: flex;
}

.fvis-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  color: #1c1c1c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  padding: 22px;
}

.fvis-dialog h2 {
  margin: 0 42px 16px 0;
  font-size: 22px;
  line-height: 1.2;
}

.fvis-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  background: #fff;
  color: #222;
  cursor: pointer;
  font-size: 24px;
  line-height: 30px;
  padding: 0;
}

.fvis-dropzone {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed #b8b8b8;
  border-radius: 8px;
  background: #f7f7f7;
  cursor: pointer;
  text-align: center;
  padding: 20px;
}

.fvis-dropzone:hover {
  border-color: #222;
  background: #f2f2f2;
}

.fvis-camera {
  font-size: 30px;
  line-height: 1;
}

.fvis-dropzone small {
  color: #666;
}

.fvis-status {
  min-height: 22px;
  margin: 14px 0 10px;
  color: #555;
  font-size: 14px;
}

.fvis-status.is-error {
  color: #b3261e;
}

.fvis-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.fvis-product {
  display: block;
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.fvis-product:hover,
.fvis-product:focus {
  border-color: #222;
  color: inherit;
  text-decoration: none;
}

.fvis-product img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f3f3f3;
}

.fvis-product-body {
  display: flex;
  min-height: 124px;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
}

.fvis-product-title {
  display: -webkit-box;
  overflow: hidden;
  color: #222;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.fvis-product-price {
  color: #111;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.fvis-product-score {
  display: grid;
  gap: 2px;
  color: #666;
  font-size: 12px;
  line-height: 1.25;
}

@media (max-width: 767px) {
  .fvis-trigger {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 17px;
  }

  .fvis-trigger-wrap {
    margin-left: 4px;
  }

  .fvis-modal {
    align-items: flex-end;
    padding: 0;
  }

  .fvis-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 8px 8px 0 0;
    padding: 18px;
  }

  .fvis-dialog h2 {
    font-size: 20px;
  }

  .fvis-dropzone {
    min-height: 118px;
  }

  .fvis-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .fvis-product-body {
    min-height: 118px;
    padding: 9px;
  }

  .fvis-product-title,
  .fvis-product-price,
  .fvis-product-score {
    font-size: 13px;
  }

  .fvis-product-score {
    font-size: 12px;
  }
}
