/* === Headings & Fineprint === */
.cop-heading {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  margin: 1em 0;
  color: #333;
  line-height: 1.3;
  position: relative;
}
.cop-heading-asterisk {
  display: inline;
  font-size: 0.9rem;
  font-weight: normal;
  margin-left: 4px;
  color: #666;
}
.cop-fineprint {
  font-size: 0.8rem;
  color: #666;
  margin-top: 6px;
  text-align: center;
}

/* === WPForms === */
#wpforms-183-field_8-container {
  display: none !important;
}

/* === Layout & Table === */
.cop-wrapper {
  max-width: 860px;
  margin: 20px auto;
}
.cop-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.cop-table th,
.cop-table td {
  border: 1px solid #e5e5e5;
  padding: 8px;
  text-align: left;
}
.cop-actions {
  margin: 12px 0;
  display: flex;
  gap: 8px;
}
.cop-btn {
  background: #0a7;
  color: #fff;
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
}
.cop-secondary {
  background: #777;
}
.cop-summary p {
  margin: 6px 0;
}
.cop-total {
  font-size: 1.1em;
}
.cop-small {
  color: #666;
  margin-left: 6px;
}

/* === Buy Now Button === */
.cop-pay-button {
  margin-top: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-block;
}
.cop-pay-button img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* === Base Modal === */
.cop-modal {
  display: none; /* JS toggles to block */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
}
.cop-modal-content {
  background: #fff;
  width: 420px;
  max-width: 90vw;
  margin: 12% auto;
  padding: 16px;
  border-radius: 6px;
}

/* === Form Inputs === */
.cop-form-row input[type="text"],
.cop-form-row input[type="tel"],
.cop-form-row input[type="email"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* === Pay Now Button (Shipping modal) === */
#cop-pay-now-shipping {
  background-color: #28a745;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.15s ease;
  display: inline-block;
  text-align: center;
}
#cop-pay-now-shipping:hover,
.btn-pay:hover,
#cop-pay-now:hover {
  background-color: #218838;
  transform: translateY(-2px);
}
#cop-pay-now-shipping:active,
.btn-pay:active,
#cop-pay-now:active {
  background-color: #1e7e34;
  transform: translateY(0);
}
#cop-shipping-modal .actions {
  text-align: center;
  margin-top: 1rem;
}

/* === Checkout Modal === */
#cop-checkout-modal {
  display: none; /* toggled by JS */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  overflow-y: auto;
}
#cop-checkout-modal .cop-modal-content {
  background: #fff;
  width: 600px;
  max-width: 95vw;
  margin: 2rem auto;
  padding: 16px;
  border-radius: 8px;
  max-height: none;
  overflow-y: visible;
}
#cop-checkout-modal .cop-table th,
#cop-checkout-modal .cop-table td {
  padding: 6px;
  font-size: 0.95rem;
}
.cop-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}
.cop-modal-actions .cop-btn {
  min-width: 120px;
}
.cop-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}
.cop-form-row label {
  font-weight: 600;
  color: #333;
}
.cop-form-row input[type="text"],
.cop-form-row input[type="tel"] {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 1rem;
}

/* === Mystery Discount Modal === */
#cop-modal.cop-modal .cop-modal-content {
  width: 420px;
  max-width: 90vw;
  margin: 12% auto;
  max-height: none;
  overflow: visible;
}

/* === Logo Sizing === */
.cop-logo {
  max-height: 40px; /* fixed unit */
  max-width: 100%;
  height: auto;
  width: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

/* === Mobile Tweaks === */
@media (max-width: 480px) {
  #cop-checkout-modal .cop-modal-content {
    width: 95vw;
    margin: 1rem auto;
    padding: 14px;
  }
  .cop-modal-actions {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .cop-modal-actions .cop-btn {
    flex: 1 1 auto;
    min-width: 140px;
  }
}
