:root {
  --sme-pfs-accent: #70AB3D;
  --sme-pfs-black: #000000;
  --sme-pfs-white: #ffffff;
  --sme-pfs-text: #222222;
  --sme-pfs-muted: #666666;
  --sme-pfs-soft: #f7fbf4;
}

.sme-pfs,
.sme-pfs * {
  box-sizing: border-box;
}

.sme-pfs {
  font-family: Inter, Arial, sans-serif;
  z-index: 999998;
}

.sme-pfs-floating {
  position: fixed;
}

.sme-pfs-position-bottom_left {
  left: 22px;
  bottom: 22px;
}

.sme-pfs-position-bottom_right {
  right: 22px;
  bottom: 22px;
}

.sme-pfs-position-side_left {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.sme-pfs-position-side_right {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.sme-pfs-trigger {
  border: none;
  border-radius: 999px;
  background: var(--sme-pfs-accent);
  color: var(--sme-pfs-white);
  min-height: 54px;
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Manrope, Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.sme-pfs-trigger:hover,
.sme-pfs-trigger:focus {
  background: var(--sme-pfs-black);
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.22);
}

.sme-pfs-position-side_left .sme-pfs-trigger,
.sme-pfs-position-side_right .sme-pfs-trigger {
  border-radius: 0 999px 999px 0;
  padding: 16px 18px;
}

.sme-pfs-position-side_right .sme-pfs-trigger {
  border-radius: 999px 0 0 999px;
}

.sme-pfs-trigger-icon svg,
.sme-pfs-panel-icon svg,
.sme-pfs-submit svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.sme-pfs-panel {
  position: absolute;
  width: min(390px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 26px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: all 0.25s ease;
}

.sme-pfs-panel.sme-pfs-panel-open,
.sme-pfs.sme-pfs-open .sme-pfs-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.sme-pfs-position-bottom_left .sme-pfs-panel {
  left: 0;
  bottom: 72px;
}

.sme-pfs-position-bottom_right .sme-pfs-panel {
  right: 0;
  bottom: 72px;
}

.sme-pfs-position-side_left .sme-pfs-panel {
  left: 18px;
  top: 50%;
  transform: translateY(-50%) translateX(-10px) scale(0.98);
}

.sme-pfs-position-side_left.sme-pfs-open .sme-pfs-panel {
  transform: translateY(-50%) translateX(0) scale(1);
}

.sme-pfs-position-side_right .sme-pfs-panel {
  right: 18px;
  top: 50%;
  transform: translateY(-50%) translateX(10px) scale(0.98);
}

.sme-pfs-position-side_right.sme-pfs-open .sme-pfs-panel {
  transform: translateY(-50%) translateX(0) scale(1);
}

.sme-pfs-inline {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.sme-pfs-inline .sme-pfs-panel {
  position: relative;
  width: 100%;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.08);
}

.sme-pfs-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f2f2f2;
  color: #111111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sme-pfs-close:hover {
  background: #000000;
  color: #ffffff;
}

.sme-pfs-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-right: 34px;
  margin-bottom: 18px;
}

.sme-pfs-panel-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--sme-pfs-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.sme-pfs-panel-head h3 {
  font-family: Manrope, Inter, Arial, sans-serif;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 800;
  color: #000000;
  margin: 0 0 6px;
}

.sme-pfs-panel-head p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--sme-pfs-muted);
  margin: 0;
}

.sme-pfs-form {
  margin: 0;
}

.sme-pfs-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sme-pfs-input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 999px;
  padding: 0 56px 0 18px;
  background: #ffffff;
  color: #111111;
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sme-pfs-input:focus {
  border-color: var(--sme-pfs-accent);
  box-shadow: 0 0 0 4px rgba(112, 171, 61, 0.14);
}

.sme-pfs-submit {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--sme-pfs-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease;
}

.sme-pfs-submit:hover {
  background: #000000;
}

.sme-pfs-results {
  margin-top: 14px;
  max-height: 360px;
  overflow: auto;
}

.sme-pfs-status {
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--sme-pfs-soft);
  color: var(--sme-pfs-muted);
  font-size: 14px;
}

.sme-pfs-result-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sme-pfs-result-link {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #000000;
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.sme-pfs-result-link:hover,
.sme-pfs-result-link:focus {
  border-color: rgba(112, 171, 61, 0.5);
  background: #fbfdf9;
  transform: translateY(-1px);
}

.sme-pfs-result-image {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--sme-pfs-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--sme-pfs-accent);
}

.sme-pfs-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sme-pfs-result-image svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.sme-pfs-result-title {
  display: block;
  font-family: Manrope, Inter, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
  color: #000000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sme-pfs-result-subtitle {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: var(--sme-pfs-muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sme-pfs-result-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(112, 171, 61, 0.12);
  color: var(--sme-pfs-accent);
  font-family: Manrope, Inter, Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 8px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .sme-pfs-position-bottom_left,
  .sme-pfs-position-bottom_right {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .sme-pfs-position-bottom_left .sme-pfs-panel,
  .sme-pfs-position-bottom_right .sme-pfs-panel {
    left: 0;
    right: 0;
    bottom: 70px;
    width: 100%;
  }

  .sme-pfs-position-side_left,
  .sme-pfs-position-side_right {
    top: auto;
    transform: none;
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .sme-pfs-position-side_left .sme-pfs-trigger,
  .sme-pfs-position-side_right .sme-pfs-trigger {
    border-radius: 999px;
  }

  .sme-pfs-position-side_left .sme-pfs-panel,
  .sme-pfs-position-side_right .sme-pfs-panel,
  .sme-pfs-position-side_left.sme-pfs-open .sme-pfs-panel,
  .sme-pfs-position-side_right.sme-pfs-open .sme-pfs-panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: 70px;
    width: 100%;
    transform: translateY(0) scale(1);
  }

  .sme-pfs-trigger {
    width: 100%;
    justify-content: center;
  }

  .sme-pfs-panel {
    padding: 18px;
  }

  .sme-pfs-result-link {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .sme-pfs-result-type {
    grid-column: 2;
    justify-self: start;
  }
}
