/*
* quote-source.css
* Scoped to .pi-qs-* only - does not override any existing class.
*
* v2: upgraded visual design (clearer cards, refined states) and added
* .pi-qs-badge / .pi-qs-badge-flag / .pi-qs-badge-icon for the small
* flag/icon badges at the top of each card, plus .pi-qs-check for the
* selected-state indicator.
*
* NOTE: this file is deliberately written as plain, fully-closed flat
* CSS (every rule has a matching closing brace) - a previous version
* was missing closing braces, which made Chrome/Android and Safari/iOS
* recover from the parse error differently and render this section
* inconsistently across devices. Keep that discipline when editing.
*/

.pi-qs-block {
  margin-bottom: 22px;
}

.pi-qs-legend {
  font-weight: 700;
  font-size: 15px;
  color: #1a2533;
  margin-bottom: 12px;
  letter-spacing: -0.1px;
}

.pi-qs-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pi-qs-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.pi-qs-radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pi-qs-card-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 12px 16px;
  border: 1.5px solid #e1e7ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .1s ease;
  height: 100%;
  box-sizing: border-box;
}

.pi-qs-card:hover .pi-qs-card-inner {
  border-color: #a9c9ef;
  background: #f8fbff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.06);
}

.pi-qs-radio:checked + .pi-qs-card-inner,
.pi-qs-card.is-selected .pi-qs-card-inner {
  border-color: #1e88e5;
  background: #eef6ff;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.14);
  transform: none;
}

.pi-qs-radio:focus-visible + .pi-qs-card-inner {
  outline: 2px solid #1565c0;
  outline-offset: 2px;
}

/* ---- badges (flag or icon), same footprint so all 3 cards line up ---- */
.pi-qs-badge {
  width: 46px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pi-qs-badge-flag {
  border: 1px solid rgba(16, 24, 40, 0.10);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  background: #fff;
}

.pi-qs-badge-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pi-qs-badge-icon {
  background: linear-gradient(135deg, #1e88e5, #1565c0);
  box-shadow: 0 2px 6px rgba(21, 101, 192, 0.28);
}

.pi-qs-badge-icon i {
  color: #fff;
  font-size: 15px;
}

.pi-qs-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #1a2533;
}

.pi-qs-sub {
  font-size: 11.5px;
  color: #667085;
  line-height: 1.4;
}

/* ---- selected-state checkmark ---- */
.pi-qs-check {
  position: absolute;
  top: -8px;
  inset-inline-end: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1e88e5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  box-shadow: 0 2px 5px rgba(16, 24, 40, 0.18), 0 0 0 2px #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity .12s ease, transform .12s ease;
}

.pi-qs-radio:checked + .pi-qs-card-inner .pi-qs-check,
.pi-qs-card.is-selected .pi-qs-card-inner .pi-qs-check {
  opacity: 1;
  transform: scale(1);
}

.pi-qs-error {
  margin-top: 10px;
}

.pi-qs-block.has-error .pi-qs-card-inner {
  border-color: #c62828;
}

@media (max-width: 560px) {
  .pi-qs-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pi-qs-card-inner {
    flex-direction: row;
    text-align: right;
    justify-content: flex-start;
    padding: 12px 14px;
    gap: 12px;
  }

  .pi-qs-badge {
    width: 40px;
    height: 28px;
  }

  .pi-qs-badge-icon i {
    font-size: 13px;
  }

  .pi-qs-check {
    top: -6px;
    inset-inline-end: -6px;
  }
}
