/* ==========================================================================
   JEWELS BY SIREESHA — Jewellery Concierge Widget Styling
   Crafted with Artisan Workbench Tokens (Deep Teals, Antique Gold, Fine Ivory)
   ========================================================================== */

/* Reposition existing fab-whatsapp so it sits neatly above the concierge launcher */
.fab-whatsapp {
  bottom: 92px !important;
  right: 22px !important;
  width: 50px !important;
  height: 50px !important;
  transition: transform .3s var(--ease), bottom .3s var(--ease) !important;
}
.fab-whatsapp svg {
  width: 24px !important;
  height: 24px !important;
}
@media (max-width: 520px) {
  .fab-whatsapp {
    bottom: 84px !important;
    right: 18px !important;
    width: 44px !important;
    height: 44px !important;
  }
}

/* --------------------------------------------------------------------------
   Widget Container
   -------------------------------------------------------------------------- */
.jbs-concierge {
  position: fixed;
  z-index: 9999;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: var(--ink-900, #14201e);
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Floating Launcher Button
   -------------------------------------------------------------------------- */
.jbs-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-400, #d4af37);
  background: linear-gradient(135deg, var(--teal-900, #0c2f2c) 0%, var(--teal-950, #08211f) 100%);
  color: var(--gold-300, #f2d99e);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px -6px rgba(8, 33, 31, 0.55), 0 0 0 1px rgba(229, 194, 116, 0.25);
  transition: transform .35s var(--ease, cubic-bezier(.22, 1, .36, 1)), box-shadow .35s var(--ease, cubic-bezier(.22, 1, .36, 1));
}

.jbs-launcher:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 36px -6px rgba(8, 33, 31, 0.65), 0 0 0 2px rgba(229, 194, 116, 0.4);
}

.jbs-launcher:active {
  transform: translateY(0) scale(0.96);
}

.jbs-launcher__glow {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(229, 194, 116, 0.45);
  opacity: 0;
  animation: jbsPulse 3s infinite ease-in-out;
  pointer-events: none;
}

@keyframes jbsPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.1;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.45;
  }
}

.jbs-launcher__icon-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jbs-launcher__icon {
  width: 24px;
  height: 24px;
  position: absolute;
  transition: transform .3s var(--ease, cubic-bezier(.22, 1, .36, 1)), opacity .25s ease;
}

.jbs-launcher__icon--open {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.jbs-launcher__icon--close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
  color: #fff;
}

.jbs-launcher.is-active .jbs-launcher__icon--open {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

.jbs-launcher.is-active .jbs-launcher__icon--close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Badge tooltip on launcher */
.jbs-launcher__badge {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--teal-950, #08211f);
  color: var(--gold-200, #faeecf);
  border: 1px solid rgba(229, 194, 116, 0.35);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-label, "Cinzel", serif);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(-50%) translateX(6px);
  transition: all .3s var(--ease);
}

.jbs-launcher__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-400, #d4af37);
  box-shadow: 0 0 6px var(--gold-400, #d4af37);
}

.jbs-launcher:hover .jbs-launcher__badge,
.jbs-launcher:focus-visible .jbs-launcher__badge {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.jbs-launcher.is-active .jbs-launcher__badge {
  display: none;
}

/* --------------------------------------------------------------------------
   Chat Panel Window
   -------------------------------------------------------------------------- */
.jbs-panel {
  position: fixed;
  right: 22px;
  bottom: 96px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 120px);
  background: #fbf9f4;
  border: 1px solid rgba(199, 154, 73, 0.35);
  border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(8, 33, 31, 0.45), 0 4px 18px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  pointer-events: none;
  transition: opacity .32s var(--ease, cubic-bezier(.22, 1, .36, 1)), transform .32s var(--ease, cubic-bezier(.22, 1, .36, 1));
}

.jbs-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Panel Header
   -------------------------------------------------------------------------- */
.jbs-header {
  background: linear-gradient(135deg, var(--teal-950, #08211f) 0%, var(--teal-900, #0c2f2c) 100%);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(229, 194, 116, 0.25);
  position: relative;
  flex-shrink: 0;
}

.jbs-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400, #d4af37), transparent);
}

.jbs-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jbs-header__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(229, 194, 116, 0.12);
  border: 1px solid var(--gold-400, #d4af37);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-300, #f2d99e);
  flex-shrink: 0;
}

.jbs-header__avatar svg {
  width: 20px;
  height: 20px;
}

.jbs-header__info {
  display: flex;
  flex-direction: column;
}

.jbs-header__title {
  font-family: var(--font-display, "Cormorant Garamond", serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.15;
  color: #fff;
  letter-spacing: .02em;
}

.jbs-header__subtitle {
  font-family: var(--font-label, "Cinzel", serif);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-300, #f2d99e);
  margin: 2px 0 0;
}

.jbs-header__status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: #9cb3ab;
  margin-top: 3px;
}

.jbs-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 6px #25d366;
}

.jbs-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.jbs-header__btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: #c9d7d2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.jbs-header__btn:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.3);
}

.jbs-header__btn svg {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   Messages Container
   -------------------------------------------------------------------------- */
.jbs-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background-color: #fbf9f4;
  background-image: 
    linear-gradient(90deg, rgba(199,154,73,.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(199,154,73,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  scroll-behavior: smooth;
}

.jbs-messages::-webkit-scrollbar {
  width: 5px;
}
.jbs-messages::-webkit-scrollbar-track {
  background: transparent;
}
.jbs-messages::-webkit-scrollbar-thumb {
  background: rgba(199,154,73,.25);
  border-radius: 4px;
}
.jbs-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(199,154,73,.45);
}

/* Date Divider */
.jbs-date-divider {
  text-align: center;
  margin: 4px 0 8px;
  position: relative;
}
.jbs-date-divider span {
  display: inline-block;
  font-family: var(--font-label, "Cinzel", serif);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-700, #8f6723);
  background: #f4ede1;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid rgba(199, 154, 73, 0.2);
}

/* --------------------------------------------------------------------------
   Message Items & Bubbles
   -------------------------------------------------------------------------- */
.jbs-message {
  display: flex;
  gap: 10px;
  max-width: 90%;
  animation: jbsFadeUp .25s ease-out;
}

@keyframes jbsFadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.jbs-message--bot {
  align-self: flex-start;
}

.jbs-message--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.jbs-message__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-900, #0c2f2c);
  color: var(--gold-300, #f2d99e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1px solid rgba(229, 194, 116, 0.35);
}

.jbs-message__avatar svg {
  width: 14px;
  height: 14px;
}

.jbs-message__bubble {
  position: relative;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: .91rem;
  line-height: 1.55;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}

.jbs-message--bot .jbs-message__bubble {
  background: #ffffff;
  border: 1px solid var(--ivory-200, #e8e2d4);
  color: var(--ink-800, #222d2b);
  border-bottom-left-radius: 2px;
}

.jbs-message--user .jbs-message__bubble {
  background: linear-gradient(135deg, var(--teal-800, #0f3d38) 0%, var(--teal-900, #0c2f2c) 100%);
  border: 1px solid rgba(229, 194, 116, 0.25);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.jbs-message__bubble p {
  margin: 0;
}

.jbs-message__bubble p + p {
  margin-top: 8px;
}

.jbs-message__time {
  display: block;
  font-size: .68rem;
  margin-top: 5px;
  text-align: right;
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   Typing Indicator
   -------------------------------------------------------------------------- */
.jbs-typing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 8px;
  animation: jbsFadeUp .2s ease-out;
}

.jbs-typing[hidden] {
  display: none !important;
}

.jbs-typing__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-900, #0c2f2c);
  color: var(--gold-300, #f2d99e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(229, 194, 116, 0.35);
}

.jbs-typing__avatar svg {
  width: 14px;
  height: 14px;
}

.jbs-typing__bubble {
  background: #ffffff;
  border: 1px solid var(--ivory-200, #e8e2d4);
  padding: 8px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.jbs-typing__label {
  font-size: .78rem;
  color: var(--ink-500, #5a6d68);
  font-style: italic;
}

.jbs-typing__dots {
  display: inline-flex;
  gap: 4px;
}

.jbs-typing__dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-500, #c79a49);
  animation: jbsDotBounce 1.4s infinite ease-in-out both;
}

.jbs-typing__dots span:nth-child(1) { animation-delay: -0.32s; }
.jbs-typing__dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes jbsDotBounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Product Recommendation Cards inside chat
   -------------------------------------------------------------------------- */
.jbs-product-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.jbs-card {
  background: #ffffff;
  border: 1px solid var(--ivory-200, #e8e2d4);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
}

.jbs-card__media {
  position: relative;
  aspect-ratio: 16/9;
  background: #f0ebe1;
  overflow: hidden;
}

.jbs-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jbs-card__style {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(8, 33, 31, 0.85);
  color: var(--gold-300, #f2d99e);
  font-family: var(--font-label, "Cinzel", serif);
  font-size: .56rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
}

.jbs-card__content {
  padding: 10px 12px 12px;
}

.jbs-card__title {
  font-family: var(--font-display, "Cormorant Garamond", serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal-950, #08211f);
  margin: 0 0 4px;
  line-height: 1.25;
}

.jbs-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .76rem;
  color: var(--ink-500, #5a6d68);
  margin-bottom: 6px;
}

.jbs-card__weight {
  font-weight: 600;
  color: var(--gold-700, #8f6723);
}

.jbs-card__price {
  font-size: .74rem;
  font-style: italic;
}

.jbs-card__desc {
  font-size: .8rem;
  color: var(--ink-600, #425550);
  line-height: 1.4;
  margin: 0 0 10px;
}

.jbs-card__actions {
  display: flex;
}

/* --------------------------------------------------------------------------
   Custom Summary Card
   -------------------------------------------------------------------------- */
.jbs-custom-summary {
  background: #ffffff;
  border: 1px solid rgba(199, 154, 73, 0.4);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
  box-shadow: 0 4px 14px rgba(12, 47, 44, 0.06);
}

.jbs-custom-summary__header {
  font-family: var(--font-label, "Cinzel", serif);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-700, #8f6723);
  margin-bottom: 8px;
  border-bottom: 1px solid var(--ivory-200, #e8e2d4);
  padding-bottom: 6px;
}

.jbs-custom-summary__list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: .82rem;
  color: var(--ink-800, #222d2b);
}

.jbs-custom-summary__list li strong {
  color: var(--teal-900, #0c2f2c);
}

.jbs-custom-summary__note {
  font-size: .74rem;
  color: var(--ink-500, #5a6d68);
  font-style: italic;
  margin: 0 0 10px;
}

/* --------------------------------------------------------------------------
   Quick Replies Chips Container
   -------------------------------------------------------------------------- */
.jbs-quick-replies {
  display: flex;
  gap: 6px;
  padding: 8px 16px 10px;
  overflow-x: auto;
  white-space: nowrap;
  flex-shrink: 0;
  background: #fbf9f4;
  border-top: 1px solid rgba(199, 154, 73, 0.15);
  scrollbar-width: none;
}

.jbs-quick-replies::-webkit-scrollbar {
  display: none;
}

.jbs-chip {
  background: #ffffff;
  border: 1px solid var(--ivory-200, #e8e2d4);
  color: var(--teal-900, #0c2f2c);
  border-radius: 18px;
  padding: 6px 12px;
  font-family: var(--font-label, "Cinzel", serif);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .2s var(--ease);
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
}

.jbs-chip:hover {
  background: var(--teal-800, #0f3d38);
  color: #fff;
  border-color: var(--teal-800, #0f3d38);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Input Form
   -------------------------------------------------------------------------- */
.jbs-input-form {
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid var(--ivory-200, #e8e2d4);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.jbs-input {
  flex: 1 1 auto;
  height: 40px;
  border: 1px solid var(--ivory-200, #e8e2d4);
  border-radius: 20px;
  padding: 0 16px;
  font-family: inherit;
  font-size: .88rem;
  color: var(--ink-900, #14201e);
  background: #fcfbf8;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.jbs-input:focus {
  border-color: var(--gold-500, #c79a49);
  box-shadow: 0 0 0 3px rgba(199, 154, 73, 0.18);
  background: #fff;
}

.jbs-input::placeholder {
  color: #8fa39c;
  font-size: .82rem;
}

.jbs-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300, #f2d99e), var(--gold-500, #c79a49));
  border: none;
  color: var(--teal-950, #08211f);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(199, 154, 73, 0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}

.jbs-send-btn:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 6px 14px rgba(199, 154, 73, 0.5);
}

.jbs-send-btn:active {
  transform: translateY(0) scale(0.95);
}

.jbs-send-btn svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

/* --------------------------------------------------------------------------
   MANDATORY: TWO PERMANENT ACTION BUTTONS (WHATSAPP + CONTACT)
   Pinned at bottom of chat panel
   -------------------------------------------------------------------------- */
.jbs-permanent-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 14px 12px;
  background: #f4ede1;
  border-top: 1px solid rgba(199, 154, 73, 0.25);
  flex-shrink: 0;
}

.jbs-perm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: var(--font-label, "Cinzel", serif);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}

/* Permanent Button 1: WhatsApp */
.jbs-perm-btn--whatsapp {
  background: #1f5c47;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(31, 92, 71, 0.35);
}

.jbs-perm-btn--whatsapp:hover {
  background: #194b3a;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(31, 92, 71, 0.45);
}

/* Permanent Button 2: Contact */
.jbs-perm-btn--contact {
  background: var(--teal-900, #0c2f2c);
  color: var(--gold-300, #f2d99e);
  border-color: rgba(229, 194, 116, 0.35);
}

.jbs-perm-btn--contact:hover {
  background: var(--teal-950, #08211f);
  color: #ffffff;
  border-color: var(--gold-400, #d4af37);
  transform: translateY(-1px);
}

.jbs-perm-btn__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Utility Buttons (inside bubbles / cards)
   -------------------------------------------------------------------------- */
.jbs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 4px;
  font-family: var(--font-label, "Cinzel", serif);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s var(--ease);
  border: 1px solid transparent;
}

.jbs-btn--block {
  width: 100%;
}

.jbs-btn--sm {
  padding: 6px 12px;
  font-size: .64rem;
}

.jbs-btn--whatsapp {
  background: #1f5c47;
  color: #fff;
}

.jbs-btn--whatsapp:hover {
  background: #194b3a;
  color: #fff;
}

.jbs-btn--gold {
  background: linear-gradient(180deg, var(--gold-300, #f2d99e), var(--gold-500, #c79a49));
  color: var(--teal-950, #08211f);
}

.jbs-btn--gold:hover {
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Mobile Responsiveness (<= 520px)
   -------------------------------------------------------------------------- */
@media (max-width: 520px) {
  .jbs-launcher {
    right: 18px;
    bottom: 18px;
    width: 54px;
    height: 54px;
  }

  .jbs-launcher__badge {
    display: none;
  }

  .jbs-panel {
    right: 0;
    bottom: 0;
    left: 0;
    top: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .jbs-header {
    padding: 14px 16px;
  }

  .jbs-messages {
    padding: 14px 12px;
  }

  .jbs-message {
    max-width: 94%;
  }

  .jbs-message__bubble {
    font-size: .88rem;
    padding: 10px 14px;
  }

  .jbs-permanent-ctas {
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  }
}
