/* SHOPLA modal. Trigger: #shopla-modal.open */
.shopla-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
}

.shopla-modal.open {
  display: flex;
}

.shopla-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(3px);
}

.shopla-modal__dialog {
  position: relative;
  width: calc(100% - 32px);
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  background: #f2f3f5;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  padding: 24px 28px 28px;
  animation: shopla-pop 0.18s ease-out;
  font-family: Arial, Helvetica, sans-serif;
  color: #33404f;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}

.shopla-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #8a8f98;
  z-index: 2;
}

.shopla-modal__close:hover {
  color: #222;
}

/* --- checkout view (digiseller-style) --- */

.shp-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  color: #2b3a4a;
}

.shp-product {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  position: relative;
}

.shp-product__name {
  display: block;
  color: #337ab7;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  padding-right: 130px;
  word-break: break-word;
}

.shp-product__price {
  position: absolute;
  top: 14px;
  right: 16px;
  color: #e88a00;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.shp-product__price-orig {
  margin-top: 4px;
  font-size: 12px;
  color: #8a8f98;
}

.shp-product__coin {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #0a8a3d;
}

.shp-next-usd {
  font-size: 13px;
  color: #8a8f98;
  margin-bottom: 10px;
}

.shp-featured {
  margin-bottom: 14px;
}

.shp-notice {
  background: #f2dede;
  color: #b94a48;
  border: 1px solid #e5c6c6;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}

.shp-all {
  font-size: 16px;
  font-weight: 600;
  color: #2b3a4a;
  margin-bottom: 10px;
}

.shp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.shp-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

.shp-chip:hover {
  border-color: #b8c4d0;
}

.shp-chip--sel {
  border-color: #2f6fb2;
  box-shadow: 0 0 0 1px #2f6fb2 inset;
}

.shp-chip--big {
  padding: 12px 16px;
  border-color: #2f6fb2;
}

.shp-chip__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.shp-chip__inner {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.shp-chip__label {
  font-size: 13px;
  font-weight: 600;
  color: #2b3a4a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shp-chip--big .shp-chip__label {
  font-size: 15px;
  white-space: normal;
}

.shp-chip__hint {
  font-size: 11px;
  color: #7d8894;
}

/* --- form --- */

.shp-field {
  margin-bottom: 14px;
}

.shp-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5a6572;
  margin-bottom: 5px;
}

.shp-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd5dc;
  border-radius: 6px;
  background: #fff;
  padding: 9px 11px;
  font-size: 14px;
  color: #2b3a4a;
  outline: none;
}

.shp-input:focus {
  border-color: #2f6fb2;
}

.shp-promo-row {
  display: flex;
  gap: 8px;
}

.shp-promo-row .shp-input {
  flex: 1;
}

.shp-btn {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 9px 18px;
}

.shp-btn--apply {
  background: #e8ecf0;
  color: #33404f;
}

.shp-btn--apply:hover {
  background: #dbe1e8;
}

.shp-btn--pay {
  background: #2f6fb2;
  color: #fff;
  font-size: 14px;
  padding: 11px 34px;
}

.shp-btn--pay:hover {
  background: #295f9a;
}

.shp-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.shp-captcha {
  border: 1px solid #cfd5dc;
  border-radius: 6px;
  cursor: pointer;
  background: #f6f6f0;
}

.shp-input--captcha {
  max-width: 220px;
}

.shp-error {
  margin-top: 6px;
  font-size: 12px;
  color: #b94a48;
}

.shp-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.shp-link {
  color: #337ab7;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.shp-link:hover {
  text-decoration: underline;
}

/* --- next (payment session stub) --- */

.shp-view--next {
  text-align: center;
  padding: 18px 0 8px;
}

.shp-view--next .shp-next-method {
  display: inline-block;
  margin: 10px 0;
  min-width: 240px;
}

.shp-next-price {
  font-size: 28px;
  font-weight: 700;
  color: #e88a00;
  margin-bottom: 10px;
}

.shp-next-text {
  color: #5a6572;
  margin-bottom: 16px;
}

.shp-spinner span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 3px;
  border-radius: 50%;
  background: #2f6fb2;
  animation: shp-blink 1.2s infinite;
}

.shp-spinner span:nth-child(2) { animation-delay: 0.2s; }
.shp-spinner span:nth-child(3) { animation-delay: 0.4s; }

@keyframes shp-blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

/* --- payment view --- */

.shp-pay-method {
  max-width: 280px;
  margin: 0 auto 16px;
}

.shp-qr {
  text-align: center;
  margin-bottom: 14px;
}

.shp-qr svg {
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  padding: 10px;
  width: 180px;
  height: 180px;
}

.shp-addr-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 14px;
}

.shp-addr {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid #cfd5dc;
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 13px;
  font-family: Consolas, monospace;
  word-break: break-all;
  color: #2b3a4a;
  display: flex;
  align-items: center;
}

.shp-btn--copy {
  background: #e8ecf0;
  color: #33404f;
  white-space: nowrap;
}

.shp-btn--copy:hover {
  background: #dbe1e8;
}

.shp-amount-row {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #0a8a3d;
  margin-bottom: 6px;
  word-break: break-all;
}

.shp-amount-sym {
  font-size: 18px;
  color: #33404f;
}

.shp-hint {
  font-size: 12px;
  color: #7d8894;
  text-align: center;
  margin-bottom: 14px;
}

.shp-btn--check {
  background: #2f6fb2;
  color: #fff;
  font-size: 14px;
  padding: 11px 34px;
}

.shp-btn--check:hover {
  background: #295f9a;
}

.shp-btn--check:disabled {
  opacity: 0.6;
  cursor: default;
}

.shp-view--pay .shp-actions,
.shp-view--susp .shp-actions {
  justify-content: center;
}

/* --- suspicious view --- */

.shp-view--susp {
  text-align: center;
  padding: 8px 0;
}

.shp-susp-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #b94a48;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  line-height: 54px;
}

.shp-susp-text {
  font-size: 14px;
  color: #33404f;
  line-height: 1.55;
  text-align: left;
  margin-bottom: 18px;
}

.shp-btn--refund {
  background: #b94a48;
  color: #fff;
  font-size: 14px;
  padding: 11px 28px;
}

.shp-btn--refund:hover {
  background: #a03e3c;
}

.shp-btn--refund:disabled {
  opacity: 0.6;
  cursor: default;
}

.shp-refund-note {
  margin-top: 12px;
}

.shp-netpick__title {
  font-size: 15px;
  font-weight: 600;
  color: #2b3a4a;
  margin-bottom: 10px;
}

.shp-netgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.shp-warn {
  font-size: 12px;
  color: #8a6d1a;
  background: #fff8e1;
  border: 1px solid #f0e0ae;
  border-radius: 6px;
  padding: 8px 11px;
  margin-bottom: 8px;
  text-align: left;
}

.shp-warn--only {
  color: #b94a48;
  background: #f2dede;
  border-color: #e5c6c6;
}

/* --- refund cabinet --- */

.shp-view--refund {
  padding: 4px 0 8px;
}

.shp-rf-brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #656565;
  margin-bottom: 16px;
}

.shp-rf-brand b {
  color: #000;
}

.shp-rf-banner {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 9px;
}

.shp-rf-banner--sum {
  background: #e9f9ef;
  border: 1px solid #bfe8cd;
  color: #1f7a3d;
  font-size: 22px;
  font-weight: 700;
}

.shp-rf-banner--info {
  background: #eef3f9;
  border: 1px solid #d7e3f0;
  color: #33567a;
}

.shp-rf-steps {
  font-size: 13px;
  color: #5a6572;
  line-height: 1.55;
  margin: 14px 0 18px;
}

.shp-view--refund .shp-actions {
  justify-content: center;
}

.shp-rf-connect {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.shp-rf-err {
  margin-top: 12px;
  text-align: center;
}

/* --- plain view (purchases etc.) --- */

.shp-view--plain {
  padding: 24px 0;
  text-align: center;
}

.shp-plain-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1d24;
}

html.shopla-locked,
html.shopla-locked body {
  overflow: hidden;
}

@keyframes shopla-pop {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@media (max-width: 560px) {
  .shopla-modal__dialog {
    padding: 18px 16px 20px;
  }
  .shp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shp-product__name {
    padding-right: 0;
    margin-bottom: 6px;
  }
  .shp-product__price {
    position: static;
    display: inline-block;
  }
}
