/* Hanivan Share Cart 4.0.0 - loaded only where the form is rendered. */
.scp-cart-box,
.scp-cart-box * { box-sizing: border-box; }
.scp-cart-box {
  direction: rtl;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid #e6dac7;
  border-radius: 24px;
  background: #fffaf1;
  color: #2b2b2b;
  font-family: inherit;
  box-shadow: 0 10px 30px rgba(36, 75, 54, .08);
}
.scp-help-box,
.scp-share-form,
.scp-result-box {
  padding: 18px;
  border-radius: 20px;
}
.scp-help-box {
  margin-bottom: 18px;
  border: 1px solid #d8ccb8;
  background: linear-gradient(135deg, #f2efe6, #fffaf1);
}
.scp-share-form { border: 1px solid #eadfce; background: #fff; }
.scp-result-box { margin-top: 20px; border: 1px solid #d8e4d4; background: #f8faf5; }
.scp-result-box[hidden] { display: none !important; }
.scp-help-box h3,
.scp-result-box h3,
.scp-form-title { margin: 0 0 10px; color: #244b36; font-size: 20px; font-weight: 800; line-height: 1.7; }
.scp-help-box p,
.scp-result-box p { margin: 8px 0; line-height: 2; }
.scp-book-title-section {
  margin: 14px 0 20px;
  padding: 15px;
  border: 1px solid #e6e0d5;
  border-radius: 16px;
  background: #fbfaf7;
}
.scp-book-title-section h4 { margin: 0 0 6px; color: #244b36; font-size: 16px; }
.scp-section-help { margin: 0 0 12px; color: #666; font-size: 13px; line-height: 1.8; }
.scp-book-title-row { position: relative; margin: 0 0 13px; padding: 12px; border: 1px solid #dfe7dc; border-radius: 14px; background: #fff; }
.scp-book-title-row:last-child { margin-bottom: 0; }
.scp-book-title-row.is-unresolved { border-color: #c9362b; background: #fff8f7; }
.scp-book-title-row label,
.scp-field label,
.scp-label { display: block; margin: 0 0 7px; color: #444; font-size: 14px; font-weight: 700; }
.scp-book-title-row input,
.scp-field input,
.scp-copy-source {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d7cbb8;
  border-radius: 12px;
  background: #fff;
  color: #1f1f1f;
  font: inherit;
}
.scp-book-title-row input:focus,
.scp-field input:focus,
.scp-copy-source:focus { border-color: #244b36; box-shadow: 0 0 0 3px rgba(36, 75, 54, .12); outline: none; }
.scp-title-source { display: block; margin-top: 6px; color: #667; font-size: 12px; }
.scp-title-error { display: none; margin-top: 6px; color: #a1221b; font-size: 12px; font-weight: 700; }
.scp-book-title-row.is-unresolved .scp-title-error { display: block; }
.scp-customer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.scp-field { margin: 0 0 14px; }
.scp-expiry-note,
.scp-result-expiry {
  padding: 10px 14px;
  border: 1px solid #d8e4d4;
  border-radius: 14px;
  background: #f8faf5;
  color: #244b36;
  font-size: 13px;
}
.scp-form-error { margin: 12px 0; padding: 11px 13px; border: 1px solid #efb4ae; border-radius: 12px; background: #fff0ee; color: #8b1e17; line-height: 1.8; }
.scp-form-error[hidden] { display: none !important; }
.scp-actions { margin: 18px 0 0; }
.scp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px !important;
  border-radius: 14px !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800 !important;
  line-height: 1.4;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: none !important;
}
.scp-btn:disabled { opacity: .65; cursor: wait; }
.scp-btn-primary { border: 1px solid #244b36 !important; background: #244b36 !important; color: #fff !important; }
.scp-btn-secondary { border: 1px solid #586b44 !important; background: #586b44 !important; color: #fff !important; }
.scp-btn-light { border: 1px solid #c9d6c7 !important; background: #fff !important; color: #244b36 !important; }
#scp-created-link { direction: ltr; text-align: left; }
#scp-created-message { min-height: 190px; margin-top: 0; resize: vertical; line-height: 1.9; }
.scp-copy-buttons,
.scp-messenger-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.scp-copied-toast { position: fixed; right: 20px; bottom: 20px; z-index: 99999; padding: 12px 16px; border-radius: 14px; background: #244b36; color: #fff; box-shadow: 0 10px 25px rgba(0,0,0,.18); }
@media (max-width: 760px) {
  .scp-cart-box { padding: 12px; border-radius: 18px; }
  .scp-customer-grid { grid-template-columns: 1fr; gap: 0; }
  .scp-btn { width: 100%; }
  .scp-copy-buttons,
  .scp-messenger-buttons { flex-direction: column; }
  .scp-help-box h3,
  .scp-result-box h3,
  .scp-form-title { font-size: 18px; }
}


/* Automatic mount used only when a custom cart template omits WooCommerce hooks. */
.scp-auto-mount {
  width: 100%;
  clear: both;
  margin: 24px 0;
}
.scp-auto-mount:empty {
  display: none;
}
.woocommerce-cart .scp-cart-box,
.wc-block-cart .scp-cart-box,
.scp-auto-mount .scp-cart-box {
  max-width: 100%;
  box-sizing: border-box;
}

/* Inert footer fallback; JavaScript mounts the form only when no visible hook output exists. */
.scp-fallback-placeholder { display: none !important; }
