/*=========================================================
  NAKSHATRA — CHAT WITH ASTROLOGER STYLES
  Custom layout matching the provided screenshot design.
  Uses the project variables for theme consistency.
==========================================================*/

/* --- Page Container & Layout --- */
.nkChatPage {
  background-color: var(--nk-cream);
  min-height: 80vh;
  padding-block: var(--nk-space-xl) var(--nk-space-2xl);
  font-family: var(--nk-font-body);
}

.nkChatHeader {
  text-align: center;
  max-width: 860px;
  margin: 0 auto var(--nk-space-xl);
  padding-inline: var(--nk-space-md);
}

.nkChatHeader h1 {
  font-family: var(--nk-font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: #2b2b2b;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.nkZodiacDivider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-block: 1rem 1.5rem;
}

.nkZodiacDivider::before,
.nkZodiacDivider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #eee3c7;
  max-width: 380px;
}

.nkZodiacIcon {
  width: 36px;
  height: 36px;
  background-color: #f2a93b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c97a1a;
  box-shadow: 0 0 10px rgba(242, 169, 59, 0.4);
}

.nkZodiacIcon svg {
  width: 22px;
  height: 22px;
  fill: #fffefa;
}

.nkChatDescription {
  color: #777777;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 820px;
  margin: 0 auto;
}

/* --- Search and Filters Container --- */
.nkDirectoryControls {
  display: flex;
  align-items: center;
  gap: var(--nk-space-sm);
  margin-bottom: var(--nk-space-xl);
  padding-bottom: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

.nkDirectoryControls::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* --- Search Box --- */
.nkSearchBox {
  display: flex;
  align-items: center;
  background: var(--nk-surface);
  border: 1.5px solid #e2d9c2;
  border-radius: 12px;
  overflow: hidden;
  height: 44px;
  width: 230px;
  flex-shrink: 0;
  box-shadow: var(--nk-shadow-sm);
  transition: border-color var(--nk-transition-fast), box-shadow var(--nk-transition-fast);
}

.nkSearchBox:focus-within {
  border-color: var(--nk-marigold-deep);
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.15);
  outline: none;
}

.nkSearchBtn {
  background: #f2a93b;
  width: 44px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  flex-shrink: 0;
}

.nkSearchBtn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.nkSearchInput {
  border: none;
  background: transparent;
  padding: 0 12px;
  width: 100%;
  height: 100%;
  font-size: 0.9rem;
  color: var(--nk-ink);
}

.nkSearchInput::placeholder {
  color: #a89f88;
}

.nkSearchInput:focus {
  outline: none;
}

/* --- Filter Pills --- */
.nkFilterPill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 1px solid #e2d9c2;
  background: var(--nk-surface);
  color: var(--nk-ink-soft);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--nk-transition-fast);
}

.nkFilterPill svg {
  width: 16px;
  height: 16px;
  transition: stroke var(--nk-transition-fast), fill var(--nk-transition-fast);
}

.nkFilterPill:hover {
  background: #fffdf5;
  border-color: #d1c4a5;
  color: var(--nk-ink);
  transform: translateY(-1px);
}

/* Specific highlight for active filter (e.g. All is active) */
.nkFilterPill.isActive,
.nkFilterPill[data-category="All"] {
  border: 1.5px solid #f2a93b;
  color: #1a1a1a;
  background: #fffae8;
  font-weight: 600;
}

.nkFilterPill.isActive svg {
  stroke: #c97 a1a;
}

/* --- Astrologer Grid Layout --- */
.nkAstrologerGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 10px;
}

/* --- Custom Astrologer Card --- */
.nkChatAstroCard {
  background: var(--nk-surface);
  border: 1px solid #eee3c7;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(43, 32, 19, 0.04);
  padding: 16px;
  display: flex;
  position: relative;
  transition: transform var(--nk-transition-base), box-shadow var(--nk-transition-base);
  overflow: hidden;
}

.nkChatAstroCard:hover {
  transform: translateY(-4px);
  box-shadow: var(--nk-shadow-md);
}

/* Left Column: Avatar & Rating info */
.nkAstroCardLeft {
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  border-right: 1px solid rgba(238, 227, 199, 0.4);
  padding-right: 12px;
  margin-right: 12px;
}

.nkAstroCardAvatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f2a93b;
  background-color: #fffefa;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

.nkAstroRatingStars {
  display: flex;
  gap: 1px;
  margin-top: 10px;
  justify-content: center;
}

.nkAstroRatingStars span {
  color: #f2a93b;
  font-size: 0.7rem;
}

.nkAstroOrders {
  font-size: 0.65rem;
  color: #888888;
  margin-top: 4px;
  text-align: center;
  font-weight: 500;
}

.nkAstroNewBadge {
  font-size: 0.7rem;
  color: #e74c3c;
  font-weight: 700;
  margin-top: 4px;
  text-align: center;
  animation: pulseNew 2s infinite;
}

@keyframes pulseNew {
  0% { opacity: 0.85; }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.85; }
}

/* Right Column: Information & Actions */
.nkAstroCardRight {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
}

/* Verified Badge (top-right checkmark) */
.nkAstroVerified {
  position: absolute;
  top: 0;
  right: 0;
  color: #248a52;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nkAstroVerified svg {
  width: 18px;
  height: 18px;
  fill: #e6f7e6;
  border-radius: 50%;
}

.nkAstroName {
  font-family: var(--nk-font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
  padding-right: 22px; /* space for verified badge */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nkAstroRightDetails {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

.nkAstroSpecialtyText,
.nkAstroLangText,
.nkAstroExpText {
  font-size: 0.78rem;
  color: #666666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* Bottom flex block */
.nkAstroCardActionRow {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(238, 227, 199, 0.3);
  padding-top: 8px;
}

.nkAstroRate {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1a1a;
  width: 100%;
  overflow: hidden;
}

.nkAstroRate .nkDualPrice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.nkAstroRate .nkPriceLocal,
.nkAstroRate .nkPriceAed {
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nkAstroRate span {
  font-size: 0.8rem;
  color: #1a1a1a;
}

.nkAstroRate small {
  font-size: 0.72rem;
  color: #777777;
  font-weight: 400;
}

.nkChatConnectBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1b8b54;
  color: #1b8b54;
  background: transparent;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--nk-transition-fast);
}

.nkChatConnectBtn:hover {
  background-color: #1b8b54;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(27, 139, 84, 0.2);
}

/* Empty search state — hidden by default; shown only via inline
   style="display:block" set server-side (no results at all) or by
   chat.js's applyFilters() (a search/filter matches nothing). Not
   relying solely on the inline style avoids any flash of this block
   before JS/Blade has had a chance to set it. */
.nkChatEmptyState {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--nk-surface);
  border: 1px dashed #e2d9c2;
  border-radius: 16px;
  color: #666;
}

.nkChatEmptyState svg {
  width: 48px;
  height: 48px;
  stroke: #a89f88;
  margin-bottom: 1rem;
}

.nkChatEmptyState h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--nk-ink);
  margin-bottom: 0.5rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
  .nkAstrologerGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nkChatHeader h1 {
    font-size: 1.85rem;
  }
  .nkZodiacDivider::before,
  .nkZodiacDivider::after {
    max-width: 150px;
  }
  .nkAstrologerGrid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .nkDirectoryControls {
    padding-inline: var(--nk-space-sm);
  }
}
