/* -------------------------
   CHATBOT THEME (CrazyDomains-style)
   Author: ChatGPT
------------------------- */
/* Ensure header buttons are clickable and above other content */
.nsr-chat-header {
  position: relative;
  z-index: 30;
}

.header-action {
  position: relative;
  z-index: 40;
  pointer-events: auto;
}

.nsr-chat-box {
  z-index: 25;
}

/* ensure whole box sits above page */
.quick-btn {
  background: #0060df;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 16px;
  margin: 0 6px;
  cursor: pointer;
  height: 40px;
  width: 40px;
}

.quick-menu {
  position: absolute;
  bottom: 52px;
  right: 60px;
  display: none;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #d0d9ff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 8px;
  border-radius: 10px;
  z-index: 999;
  min-width: 140px;
}

.quick-menu a {
  color: #0060df;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f2f6ff;
  text-align: center;
  transition: 0.2s ease;
}

.quick-menu a:hover {
  background: #e5ecff;
}
/* Header layout: logo left, title center-left, actions right */
.nsr-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 8px;
}

/* left block */
.nsr-chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* logo */
.nsr-chat-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.14);
  background: #fff;
  border: 1px solid rgba(255,255,255,0.08);
}

/* title text (two-line compact) */
.nsr-chat-title .small {
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  line-height: 1;
  font-weight: 600;
}
.nsr-chat-title .big {
  font-size: 14px;
  color: #fff;
  line-height: 1;
  font-weight: 700;
  margin-top: 0px;
}

/* right block actions */
.nsr-chat-header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* action buttons style */
.header-action {
  background: rgba(255,255,255,0.12);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s ease, transform .08s ease;
}
.header-action:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
.header-action svg { display:block; }

/* collapsed/minimized state (hide conversation + input, keep header visible) */
.nsr-chat-box.minimized .nsr-chat-conversation,
.nsr-chat-box.minimized .nsr-chat-input,
.nsr-chat-box.minimized .nsr-chat-footer,
.nsr-chat-box.minimized .quick-bar,
.nsr-chat-box.minimized .quick-menu {
  display: none !important;
}

/* when minimized, shrink box height so header sits nicely */
.nsr-chat-box.minimized { height: auto; width: 300px; }

/* accessible focus style */
.header-action:focus { outline: 2px solid rgba(255,255,255,0.22); outline-offset: 2px; }


/* Floating button */
#nsr-chat .nsr-chat-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8cff, #0060df);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    transition: all 0.25s ease;
}

#nsr-chat .nsr-chat-btn:hover {
    transform: scale(1.08);
}

/* Chat window box */
.nsr-chat-box {
    /*width: 350px;*/
    width: 380px;
    height: 480px;
    background: #fffffffa;
    backdrop-filter: blur(12px);
    border-radius: 20px;
    position: absolute;
    bottom: 80px;
    right: 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.4);
    animation: slideUp 0.35s ease forwards;
}

/* Animations */
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Header */
.nsr-chat-header {
    background: linear-gradient(135deg, #2e73ff, #0048c2);
    padding: 15px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.4px;
}

/* Conversation area */
.nsr-chat-conversation {
    height: 330px;
    overflow-y: auto;
    padding: 15px;
    background: #f6f8ff;
}

/* Scrollbar */
.nsr-chat-conversation::-webkit-scrollbar {
    width: 6px;
}
.nsr-chat-conversation::-webkit-scrollbar-thumb {
    background: #b3c6ff;
    border-radius: 15px;
}

/* Chat messages */
.chat-msg {
    padding: 10px 14px;
    border-radius: 15px;
    margin: 6px 0;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
}

.chat-msg.user {
    background: #0060df;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.chat-msg.bot {
    background: #e8edff;
    color: #1a1a1a;
    border-bottom-left-radius: 5px;
}

/* Input area */
.nsr-chat-input {
    padding: 10px 10px 5px 10px;
    display: flex;
    gap: 10px;
    background: #fff;
    border-top: 1px solid #e0e5ff;
}

.nsr-chat-input input {
    flex: 1;
    padding: 10px;
    background: #f2f4ff;
    border: 1px solid #c7d0ff;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
}

.nsr-chat-input button {
    padding: 10px 16px;
    background: #0060df;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
}

.nsr-chat-input button:hover {
    transform: scale(1.05);
}

/* Footer / Link */
.nsr-chat-footer {
    text-align: center;
    /*padding: 10px;*/
    background: #ffffff;
    font-size: 12px;
    border-top: 1px solid #e5e9ff;
}

.nsr-chat-footer a {
    color: #0060df;
    text-decoration: none;
    font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 500px) {
    .nsr-chat-box {
        width: 94vw;
        height: fit-content;
        right: 3%;
    }

    }
    
    .nsr-chat-input {

    width: -webkit-fill-available !important;
    margin-bottom: 0px !important;
}
.nsr-chat-input input {

    width: 50%;
}
}
@media (max-width: 400px) {
    
}