/* ===== Navi base layout ===== */

#navi-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  z-index: 2147483646;
  background: transparent;
  /* background: transparent url("https://www.247hrm.com/wp-content/uploads/2025/11/247hrmbot.png") center/contain no-repeat; */
  text-indent: -9999px;
  /* hide any text */
  overflow: visible;
  animation: navi-breathe 2s ease-in-out infinite;
  font-size: 0;
  color: transparent;
  border: none;
}
#navi-launcher::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
background-color: #ffcc33;
  background-image: url("https://www.247hrm.com/wp-content/uploads/2025/11/247hrmbot.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 70%;
  /* adjust 60–80% if needed */
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
  z-index: 1;
}
/* Restart chat button – white pill, left of X */
/* Restart chat – round refresh icon left of X */
/* Restart chat – round refresh icon left of X */
#navi-restart {
  position: absolute !important;
  top: 12px !important;
  right: 82px !important;
  /* more gap from X */

  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;

  background: #ffffff !important;
  /* pure white circle */
  border: none !important;
  cursor: pointer;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);

  font-size: 0;
  /* hide any text */
  color: #000000 !important;
  z-index: 2147483646 !important;
  pointer-events: auto !important;
}
#navi-close::after {
  content: attr(data-tip) !important;
    position: absolute;
  
    top: 115%;
    /* 👈 below the icon */
    left: 50%;
    transform: translateX(-50%);
  
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    font-size: 11px;
    white-space: nowrap;
  
    opacity: 0;
    pointer-events: none;
    z-index: 2147483647;
    /* on top of everything */
    transition: opacity 0.15s ease, transform 0.15s ease;
}
/* FINAL hard override for restart tooltip */
#navi-restart::after {
  all: unset;

  content: "Restart chat" !important;
  position: absolute !important;

  top: 115% !important;
  left: 50% !important;
  transform: translateX(-50%) !important;

  padding: 4px 8px !important;
  border-radius: 4px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  white-space: nowrap !important;

  opacity: 0;
  /* ✅ no !important */
  pointer-events: none !important;
  z-index: 2147483647 !important; 
}



/* draw refresh icon */
#navi-restart::before {
  content: "↻";
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #000000;
}

#navi-close:hover,
#navi-restart:hover {
  background: #f9fafb !important;
}

/* disabled after first use */
#navi-restart.navi-restart-disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}
/* Centered red warning for session expiry */
.navi-expired-banner {
  margin: 8px 16px;
  padding: 8px 12px;
  text-align: center;

  font-size: 12px;
  font-weight: 600;
  color: #b91c1c;
  /* red text */

  border-radius: 999px;
  background: #fee2e2;
  /* light red background */
  border: 1px solid #fecaca;
}


@keyframes navi-breathe {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 204, 51, 0.6);
  }

  60% {
    transform: scale(1.06);
    box-shadow: 0 0 0 14px rgba(255, 204, 51, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 204, 51, 0);
  }
}

/* Panel is hidden by default; JS sets display=block */
#navi-panel {
position: fixed;
  right: 24px;
  top: 24px;
  bottom: 24px;
  /* ✅ never goes out of screen */
  width: 380px;
  max-width: calc(100vw - 32px);

  height: auto !important;
  /* ✅ stop vh issues */
  max-height: none !important;

  border-radius: 16px;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 2147483647;
}

/* When visible (any display != none), use flex column */
#navi-panel:not([style*="display: none"]) {
  display: flex !important;
  flex-direction: column;
}

/* Header */
#navi-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #ffcc33;
  /* new header color */
  color: #000000;
  min-height: 52px;
}
#navi-panel>div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #ffcc33;
  color: #000000;
  min-height: 52px;
}

/* Hide any big header images inside that top area */
#navi-panel>div:first-child img {
  display: none !important;
}

#navi-title {
  font-size: 14px;
  font-weight: 700;
}

#navi-head {
  position: relative;
  overflow: visible !important;
}
#navi-head>div:last-child {
  background: transparent;
  box-shadow: none !important;
  padding: 0 !important;
}
#navi-close {
  position: absolute !important;
  top: 12px;
  right: 16px;

  width: 28px;
  height: 28px;
  border-radius: 999px;

  background: #ffffff !important;
  color: #000000 !important;
  border: none !important;

  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  font-size: 0;
  z-index: 2;
}

#navi-close::before {
  content: "×";
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
    color: #000000;
}
#navi-close:hover::after,
#navi-restart:hover::after {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(2px);
}

/* Hide any inner icon/text that plugin may inject */
#navi-close>* {
  display: none !important;
}
#navi-head>*:last-child {
  background: transparent ;
}

/* Body scrolls; footer is fixed at bottom */
#navi-body {
  flex: 1 1 auto;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-width: 100%;
  padding: 12px 16px;
  background: #f8fafc;
}

/* Footer / input area */
#navi-foot {
  flex: 0 0 auto;
  display: flex !important;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

#navi-input {
  flex: 1 1 auto;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
}

#navi-send {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: #ffcc33;
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#navi-send:hover {
  filter: brightness(1.05);
}

/* ===== Chat bubbles ===== */

.navi-row {
  margin-bottom: 8px;
}

/* Base bubble */
.navi-bubble {
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Bot message (left) */
.navi-bot .navi-bubble {
  background: #ffffff;
  color: #0f172a;
}

/* User message (right) */
.navi-user {
  display: flex;
  justify-content: flex-end;
}

.navi-user .navi-bubble {
  background: #2563eb;
  color: #ffffff;
}

/* Thinking bubble */
.navi-think {
  font-style: italic;
  opacity: 0.8;
}

/* Session expired bubble */
.navi-expired {
  background: #fef3c7;
  color: #92400e;
}

/* ===== Generic chips from backend suggestions ===== */

.navi-chips {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  align-items: stretch;
}

.navi-chip {
  flex: 1 1 auto;
  max-width: 100%;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  
  background: #ffffff !important;
  color: #111111 !important;
  border: 2px solid #ff6b00 !important;
  
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
  
    /* allow wrapping instead of overflowing horizontally */
  white-space: normal !important;
  word-break: break-word;
}
.navi-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  background: #fff7e5 !important;
}


/* ===== Main option buttons: Demo / Pricing / Features / Support ===== */

/* Main option buttons: solid border + dark text */

.navi-main-options {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.navi-main-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.navi-bubble .navi-main-chip {
  flex: 1 1 calc(50% - 8px);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;

  background: #ffffff !important;
  color: #111111 !important;
  border: 2px solid #ff6b00 !important;

  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
.navi-bubble .navi-main-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  background: #fff7e5 !important;
}

.navi-main-chip {
  flex: 1 1 calc(50% - 8px);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;

  background: #ffffff !important;
  color: #111111 !important;
  border: 2px solid #ff6b00 !important;

  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.navi-main-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  background: #fff7e5 !important;
}

@media (max-width: 480px) {
  .navi-main-chip {
    flex: 1 1 100%;
  }
}

/* ===== Responsive adjustments ===== */

/* Tablets / small laptops */
@media (max-width: 1024px) {
  #navi-panel {
    right: 16px;
    bottom: 96px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 80vh;
    max-height: 80vh;
  }
}
/* Mobiles */
@media (max-width: 768px) {
  #navi-panel {
  left: 8px;
    right: 8px;
    top: 8px;
    bottom: 8px;
    /* ✅ full screen */
    width: auto;
  
    height: auto !important;
    max-height: none !important;
    border-radius: 14px;
  }

  #navi-launcher {
    right: 12px;
    bottom: 12px;
    width: 56px;
    height: 56px;
  }

  .navi-main-chip {
    flex: 1 1 100%;
  }
}

/* Very small phones */
@media (max-width: 480px) {
  .navi-bubble .navi-main-chip {
      flex: 1 1 100%;
  }
  #navi-panel {
      left: 8px;
        right: 8px;
        top: 8px;
        bottom: 8px;
        /* ✅ keep same */
        border-radius: 12px;
  }

  #navi-launcher {
    right: 10px;
    bottom: 10px;
    width: 52px;
    height: 52px;
  }
}