/* ====== RECEIPT (чек) ====== */
.receipt-summary-block,
#modalReceiptSummary {
  position: fixed;
  top: 40px;
  right: 40px;
  z-index: 20001;
  width: 370px;
  min-height: 220px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 20px;
  border: 2.5px solid #e4e7ec;
  background: #f7f8fa;
  box-shadow: 0 6px 28px #d3dae522;
  padding: 32px 30px 20px 30px;
  font-family: 'Montserrat', Arial, sans-serif;
  display: none;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}
#modalReceiptSummary {
  display: block;
}

/* Medium screens */
@media (max-width: 1000px) {
  .receipt-summary-block,
  #modalReceiptSummary {
    right: 2vw;
    width: 95vw;
    max-width: 420px;
    padding: 10px 4vw 20px 4vw;
    border-radius: 14px;
    top: 10px;
  }
}

/* MOBILE */
@media (max-width: 700px) {
  .receipt-summary-block,
  #modalReceiptSummary {
    position: fixed;
    top: unset;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    border-radius: 18px 18px 0 0;
    padding: 20px 20px 16px 20px;
    box-shadow: 0 -2px 16px #1a237e19;
    max-height: 80vh;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    z-index: 20001;
    scroll-behavior: smooth;
    /* touch-action: pan-y; */
  }
  .receipt-summary-block::-webkit-scrollbar,
  #modalReceiptSummary::-webkit-scrollbar {
    width: 7px;
    background: #f3f6fb;
  }
  .receipt-summary-block::-webkit-scrollbar-thumb,
  #modalReceiptSummary::-webkit-scrollbar-thumb {
    background: #dde4f1;
    border-radius: 6px;
  }
}

/* Дуже маленькі екрани */
@media (max-width: 400px) {
  .receipt-summary-block,
  #modalReceiptSummary {
    padding: 6px 3vw 10px 3vw;
    font-size: 0.99em;
  }
}

/* ====== RECEIPT BLOCKS ====== */
.receipt-block {
  background: #fff;
  border-radius: 12px;
  padding: 20px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px #2c41801a;
}
.receipt-title {
  font-weight: 700;
  font-size: 1.14em;
  margin-bottom: 4px;
  color: #223054;
}
.receipt-size {
  font-weight: 600;
  margin-bottom: 6px;
  color: #415585;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
  font-size: 1em;
}
.receipt-row.total {
  font-weight: 700;
  font-size: 1.08em;
  color: #1b2946;
}
.price {
  font-weight: 700;
  color: #263574;
}
.additionals-list ul {
  margin: 6px 0 0 18px;
  font-size: 0.99em;
  color: #3d4660;
}
.receipt-note {
  color: #6a778b;
  font-size: 0.97em;
  margin-top: 10px;
  line-height: 1.35;
}
.contact-info {
  margin-top: 18px;
  background: #f2f5fb;
  padding: 10px 13px 8px 13px;
  border-radius: 7px;
  font-size: 1em;
}
hr {
  border: none;
  border-top: 1px solid #e4eaf2;
  margin: 12px 0;
}

/* ====== FIXED MOBILE TOTAL-BAR ====== */
.mobile-total-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 75px;
  background: #fff;
  border-top: 2px solid #e4e7ec;
  box-shadow: 0 -2px 10px #2c418011;
  z-index: 20010;
  display: none; /* Вмикається через JS */
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 1.11em;
  font-weight: 700;
  color: #223054;
  cursor: pointer;
  gap: 16px;
  transition: background 0.15s, box-shadow 0.15s;
  user-select: none;
}
.mobile-total-bar button{
  background: #fff;
  color: #1777ff;
  border: 2px solid #1777ff;

  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  width: 100%;
  padding: 10px 15px;
  border-radius: 18px;

  box-shadow: 0 1px 6px 0 rgba(16, 54, 210, 0.13);

  letter-spacing: 0.01em;
  transition: all 0.18s cubic-bezier(.58,.21,.29,.98);
  cursor: pointer;
  outline: none;
  display: block;
}
@media screen and (max-width: 400px) {
  .mobile-total-bar button{
    padding: 5px 15px;
    border-radius: 18px;
  }
  
}
.mobile-total-bar:active,
.mobile-total-bar:hover {
  background: #f0f4fa;
  box-shadow: 0 -2px 16px #3553b510;
}
.mobile-total-bar span:last-child {
  font-size: 1.3em;
  opacity: 0.88;
}
@media (min-width: 700px) {
  .mobile-total-bar { display: none !important; }
}
#modalReceiptSummary { overflow-y: auto; max-height: 80vh; }
