
/* ============================================
   FEAT-026: CRISP Badge + Tray CSS
   ============================================ */

/* --- Badge pill --- */
.cpz-crisp-badge {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: -apple-system,
    BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: all 0.25s ease;
  user-select: none;
}
.cpz-crisp-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
}

/* Severity colours */
.cpz-crisp-badge.green {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #A5D6A7;
}
.cpz-crisp-badge.amber {
  background: #FFF8E1;
  color: #F57F17;
  border: 1px solid #FFE082;
}
.cpz-crisp-badge.red {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #EF9A9A;
}

/* Dot indicator */
.cpz-crisp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cpz-crisp-badge.green .cpz-crisp-dot {
  background: #4CAF50;
}
.cpz-crisp-badge.amber .cpz-crisp-dot {
  background: #FF9800;
}
.cpz-crisp-badge.red .cpz-crisp-dot {
  background: #F44336;
  animation: crispPulse 1.5s infinite;
}

@keyframes crispPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cpz-crisp-count {
  font-weight: 400;
  font-size: 12px;
  opacity: 0.85;
}

/* --- Tray --- */
.cpz-crisp-tray {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 340px;
  max-height: 60vh;
  z-index: 9991;
  background: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-family: -apple-system,
    BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cpz-crisp-tray.open {
  transform: translateY(0);
}

.cpz-crisp-tray-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.cpz-crisp-tray-title {
  font-size: 15px;
  font-weight: 700;
  color: #333;
}
.cpz-crisp-tray-close {
  font-size: 22px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}
.cpz-crisp-tray-close:hover {
  color: #333;
}

.cpz-crisp-tray-body {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
}

/* Rule group */
.cpz-crisp-group {
  margin-bottom: 16px;
}
.cpz-crisp-rule-hdr {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.cpz-crisp-rule-hdr strong {
  font-size: 13px;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cpz-crisp-oneliner {
  font-size: 11px;
  color: #888;
  font-style: italic;
}

/* Issue item */
.cpz-crisp-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
}
.cpz-crisp-item.amber {
  background: #FFF8E1;
}
.cpz-crisp-item.red {
  background: #FFEBEE;
}

.cpz-crisp-sev-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 3px;
  flex-shrink: 0;
}
.cpz-crisp-sev-dot.amber {
  background: #FF9800;
}
.cpz-crisp-sev-dot.red {
  background: #F44336;
}

.cpz-crisp-msg {
  flex: 1;
  color: #444;
}

.cpz-crisp-goto {
  font-size: 11px;
  color: #1976D2;
  background: none;
  border: 1px solid #90CAF9;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.cpz-crisp-goto:hover {
  background: #E3F2FD;
}

/* Empty state */
.cpz-crisp-empty {
  text-align: center;
  padding: 24px 16px;
}
.cpz-crisp-check {
  font-size: 36px;
  color: #4CAF50;
  display: block;
  margin-bottom: 8px;
}
.cpz-crisp-empty p {
  margin: 4px 0;
  font-size: 14px;
  color: #333;
}
.cpz-crisp-sub {
  font-size: 12px;
  color: #888;
}

/* --- CRISP Toast Notice --- */
.cpz-crisp-notice {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%)
    translateY(20px);
  z-index: 9995;
  background: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: -apple-system,
    BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  font-size: 13px;
  line-height: 1.4;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.3s ease,
    transform 0.3s ease;
  pointer-events: none;
}
.cpz-crisp-notice.visible {
  opacity: 1;
  transform: translateX(-50%)
    translateY(0);
}
.cpz-crisp-notice.fade-out {
  opacity: 0;
  transform: translateX(-50%)
    translateY(-10px);
}

/* --- Mobile --- */
@media (max-width: 600px) {
  .cpz-crisp-badge {
    bottom: 70px;
    right: 8px;
    padding: 5px 10px;
    font-size: 12px;
  }
  .cpz-crisp-tray {
    width: 100%;
    max-height: 50vh;
  }
  .cpz-crisp-notice {
    bottom: 60px;
    max-width: 90%;
    font-size: 12px;
  }
}

/* ==========================================
   FEAT-031: Quality Gate Modal
   ========================================== */
.cpz-qg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cpz-qg-overlay.visible {
  opacity: 1;
}
.cpz-qg-overlay.closing {
  opacity: 0;
}
.cpz-qg-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 580px;
  width: 90%;
  padding: 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  font-family: -apple-system,
    BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.cpz-qg-overlay.visible .cpz-qg-modal {
  transform: translateY(0);
}
.cpz-qg-header {
  text-align: center;
  margin-bottom: 20px;
}
.cpz-qg-severity {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}
.cpz-qg-severity.red {
  background: #FFEBEE;
  color: #C62828;
}
.cpz-qg-severity.amber {
  background: #FFF3E0;
  color: #E65100;
}
.cpz-qg-subtitle {
  color: #666;
  font-size: 14px;
  margin: 8px 0 0;
}
.cpz-qg-issues {
  background: #F5F5F5;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  max-height: 180px;
  overflow-y: auto;
}
.cpz-qg-issue-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.4;
}
.cpz-qg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.cpz-qg-dot.red { background: #E53935; }
.cpz-qg-dot.amber { background: #F57C00; }
.cpz-qg-more {
  text-align: center;
  font-size: 12px;
  color: #999;
  padding-top: 4px;
}
.cpz-qg-options {
  display: flex;
  gap: 12px;
}
.cpz-qg-card {
  flex: 1;
  padding: 16px 12px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease,
    box-shadow 0.15s ease;
  border: 2px solid transparent;
}
.cpz-qg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cpz-qg-fix {
  background: #E8F5E9;
  border-color: #66BB6A;
}
.cpz-qg-fix:hover {
  background: #C8E6C9;
}
.cpz-qg-accept {
  background: #FFF3E0;
  border-color: #FFA726;
}
.cpz-qg-accept:hover {
  background: #FFE0B2;
}
.cpz-qg-review {
  background: #E3F2FD;
  border-color: #42A5F5;
}
.cpz-qg-review:hover {
  background: #BBDEFB;
}
.cpz-qg-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.cpz-qg-card-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.cpz-qg-card-desc {
  font-size: 11px;
  color: #666;
  line-height: 1.3;
}
/* Mobile: stack cards */
@media (max-width: 600px) {
  .cpz-qg-options {
    flex-direction: column;
  }
  .cpz-qg-modal {
    padding: 20px;
  }
}

/* BUG-038: Hide WC Colour/Size ext_attribute dropdowns in Product panel */
/* These are replaced by FUAS swatches (colour) and OXTV grid (size) */
div.lumise-cart-field.ext-attribute { display: none !important; }

/* =========================================================================
   UX-013: CPZ Guide System CSS
   Deployed: 2026-06-13 (BUG-046 — missing from PROD, present in DEV)
   ========================================================================= */
/* Overlay container */
#cpz-guide-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000010;
  align-items: center;
  justify-content: center;
}

/* Semi-transparent backdrop */
.cpz-guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

/* Card */
.cpz-guide-card {
  position: relative;
  width: 90vw;
  max-width: 680px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  overflow: hidden;
  font-family: -apple-system,
    BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
}

/* Header bar (Terracotta brand) */
.cpz-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #C67B5C;
  color: #fff;
}
.cpz-guide-title {
  font-weight: 600;
  font-size: 15px;
}
.cpz-guide-close {
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  opacity: 0.8;
  padding: 0 4px;
}
.cpz-guide-close:hover {
  opacity: 1;
}

/* Body (Linen background) */
.cpz-guide-body {
  padding: 16px;
  text-align: center;
  background: #F5F0E8;
}
.cpz-guide-img {
  max-width: 100%;
  height: auto;
  max-height: 50vh;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.cpz-guide-caption {
  margin: 12px 0 0;
  font-size: 14px;
  color: #3D3229;
  line-height: 1.5;
}

/* Footer */
.cpz-guide-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid #eee;
}

/* Step dots */
.cpz-guide-dots {
  display: flex;
  gap: 6px;
}
.cpz-guide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  display: inline-block;
}
.cpz-guide-dot.active {
  background: #C67B5C;
}

/* Navigation buttons */
.cpz-guide-nav {
  display: flex;
  gap: 8px;
}
.cpz-guide-prev,
.cpz-guide-next,
.cpz-guide-done {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.cpz-guide-prev {
  background: #eee;
  color: #3D3229;
}
.cpz-guide-next {
  background: #C67B5C;
  color: #fff;
}
.cpz-guide-done {
  background: #7D8E5E;
  color: #fff;
}

/* --- Guide Library (Phase 1b) --- */
#cpz-guide-library {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000011;
  align-items: flex-start;
  justify-content: flex-end;
}
.cpz-lib-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
}
.cpz-lib-panel {
  position: relative;
  width: 340px;
  max-width: 90vw;
  height: 100vh;
  background: #F5F0E8;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  z-index: 1;
}
.cpz-lib-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #C67B5C;
  color: #fff;
  flex-shrink: 0;
}
.cpz-lib-title {
  font-size: 16px;
  font-weight: 700;
}
.cpz-lib-close {
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.cpz-lib-close:hover {
  opacity: 0.7;
}
.cpz-lib-search {
  padding: 10px 16px 6px;
  flex-shrink: 0;
}
.cpz-lib-search-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  color: #3D3229;
  box-sizing: border-box;
}
.cpz-lib-search-input:focus {
  outline: none;
  border-color: #C67B5C;
}
.cpz-lib-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 16px;
}
.cpz-lib-cat {
  margin-bottom: 12px;
}
.cpz-lib-cat-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
  padding: 6px 0 4px;
  letter-spacing: 0.5px;
}
.cpz-lib-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin: 3px 0;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.cpz-lib-item:hover {
  background: #ede8df;
}
.cpz-lib-item.unseen {
  border-left: 3px solid #C67B5C;
}
.cpz-lib-item-title {
  font-size: 14px;
  color: #3D3229;
  font-weight: 500;
}
.cpz-lib-item-meta {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
  margin-left: 8px;
}
.cpz-lib-empty {
  text-align: center;
  color: #999;
  padding: 24px 0;
  font-size: 13px;
}
.cpz-lib-footer {
  padding: 12px 16px;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
}
.cpz-lib-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #3D3229;
}
.cpz-lib-toggle-cb {
  display: none;
}
.cpz-lib-toggle-sw {
  width: 36px;
  height: 20px;
  background: #ccc;
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.cpz-lib-toggle-sw::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cpz-lib-toggle-cb:checked
  + .cpz-lib-toggle-sw {
  background: #7D8E5E;
}
.cpz-lib-toggle-cb:checked
  + .cpz-lib-toggle-sw::after {
  transform: translateX(16px);
}
.cpz-lib-toggle-hint {
  display: block;
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

/* Help menu injected items */
.cpz-helpmenu-lib {
  cursor: pointer;
  font-weight: 600;
}
.cpz-helpmenu-lib:hover {
  opacity: 0.8;
}
.cpz-helpmenu-toggle {
  padding: 8px 12px;
  border-top: 1px solid
    rgba(255,255,255,0.1);
}

/* Help Mode pill (Phase 1d) */
.cpz-help-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(198,123,92,0.15);
  color: #C67B5C;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  margin-left: 8px;
  white-space: nowrap;
  transition: background 0.2s;
  animation: cpzPillFadeIn 0.3s ease;
}
.cpz-help-pill:hover {
  background: rgba(198,123,92,0.3);
}
@keyframes cpzPillFadeIn {
  from { opacity: 0; transform:
    translateY(-4px); }
  to { opacity: 1; transform:
    translateY(0); }
}

/* Mobile: full-width card + library */
@media only screen and (max-width: 736px) {
  .cpz-guide-card {
    width: 96vw;
    max-width: none;
    margin: 0 2vw;
  }
  .cpz-guide-img {
    max-height: 40vh;
  }
  .cpz-guide-caption {
    font-size: 13px;
  }
  .cpz-guide-footer {
    padding: 10px 12px;
  }
  .cpz-lib-panel {
    width: 100vw;
    max-width: 100vw;
  }
}
/* =========================================================================
   END UX-013
   ========================================================================= */

/* =========================================================================
   UX-011: Hide About tab in Lumise Help Menu
   REGRESSION: Lost during FEAT-015 deploy (2026-02-18c).
   Restored: 2026-02-11. Re-added: 2026-06-13 (BUG-046 deploy).
   ========================================================================= */
li[data-tool="help"] span[data-nav="tab-3"],
li[data-tool="help"] li[data-view="tab-3"] {
    display: none !important;
}
