/* ===============================
   BASE / BLOCKS
================================ */

.block {
  margin-bottom: 25px;
}

.service-block.block {
  max-width: 500px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 20px;
}

.services-wrapper .service-block:last-child {
  border-bottom: none;
}

#orderSummary,
#customer_name,
#customer_email {
  max-width: 500px;
}

.total-block {
  text-align: right;
  font-size: 16px;
}

.total-sum {
  display: flex;
}

.total-sum input {
  max-width: 200px;
}

.grand-total-block {
  display: flex;
  flex-direction: column;
}

/* ===============================
   TYPOGRAPHY
================================ */

h3.summary {
  font-size: 18px;
  color: #222;
  font-weight: 500;
  margin-bottom: 0;
}

.service-block.block h3,
.donat h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.donat .sp-module-title {
  margin-bottom: 30px;
  font-size: 28px;
  letter-spacing: 0.8px;
}

.confirm-text {
  font-size: 16px;
  margin-bottom: 10px;
}
.msg-text {
  font-size: 16px;
}

.email-text {
  font-size: 14px;
  margin-top: 4px;
}

.names-count {
  font-size: 13px;
  margin-left: 30px;
}

/* ===============================
   BUTTONS (BASE)
================================ */

.btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #1976d2;
  color: #fff;
  cursor: pointer;
  line-height: 1.6;
}

.btn.secondary {
  background: #777;
}
.confirm-actions .btn {
  padding: 3px 15px;
  text-transform: lowercase;
  background: transparent !important;
  border: 2px solid #333 !important;
  color: #333 !important;
  font-weight: 500;
}
#addFieldBtn.btn,
#addFieldBtn.btn:focus,
#addFieldBtn.btn:active {
  background: transparent !important;
  border: 2px solid #5a5554 !important;
  color: #333 !important;
  font-weight: 500;
}

#resetBtn.btn {
  background: #ccc;
  color: #5a5554;
  font-weight: 500;
}

.repose {
  background: #000;
}

/* ===============================
   FORMS
================================ */

.inputs {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.inputs .field {
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

.inputs label {
  font-size: 20px;
  margin-bottom: -2px;
  color: #333;
  min-width: 30px;
}

.block label {
  font-size: 16px;
  font-weight: 500;
  color: #222;
}

.terms-block.block label {
  font-size: 14px;
  font-weight: normal;
  color: #5a5554;
}

.inputs input[type='text'] {
  padding: 8px 10px 0 20px;
  border: none;
  border-radius: 6px;
  font-size: 20px;
}

input::placeholder {
  font-size: 14px;
}

.names {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#privacyCheckbox,
#termsCheckbox {
  margin-right: 3px;
  position: relative;
  top: 1px;
}

/* ===============================
   ORDER SUMMARY
================================ */

.order-total-block {
  margin-top: 10px;
}

.order-summary {
  margin: 10px 0;
  padding: 2px 6px;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  font-size: 14px;
  background: #fff9ef;
}

.order-item {
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.order-item:last-child {
  border-bottom: none;
}

.order-header {
  font-size: 16px;
  margin-bottom: 6px;
}

.order-intent {
  margin-left: 6px;
  color: #666;
}

.order-names {
  margin: 0;
  padding-left: 18px;
  color: #444;
}

.order-names li {
  line-height: 1.4;
}

/* ===============================
   OVERLAY + MODAL (СЕРВИСЫ)
   ❗ НЕ ЛОМАТЬ
================================ */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.overlay.show {
  display: flex;
}

/* КРИТИЧНО для показа */
.show .modal {
  display: flex;
  flex-direction: column;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: fadeInScale 0.3s ease;
  max-height: 700px;
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
}

.modal .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ===============================
   SERVICE IMAGE
================================ */

#serviceImage {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

#serviceImage img {
  max-width: 360px;
}

/* ===============================
   CLOSE BUTTON
================================ */

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #333;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

/* ===============================
   MSG MODAL (НЕ СМЕШИВАТЬ)
================================ */

.msg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
}

.msg-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-modal-content {
  position: relative;
  background: #fff;
  padding: 20px 30px;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.msg-modal-content .success-message {
  font-size: 14px;
}

.msg-modal-content .bank-details-title {
  margin: 10px 0 7px;
}

.msg-modal-content .msg-close {
  position: absolute;
  top: 0;
  right: 3px;
  border: none;
  background: none;
  font-size: 26px;
  cursor: pointer;
}

/* ===============================
   HOVER ONLY (SAFE)
================================ */

@media (hover: hover) {
  .btn.openPopupBtn.health:hover,
  .btn.openPopupBtn.health:focus,
  .msg-modal-content .btn:hover,
  .msg-modal-content .btn:focus,
  #buyBtn.btn:hover,
  #buyBtn.btn:focus,
  #resetAllBtn.btn:hover,
  #resetAllBtn.btn:focus,
  .modal .btn:hover,
  .modal .btn:focus {
    background-color: #4b87c1 !important;
    color: #fff !important;
  }
  .confirm-actions .btn:hover,
  .confirm-actions .btn:focus,
  #addFieldBtn.btn:hover {
    background: transparent !important;
    border-color: #1976d2 !important;
    color: #1976d2 !important;
  }

  #resetBtn.btn:hover {
    background: #ccc !important;
    color: #171717 !important;
  }

  .repose:hover {
    background: #2b2b2b;
    color: #fff;
  }

  .close-btn:hover {
    color: #1976d2;
  }
}

/* ===============================
   MOBILE
================================ */

@media (max-width: 480px) {
  .inputs {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 464px) {
  .btn.openPopupBtn {
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
}
/* ===============================
   ANIMATION
================================ */

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
