/* ================================================================
   Proto P Integration — Embrace Wellness
   Adds Proto button to search bar + connect/loading/connected modal
   ================================================================ */

/* Search bar container (placed in hero) */
.embrace-search-wrap {
  max-width: 640px;
  margin-top: 32px;
}

/* Row: search bar fills full width */
.embrace-search-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.embrace-search-bar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: rgba(35,35,31,0.88);
  border: 1px solid rgba(241,235,223,0.10);
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.28);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.embrace-search-bar:focus-within {
  border-color: rgba(167,187,149,0.45);
  box-shadow: 0 0 0 5px rgba(167,187,149,0.12);
}

/* Proto P button — inline right slot inside search bar (between badge and Ask Dave) */
.proto-p-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 7px;
  border: 1px solid rgba(167,187,149,0.22);
  background: rgba(167,187,149,0.08);
  color: #a7bb95;
  font-family: 'Zodiak', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}
.proto-p-btn--inline {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  margin: 0 7px 0 0;
}
.proto-p-btn:hover {
  background: rgba(167,187,149,0.16);
  border-color: rgba(167,187,149,0.38);
  color: #c4d4b3;
}
.proto-p-btn.connected {
  background: rgba(74,180,74,0.12);
  border-color: rgba(74,180,74,0.32);
  color: #5ec25e;
}
.proto-p-btn.connected:hover {
  background: rgba(74,180,74,0.20);
}

/* Search input */
.embrace-search-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: #f1ebdf;
  font-family: 'Work Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  padding: 18px 16px;
  caret-color: #d3a279;
}
.embrace-search-input::placeholder {
  color: rgba(241,235,223,0.38);
}

/* Search submit button */
.embrace-search-btn {
  flex-shrink: 0;
  min-height: 58px;
  padding: 0 24px;
  background: #a7bb95;
  border: none;
  border-radius: 0;
  color: #fffdf8;
  font-family: 'Work Sans', 'Helvetica Neue', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.embrace-search-btn:hover {
  background: #e6b78e;
}

/* Chips below search */
.embrace-search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.embrace-chip {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(241,235,223,0.12);
  background: rgba(35,35,31,0.7);
  color: rgba(241,235,223,0.60);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: 'Work Sans', 'Helvetica Neue', sans-serif;
  transition: all 0.18s ease;
}
.embrace-chip:hover {
  background: rgba(167,187,149,0.10);
  border-color: rgba(167,187,149,0.28);
  color: #f1ebdf;
}

/* Proto connected badge in search */
.proto-connected-badge {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-right: 6px;
  border-radius: 999px;
  background: rgba(74,180,74,0.10);
  border: 1px solid rgba(74,180,74,0.22);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #5ec25e;
  white-space: nowrap;
  flex-shrink: 0;
}
.proto-connected-badge.visible {
  display: inline-flex;
}
.proto-connected-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ec25e;
}

/* ================================================================
   Proto Modal
   ================================================================ */
.proto-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.proto-overlay.open {
  display: flex;
}
.proto-overlay.visible {
  opacity: 1;
}

.proto-modal {
  width: 100%;
  max-width: 480px;
  background: #1a1a16;
  border: 1px solid rgba(241,235,223,0.10);
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.proto-overlay.visible .proto-modal {
  transform: translateY(0) scale(1);
}

/* Modal header */
.proto-modal-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.proto-modal-icon {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: rgba(167,187,149,0.10);
  border: 1px solid rgba(167,187,149,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Zodiak', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #a7bb95;
}
.proto-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proto-modal-title {
  font-family: 'Zodiak', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #f1ebdf;
  line-height: 1.1;
}
.proto-modal-source {
  font-size: 12px;
  color: rgba(241,235,223,0.42);
  letter-spacing: 0.02em;
}

/* Modal body */
.proto-modal-body {
  padding: 20px 28px 0;
}
.proto-modal-desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(241,235,223,0.68);
  margin-bottom: 20px;
}

/* THIS WILL SHARE section */
.proto-share-section {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(241,235,223,0.08);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.proto-share-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241,235,223,0.40);
  margin-bottom: 12px;
}
.proto-share-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.proto-share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(241,235,223,0.80);
  line-height: 1.3;
}
.proto-share-check {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid rgba(167,187,149,0.35);
  background: rgba(167,187,149,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.proto-share-check svg {
  width: 12px;
  height: 12px;
  color: #a7bb95;
}

/* Privacy note */
.proto-privacy {
  font-size: 12px;
  color: rgba(241,235,223,0.35);
  line-height: 1.55;
  margin-bottom: 4px;
}

/* Modal footer (buttons) */
.proto-modal-footer {
  padding: 20px 28px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.proto-btn-cancel {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(241,235,223,0.12);
  background: transparent;
  color: rgba(241,235,223,0.60);
  font-family: 'Work Sans', 'Helvetica Neue', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.proto-btn-cancel:hover {
  border-color: rgba(241,235,223,0.22);
  color: #f1ebdf;
}
.proto-btn-connect {
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  border: none;
  background: #a7bb95;
  color: #fffdf8;
  font-family: 'Work Sans', 'Helvetica Neue', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s;
}
.proto-btn-connect:hover {
  background: #c4d4b3;
}

/* ================================================================
   Loading state
   ================================================================ */
.proto-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 28px;
  text-align: center;
  gap: 18px;
}
.proto-loading.visible {
  display: flex;
}
.proto-loading-icon {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proto-loading-icon .p-letter {
  font-family: 'Zodiak', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  color: #a7bb95;
  z-index: 1;
  position: relative;
}
.proto-loading-spinner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(167,187,149,0.12);
  border-top-color: #a7bb95;
  animation: protoSpin 0.9s linear infinite;
}
@keyframes protoSpin {
  to { transform: rotate(360deg); }
}
.proto-loading-title {
  font-family: 'Zodiak', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #f1ebdf;
}
.proto-loading-sub {
  font-size: 14px;
  color: rgba(241,235,223,0.48);
}

/* ================================================================
   Connected result state
   ================================================================ */
.proto-connected {
  display: none;
  flex-direction: column;
  padding: 0;
}
.proto-connected.visible {
  display: flex;
}

.proto-connected-header {
  padding: 24px 28px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.proto-connected-icon {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: rgba(74,180,74,0.10);
  border: 1px solid rgba(74,180,74,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Zodiak', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #5ec25e;
}
.proto-connected-status {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.proto-connected-status .title {
  font-family: 'Zodiak', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #f1ebdf;
  line-height: 1.1;
}
.proto-connected-status .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #5ec25e;
}
.proto-connected-status .badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ec25e;
}

/* Recommendation content */
.proto-recs {
  padding: 0 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.proto-rec-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241,235,223,0.38);
}
.proto-rec-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(241,235,223,0.08);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s;
}
.proto-rec-card:hover {
  border-color: rgba(167,187,149,0.25);
}
.proto-rec-card .rec-product {
  font-family: 'Work Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #f1ebdf;
}
.proto-rec-card .rec-reason {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(241,235,223,0.58);
}
.proto-rec-card .rec-markers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.proto-rec-marker {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(167,187,149,0.08);
  border: 1px solid rgba(167,187,149,0.15);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a7bb95;
}

/* Connected footer */
.proto-connected-footer {
  padding: 16px 28px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid rgba(241,235,223,0.06);
  margin-top: 8px;
}
.proto-btn-done {
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  border: none;
  background: #a7bb95;
  color: #fffdf8;
  font-family: 'Work Sans', 'Helvetica Neue', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s;
}
.proto-btn-done:hover {
  background: #c4d4b3;
}
.proto-btn-disconnect {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(241,235,223,0.10);
  background: transparent;
  color: rgba(241,235,223,0.45);
  font-family: 'Work Sans', 'Helvetica Neue', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.proto-btn-disconnect:hover {
  border-color: rgba(241,235,223,0.22);
  color: rgba(241,235,223,0.70);
}

/* ================================================================
   Mobile Responsive
   ================================================================ */
@media (max-width: 768px) {
  .embrace-search-wrap {
    max-width: 100%;
  }
  .embrace-search-row {
    gap: 0;
  }
  .embrace-search-bar {
    flex-wrap: wrap;
  }
  .proto-p-btn--inline {
    width: 38px;
    height: 38px;
    border-radius: 5px;
    font-size: 18px;
    margin: 0 6px 0 0;
  }
  .embrace-search-input {
    flex: 1;
    min-width: 0;
    padding: 14px 10px;
    font-size: 15px;
  }
  .embrace-search-btn {
    width: 100%;
    border-radius: 0 0 12px 12px;
    min-height: 50px;
  }
  .proto-modal {
    max-width: 100%;
    border-radius: 10px;
  }
  .proto-modal-header,
  .proto-modal-body,
  .proto-modal-footer,
  .proto-connected-header,
  .proto-recs,
  .proto-connected-footer,
  .proto-loading {
    padding-left: 20px;
    padding-right: 20px;
  }
}
