.javo-listing-qr {
  --javo-qr-border: #e5e7eb;
  --javo-qr-text: #111827;
  --javo-qr-muted: #6b7280;
  --javo-qr-accent: #4f46e5;
  box-sizing: border-box;
  display: flex;
  width: 100%;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--javo-qr-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  color: var(--javo-qr-text);
}

.javo-post-meta-wrapper--qr-code,
.javo-post-meta-content--qr-code,
.javo-post-meta-value--qr-code {
  width: 100%;
  max-width: none;
}

.javo-post-meta-content--qr-code {
  display: flex;
}

.javo-post-meta-value--qr-code {
  display: block;
}

.javo-listing-qr__title {
  margin: 0;
  max-width: 260px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.javo-listing-qr__code {
  display: flex;
  width: 100%;
  min-height: 120px;
  min-width: 120px;
  align-items: center;
  justify-content: center;
}

.javo-listing-qr__code svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.javo-listing-qr__actions {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.javo-listing-qr__button,
.javo-qr-action-button,
.javo-qr-modal__button,
.javo-qr-modal__icon-button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.javo-listing-qr__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--javo-qr-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 10px;
  color: var(--javo-qr-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.javo-listing-qr__button:hover,
.javo-listing-qr__button:focus-visible {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: var(--javo-qr-accent);
}

.javo-listing-qr--layout-side_actions {
  flex-direction: row;
  justify-content: center;
  gap: 14px;
  padding: 12px;
}

.javo-listing-qr--layout-side_actions .javo-listing-qr__code {
  width: auto;
  min-width: 0;
  min-height: 0;
  flex: 0 0 auto;
}

.javo-listing-qr--layout-side_actions .javo-listing-qr__code svg {
  width: 148px;
  max-width: 100%;
}

.javo-listing-qr--layout-side_actions .javo-listing-qr__actions {
  width: 112px;
  flex: 0 0 112px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
}

.javo-listing-qr--layout-side_actions .javo-listing-qr__button {
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  padding: 8px 10px;
}

.javo-listing-qr--layout-side_actions_compact {
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

.javo-listing-qr--layout-side_actions_compact .javo-listing-qr__code {
  width: auto;
  min-width: 0;
  min-height: 0;
  flex: 0 0 auto;
}

.javo-listing-qr--layout-side_actions_compact .javo-listing-qr__code svg {
  width: 124px;
  max-width: 100%;
}

.javo-listing-qr--layout-side_actions_compact .javo-listing-qr__actions {
  width: 104px;
  flex: 0 0 104px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
}

.javo-listing-qr--layout-side_actions_compact .javo-listing-qr__button {
  width: 100%;
  min-height: 30px;
  justify-content: flex-start;
  gap: 5px;
  padding: 6px 8px;
  font-size: 12px;
}

.javo-listing-qr__error {
  max-width: 220px;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.javo-qr-action-button {
  display: inline-flex;
  min-height: var(--javo-meta-action-height, 40px);
  align-items: center;
  justify-content: center;
  gap: var(--javo-meta-action-icon-gap, 8px);
  border: var(--javo-meta-action-border-width, 1px) solid var(--javo-meta-action-border-color, #e5e7eb);
  border-radius: var(--javo-meta-action-radius, 8px);
  background: var(--javo-meta-action-bg, #ffffff);
  padding: var(--javo-meta-action-padding, 8px 12px);
  color: var(--javo-meta-action-color, #111827);
  font-size: var(--javo-meta-action-font-size, 14px);
  font-weight: var(--javo-meta-action-font-weight, 600);
  line-height: 1;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.javo-qr-action-button:hover,
.javo-qr-action-button:focus-visible {
  border-color: var(--javo-meta-action-hover-border-color, #c7d2fe);
  background: var(--javo-meta-action-hover-bg, #eef2ff);
  color: var(--javo-meta-action-hover-color, #4f46e5);
}

.javo-qr-action-button i {
  display: inline-flex;
  width: var(--javo-meta-action-icon-size, 18px);
  height: var(--javo-meta-action-icon-size, 18px);
  align-items: center;
  justify-content: center;
  font-size: var(--javo-meta-action-icon-size, 18px);
  font-weight: var(--javo-meta-action-icon-weight, 400);
  line-height: 1;
}

.javo-qr-modal-open {
  overflow: hidden;
}

.javo-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.javo-qr-modal[hidden] {
  display: none;
}

.javo-qr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.56);
}

.javo-qr-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}

.javo-qr-modal__header,
.javo-qr-modal__body,
.javo-qr-modal__actions {
  padding: 18px;
}

.javo-qr-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eef2f7;
}

.javo-qr-modal__eyebrow {
  margin: 0 0 4px;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.javo-qr-modal__header h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.javo-qr-modal__icon-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f3f4f6;
  color: #4b5563;
  transition: background 0.18s ease, color 0.18s ease;
}

.javo-qr-modal__icon-button:hover,
.javo-qr-modal__icon-button:focus-visible {
  background: #eef2ff;
  color: #4f46e5;
}

.javo-qr-modal__body {
  display: grid;
  gap: 16px;
}

.javo-qr-modal__code {
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #ffffff;
}

.javo-qr-modal__code svg {
  display: block;
  max-width: min(280px, 100%);
  height: auto;
}

.javo-qr-modal__loading,
.javo-qr-modal__error {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
}

.javo-qr-modal__loading i {
  animation: javoQrSpin 0.9s linear infinite;
}

.javo-qr-modal__error {
  color: #b91c1c;
}

.javo-qr-modal__url {
  display: grid;
  gap: 7px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
}

.javo-qr-modal__url input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  padding: 10px 12px;
  color: #111827;
  font-size: 13px;
  line-height: 1.35;
}

.javo-qr-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #eef2f7;
}

.javo-qr-modal__button {
  display: inline-flex;
  min-height: 38px;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 11px;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.javo-qr-modal__button:hover,
.javo-qr-modal__button:focus-visible {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
}

.javo-qr-modal__button--primary {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #ffffff;
}

.javo-qr-modal__button--primary:hover,
.javo-qr-modal__button--primary:focus-visible {
  border-color: #4338ca;
  background: #4338ca;
  color: #ffffff;
}

@keyframes javoQrSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767px) {
  .javo-qr-modal__icon-button {
    width: 44px;
    height: 44px;
  }

  .javo-qr-modal__button {
    min-height: 44px;
  }
}

@media (max-width: 520px) {
  .javo-qr-modal {
    align-items: stretch;
    padding: 12px;
  }

  .javo-qr-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .javo-qr-modal__actions {
    display: grid;
  }
}

@media (max-width: 340px) {
  .javo-listing-qr--layout-side_actions {
    flex-direction: column;
  }

  .javo-listing-qr--layout-side_actions_compact {
    flex-direction: column;
  }

  .javo-listing-qr--layout-side_actions .javo-listing-qr__actions {
    width: 100%;
    flex-basis: auto;
  }

  .javo-listing-qr--layout-side_actions_compact .javo-listing-qr__actions {
    width: 100%;
    flex-basis: auto;
  }

  .javo-listing-qr--layout-side_actions .javo-listing-qr__button {
    justify-content: center;
  }

  .javo-listing-qr--layout-side_actions_compact .javo-listing-qr__button {
    justify-content: center;
  }
}
