/* Front-end wrapper */
.mgpos-frontend-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

/* App */
.mgpos-app .mgpos-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 16px 0;
}

.mgpos-tab {
  border: 1px solid #dcdcdc;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.mgpos-tab.is-active {
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34,113,177,0.12);
}

.mgpos-panel {
  display: none;
}

.mgpos-panel.is-active {
  display: block;
}

.mgpos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 1100px) {
  .mgpos-grid {
    grid-template-columns: 1fr;
  }
}

.mgpos-card {
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  padding: 16px;
}

.mgpos-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  flex-wrap: wrap;
}

.mgpos-input {
  min-width: 240px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dcdcdc;
}

.mgpos-muted {
  color: #616161;
  margin-top: 10px;
}

.mgpos-success {
  background: #eef9f0;
  border: 1px solid #b8e1bf;
  padding: 12px;
  border-radius: 12px;
  margin-top: 10px;
}

.mgpos-warning {
  background: #fff7e6;
  border: 1px solid #ffd58b;
  padding: 12px;
  border-radius: 12px;
  margin-top: 10px;
}

.mgpos-error {
  background: #fdecec;
  border: 1px solid #f2b3b3;
  padding: 12px;
  border-radius: 12px;
  margin-top: 10px;
}

.mgpos-product {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 10px;
}

.mgpos-thumb {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e7e7e7;
}

.mgpos-product-body {
  flex: 1;
}

.mgpos-cart-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #ededed;
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
}

.mgpos-cart-title {
  font-weight: 700;
}

.mgpos-cart-meta {
  color: #6b6b6b;
  font-size: 12px;
  margin-top: 4px;
}

.mgpos-cart-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mgpos-cart-controls .mgpos-qty {
  width: 86px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dcdcdc;
}

.mgpos-cart-price {
  min-width: 120px;
  text-align: right;
  font-weight: 700;
}

.mgpos-totals {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* Modal */
.mgpos-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.mgpos-modal-inner {
  /* 20% smaller than the earlier 900px design */
  width: min(720px, 95vw);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #dcdcdc;
}

.mgpos-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#mgpos_video {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e7e7e7;
  background: #000;

  /* 20% smaller than 280px */
  min-height: 224px;
}

.mgpos-help {
  margin-top: 8px;
}

.mgpos-order-row {
  border: 1px solid #ededed;
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
}

.mgpos-pick-row {
  border: 1px solid #ededed;
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mgpos-pick-row.is-picked {
  border-color: #b8e1bf;
  background: #eef9f0;
}
