/* ——— Стили ТОЛЬКО для модального окна Checkout ——— */
#checkoutModal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.55);
  z-index:99999;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
#checkoutModal .dialog{
  width:980px;
  max-width:98%;
  max-height:95vh;
  overflow:auto;
  background:#fff;
  border-radius:12px;
  box-shadow:0 12px 40px rgba(0,0,0,.35);
  font-size:14px;
}
#checkoutModal header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 18px;
  border-bottom:1px solid #eee;
}
#checkoutModal .content{
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:16px;
  padding:18px;
}
#checkoutModal .card{
  border:1px solid #eee;
  border-radius:10px;
  padding:12px;
  background:#fff;
}

#checkoutModal .row{
  display:flex;
  gap:10px;
  margin-bottom:12px;
}
#checkoutModal .row>div{flex:1;}
#checkoutModal .small{color:#666;font-size:12px;}

#checkoutModal .actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:14px 18px;
  border-top:1px solid #eee;
  background:#fff;
  position:sticky;
  bottom:0;
  z-index:5;
}
#checkoutModal .btn{
  border:0;
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
  background:#2f7bfd;
  color:#fff;
}
#checkoutModal .btn.ghost{
  background:#f3f3f3;
  color:#111;
}

#checkoutModal .table{
  width:100%;
  border-collapse:collapse;
}
#checkoutModal .table th,
#checkoutModal .table td{
  border-bottom:1px dashed #e5e5e5;
  padding:6px;
  text-align:left;
}
#checkoutModal .table th:last-child,
#checkoutModal .table td:last-child{
  text-align:right;
}
#checkoutModal hr.sep{
  border:0;
  border-top:1px dashed #e5e5e5;
  margin:8px 0;
}
#checkoutModal .line{
  display:flex;
  justify-content:space-between;
  margin:4px 0;
}
#checkoutModal .line-strong{font-weight:700;}

#checkoutModal .shipment-list,
#checkoutModal .pay-list{
  display:grid;
  gap:8px;
}

/* Общий стиль «карточек» вариантов доставки и оплаты */
#checkoutModal #shipList label.co-radio,
#checkoutModal #payList label.pay-item{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  cursor:pointer;
  background:#fff;
}

/* при фокусе/активном radio слегка подсвечиваем */
#checkoutModal #shipList input[type="radio"]:checked + .ship-logo,
#checkoutModal #payList input[type="radio"]:checked + .ci{
  filter:drop-shadow(0 0 2px rgba(37,99,235,.35));
}

/* иконки монет */
#checkoutModal .pay-item{
  position:relative;
}
#checkoutModal .pay-item img.ci{
  width:20px;
  height:20px;
  object-fit:contain;
  flex-shrink:0;
}

/* превью товаров: несколько картинок */
#checkoutModal .order-thumb{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}
#checkoutModal .order-thumb img{
  width:90px;
  height:90px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #eee;
}

#checkoutModal .card label{
  display:block;
  font-size:13px;
  font-weight:600;
  color:#333;
  margin-bottom:4px;
}
#checkoutModal input[type="text"],
#checkoutModal input[type="email"],
#checkoutModal input[type="tel"],
#checkoutModal input[type="number"],
#checkoutModal input[type="password"],
#checkoutModal select,
#checkoutModal textarea,
#checkoutModal .input{
  width:100%;
  padding:8px 10px;
  border:1px solid #d1d5db !important;
  border-radius:6px;
  background:#fff;
  font-size:14px;
  box-sizing:border-box;
  transition:all .2s ease;
}
#checkoutModal input:focus,
#checkoutModal select:focus,
#checkoutModal textarea:focus,
#checkoutModal .input:focus{
  outline:none;
  border-color:#2563eb !important;
  box-shadow:0 0 0 2px rgba(37,99,235,.25);
}
#checkoutModal .card label span.req,
#checkoutModal .card label::after{
  color:#dc2626;
}

#checkoutModal #qrWrap{
  display:none;
  margin-top:12px;
  padding:10px;
  border:1px dashed #e5e7eb;
  border-radius:10px;
  background:#fafafa;
  align-items:center;
  gap:12px;
  justify-content:center;
}
#checkoutModal #qr{
  width:180px;
  height:180px;
}
#checkoutModal #qrMeta{
  font-size:12px;
  color:#555;
  max-width:260px;
}

/* ====== Адаптив под планшеты/мобилки ====== */
@media (max-width:980px){
  #checkoutModal .dialog{
    width:100%;
    max-width:100%;
    height:100vh;
    max-height:100vh;
    border-radius:0;
  }
  #checkoutModal header{
    position:sticky;
    top:0;
    z-index:10;
    background:#fff;
  }
}

@media (max-width:820px){
  #checkoutModal .content{
    grid-template-columns:1fr;
    gap:12px;
    padding:12px;
  }
  #checkoutModal .content>div:first-child{order:1;}
  #checkoutModal .content>div:last-child{order:2;}

  #checkoutModal .card{padding:12px;}
  #checkoutModal input,
  #checkoutModal select,
  #checkoutModal textarea{
    font-size:16px;
    line-height:1.35;
    padding:10px 12px;
  }
  #checkoutModal .order-thumb img{
    width:80px;
    height:80px;
  }
  #checkoutModal #qr{
    width:150px;
    height:150px;
  }
}

@media (max-width:560px){
  #checkoutModal .row{
    flex-direction:column;
    gap:8px;
  }
  #checkoutModal .actions{
    position:sticky;
    bottom:0;
    padding:10px 12px;
    gap:8px;
  }
  #checkoutModal .actions .btn{
    flex:1 1 auto;
    padding:12px 14px;
    border-radius:12px;
  }
  #checkoutModal .btn.ghost{order:1;}
}

@media (max-width:380px){
  #checkoutModal .order-thumb img{
    width:70px;
    height:70px;
  }
  #checkoutModal #qr{
    width:130px;
    height:130px;
  }
  #checkoutModal .table th,
  #checkoutModal .table td{
    padding:6px 4px;
  }
}

#checkoutModal .hidden{display:none !important;}

/* Заголовки шагов (1–5) в модалке */
#checkoutModal h4{
  font-size:15px;
  font-weight:700;
  color:#111;
  margin-bottom:8px;
  letter-spacing:.3px;
  text-transform:none;
}
@media (max-width:640px){
  #checkoutModal h4{
    font-size:14px;
    margin-bottom:6px;
  }
}

.pulse{animation:pulse .4s ease;}
@keyframes pulse{
  0%{background:rgba(99,102,241,.08);}
  100%{background:transparent;}
}

/* Логотипы доставки — только внутри модалки */
#checkoutModal .ship-logo{
  width:22px;
  height:22px;
  object-fit:contain;
  margin-right:8px;
  flex-shrink:0;
}

/* Линия с логотипом + радио + текст */
#checkoutModal #shipList .co-radio{
  display:flex;
  align-items:center;
  gap:8px;
}
