/* ============================================================
   HOWZIT PORTAL — WILDCARD CATALOGUE STYLES
   (Wildcard Catalogue, Phase 4 — Frontend)
   ------------------------------------------------------------
   Styles for the share-link banner and the "catalogue not found"
   notice shown on username.howzitportal.co.za. Uses the site's
   existing design tokens (--orange, --navy, --text-muted) so the
   wildcard experience matches the rest of the portal exactly.
   ============================================================ */

/* ---- Share-link banner (only when Display share link = ON) ---- */
.hzp-wildcard-share {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 999998;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(680px, calc(100vw - 24px));
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-left: 4px solid var(--orange, #ff6a02);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  font-family: inherit;
  animation: hzpWildcardSlideUp 0.35s ease both;
}

@keyframes hzpWildcardSlideUp {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.hzp-wildcard-share-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy, #2d1952);
  white-space: nowrap;
}

.hzp-wildcard-share-label i { color: var(--orange, #ff6a02); }

.hzp-wildcard-share-input {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: #333;
  background: #f7f7f9;
  border: 1px solid #e2e2e6;
  border-radius: 8px;
  outline: none;
}

.hzp-wildcard-share-input:focus { border-color: var(--orange, #ff6a02); }

.hzp-wildcard-share-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: var(--orange, #ff6a02);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.hzp-wildcard-share-copy:hover { background: var(--orange-dark, #e05800); }

.hzp-wildcard-share-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #888;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.hzp-wildcard-share-close:hover { background: #f0f0f2; color: #333; }

/* ---- "Catalogue not found" notice ---- */
.hzp-wildcard-notice {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999997;
  width: min(620px, calc(100vw - 24px));
  animation: hzpWildcardSlideDown 0.35s ease both;
}

@keyframes hzpWildcardSlideDown {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.hzp-wildcard-notice-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fff8f2;
  border: 1px solid #ffd9bd;
  border-left: 4px solid var(--orange, #ff6a02);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.hzp-wildcard-notice-inner > i {
  color: var(--orange, #ff6a02);
  font-size: 20px;
  margin-top: 2px;
}

.hzp-wildcard-notice-inner strong {
  display: block;
  font-size: 14px;
  color: var(--navy, #2d1952);
  margin-bottom: 2px;
}

.hzp-wildcard-notice-inner p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted, #666);
  line-height: 1.5;
}

.hzp-wildcard-notice-inner code {
  font-size: 12px;
  color: var(--orange-dark, #e05800);
  background: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #ffe0c9;
}

.hzp-wildcard-notice-close {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #999;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.hzp-wildcard-notice-close:hover { background: #ffe9d9; color: #333; }

/* ---- Mobile: stack the share banner ---- */
@media (max-width: 640px) {
  .hzp-wildcard-share {
    flex-wrap: wrap;
    bottom: 10px;
    padding: 10px;
  }
  .hzp-wildcard-share-label { width: 100%; }
  .hzp-wildcard-share-input { min-width: 0; }
  .hzp-wildcard-notice { top: 72px; }
}

/* ============================================================
   FULLSCREEN BUSINESS POPUP (wildcard only)
   ------------------------------------------------------------
   When a visitor arrives via <username>.howzitportal.co.za the
   business detail modal (#productModal) fills the screen. The main
   domain is never affected because the body class is only added by
   wildcard-catalogue.js on a wildcard host.
   ============================================================ */
body.hzp-wildcard-fullscreen #productModal.open {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

body.hzp-wildcard-fullscreen #productModal.open .modal-box {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

body.hzp-wildcard-fullscreen #productModal.open .modal-header {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
}

body.hzp-wildcard-fullscreen #productModal.open .modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   UNKNOWN-USERNAME REQUEST POPUP (inquiry-style)
   ============================================================ */
body.hzp-wr-lock { overflow: hidden; }

.hzp-wr-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 12, 40, 0.55);
  backdrop-filter: blur(2px);
  animation: hzpWrFade 0.2s ease both;
}

@keyframes hzpWrFade { from { opacity: 0; } to { opacity: 1; } }

.hzp-wr-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  padding: 24px;
  font-family: inherit;
  animation: hzpWrPop 0.25s ease both;
}

@keyframes hzpWrPop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hzp-wr-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #888;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.hzp-wr-close:hover { background: #f2f2f5; color: #333; }

.hzp-wr-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-right: 30px;
}

.hzp-wr-head-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange, #ff6a02), var(--orange-dark, #e05800));
  border-radius: 12px;
}

.hzp-wr-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--navy, #2d1952);
}

.hzp-wr-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted, #666);
  line-height: 1.5;
}

.hzp-wr-head code {
  font-size: 12px;
  color: var(--orange-dark, #e05800);
  background: #fff5ec;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #ffe0c9;
}

.hzp-wr-form { display: block; }

.hzp-wr-row {
  display: flex;
  gap: 12px;
}
.hzp-wr-row .hzp-wr-field { flex: 1 1 0; min-width: 0; }

.hzp-wr-field { margin-bottom: 14px; }

.hzp-wr-field > label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy, #2d1952);
  margin-bottom: 6px;
}

.hzp-wr-req { color: var(--orange, #ff6a02); }

.hzp-wr-field input[type="text"],
.hzp-wr-field input[type="email"],
.hzp-wr-field input[type="tel"],
.hzp-wr-field textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: #333;
  background: #fafafb;
  border: 1px solid #e2e2e6;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.hzp-wr-field input:focus,
.hzp-wr-field textarea:focus {
  border-color: var(--orange, #ff6a02);
  box-shadow: 0 0 0 3px rgba(255, 106, 2, 0.12);
  background: #fff;
}

.hzp-wr-field textarea { resize: vertical; }

.hzp-wr-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hzp-wr-type {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  background: #fafafb;
  border: 1.5px solid #e2e2e6;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  user-select: none;
}

.hzp-wr-type input { accent-color: var(--orange, #ff6a02); }

.hzp-wr-type:has(input:checked) {
  border-color: var(--orange, #ff6a02);
  background: #fff5ec;
  color: var(--orange-dark, #e05800);
}

.hzp-wr-type i { color: var(--orange, #ff6a02); }

.hzp-wr-feedback {
  font-size: 12.5px;
  margin: 2px 0 10px;
  min-height: 0;
}
.hzp-wr-feedback.is-error { color: #c62828; }

.hzp-wr-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.hzp-wr-cancel {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: #555;
  background: #f2f2f5;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.hzp-wr-cancel:hover { background: #e8e8ec; }

.hzp-wr-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--orange, #ff6a02);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.hzp-wr-submit:hover { background: var(--orange-dark, #e05800); }
.hzp-wr-submit:disabled { opacity: 0.7; cursor: default; }

.hzp-wr-success {
  text-align: center;
  padding: 18px 6px 6px;
}
.hzp-wr-success > i {
  font-size: 46px;
  color: #2e7d32;
  margin-bottom: 10px;
}
.hzp-wr-success h4 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--navy, #2d1952);
}
.hzp-wr-success p {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--text-muted, #666);
  line-height: 1.5;
}

@media (max-width: 560px) {
  .hzp-wr-row { flex-direction: column; gap: 0; }
  .hzp-wr-modal { padding: 20px 16px; }
  .hzp-wr-types { flex-direction: column; }
}
