body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;

    margin: 0;
    padding: 0;
    height: 100vh;

}


.chat-widget {
    /* width: 420px;
    height: 650px; */
    height: 100%;
    width: 100%;
    background: white;
    /* border-radius: 24px; */
    box-shadow: 0 25px 50px rgba(0, 49, 104, 0.15);
    /* border: 1px solid rgba(0, 49, 104, 0.1); */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* .chat-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #003168, #0066cc, #003168);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
} */

.header {
    padding: 24px 24px 20px;
    background: linear-gradient(135deg, #003168 0%, #004080 100%);
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
}

/* .header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-10px, -10px) rotate(10deg);
    }
} */

.header-content {
    position: relative;
    z-index: 2;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.avatar {
    /* width: 48px;
    height: 48px;
    background: white; */
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bot-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    margin-top: 0;
}

.bot-status {
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-indicator {
    width: 6px;
    height: 6px;
    background: #00d4aa;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.3;
    }
}

.messages-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: linear-gradient(to bottom, #fafbfc 0%, #f8fafc 100%);
}

.message-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    max-width: 85%;
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-msg {
    background: #003168;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 49, 104, 0.3);
    overflow-wrap: break-word;
    word-break: break-word;
}

.bot-msg {
    background: white;
    color: #1f2937;
    align-self: flex-start;
    border-bottom-left-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 85%;
}

.timestamp {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin: 16px 0;
}

.typing-animation {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: white;
    border-radius: 20px;
    border-bottom-left-radius: 8px;
    align-self: flex-start;
    max-width: fit-content; /* Allow dynamic width for messages */
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: Arial, sans-serif;
    font-size: 14px;
    animation: fadeIn 0.3s ease-in-out;
}

.typing-text {
    color: #003168;
    font-weight: 500;
    white-space: nowrap; /* Prevent line breaks while rotating messages */
    font-style: italic;
}

.dots-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Optional fade-in effect */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

.dot {
    width: 8px;
    height: 8px;
    background: #003168;
    border-radius: 50%;
    animation: wave 1.4s ease-in-out infinite;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes wave {

    0%,
    60%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.input-section {
    padding: 20px 24px 12px;
    background: white;
    border-top: 1px solid #f3f4f6;

    /* z-index:999; */



}

.p-banner-bottom{
    margin: 0;
    padding-top: 7px;
    font-size: smaller;
    text-align: center;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    padding: 4px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: #003168;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 49, 104, 0.1);
}

.text-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 10px;
    font-size: 15px;
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 120px;
    font-family: inherit;
}

.text-input::placeholder {
    color: #9ca3af;
}

.send-btn {
    width: 48px;
    height: 48px;
    background: #003168;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.send-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.send-btn:hover::before {
    transform: translateX(100%);
}

.send-btn:hover {
    background: #004080;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.quick-replies {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.quick-reply {
    background: white;
    border: 1px solid #003168;
    color: #003168;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reply:hover {
    background: #003168;
    color: white;
    transform: translateY(-2px);
}

.welcome-container {
    text-align: center;
    padding: 32px 16px;
    color: #6b7280;
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.welcome-text {
    font-size: 16px;
    margin-bottom: 8px;
    color: #374151;
}

.welcome-subtitle {
    font-size: 14px;
    color: #9ca3af;
}

/* Custom scrollbar */
.messages-area::-webkit-scrollbar {
    width: 4px;
}

.messages-area::-webkit-scrollbar-track {
    background: transparent;
}

.messages-area::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.messages-area::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    body {
        /* padding: 10px; */
    }

    .chat-widget {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .header {
        padding: 20px 20px 16px;
    }

    .messages-area {
        padding: 20px;
    }

    .input-section {
        padding: 16px 20px 12px;
    }
}

/* ------------------------------------------ */

.dashboard-container {
    /* max-width: 1200px; */
    margin: auto;
    font-size: smaller;
}

.card {
    background: white;
    padding: 5px 20px;
    margin: 10px 0;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(177px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.metric-card {
    background: #05366c;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.metric-value {
    font-size: 2em;
    font-weight: bold;
}

.metric-label {
    font-size: 1em;
    opacity: 0.9;
}

.table-container {
    overflow-x: auto;
}

/* Base table styling */
table {
    border-collapse: collapse;
    width: 100%;
    border: none !important;
}

/* Scrollable tbody */
tbody {
    display: block;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

/* Keep columns aligned */
thead, tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

/* Sticky row only if there’s no thead */
table:not(:has(thead)) tr:first-child {
    position: sticky;
    top: 0;
    background: #f9f9f9;
    z-index: 2;
}

th, td {
    padding: 5px;
    border: 1px solid #ddd;
    text-align: left;
}


.chart-container {
    height: 400px;
    position: relative;
}

.answer-content {
    line-height: 1.6;
    font-size: 1.1em;
    color: #333;
}


.theoff_btn{
    background-color: #003e7d;  
    padding: 10px 14px;       
    border-radius: 6px;       
    border: none;
    cursor: pointer;          
    color: white;           
    display: inline-flex;    
    align-items: center;
    justify-content: center;
    font-size: 20px;         
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.theoff_btn:hover {
    background-color: #02529a; 
    transform: scale(1.05);   
}

.theoff_btn:focus {
    outline: 2px solid #b3b2b1;
    outline-offset: 2px;
}



/* Offcanvas container */
.custom-offcanvas {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: #ffffff;
  box-shadow: 2px 0 8px rgba(0,0,0,0.3);
  transition: left 0.3s ease-in-out;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

/* Show state */
.custom-offcanvas.show {
  left: 0;
}

/* Header */
.offcanvas-header {
  padding: 15px;
  background: #003168;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  scrollbar-width: thin;
}

/* Body */
.offcanvas-body {
  padding: 1px 2px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Close button */
.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}

/* Overlay background */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 900;
  display: none;
}

.overlay.show {
  display: block;
}

/* Accordion styling */
.accordion-item {
  border-bottom: 1px solid #ddd;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: 12px 14px;
  background: #f5f5f5;
  text-align: left;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  position: relative;
  transition: background 0.3s ease;
}

/* Arrow using chevron SVG */
.accordion-header::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
  opacity: 0.8;

  /* Chevron SVG (dark grey, change color via fill if you want) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23000000' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Rotate downward when active */
.accordion-item.active .accordion-header::after {
  transform: translateY(-50%) rotate(180deg);
}


/* Hover effect */
.accordion-header:hover {
  background: #e9ecef;
}

/* Active header look */
.accordion-item.active .accordion-header {
  background: #e1e8f0;
}

/* Content area */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 10px;
  font-size: 14px;
}

.accordion-item.active .accordion-content {
  max-height: fit-content;
  padding: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.accordion-content .suggested-sub-quests{
    padding: 10px;
    border: 0.5px solid #d5cece;
    border-radius: 9px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color ease-in-out;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.accordion-content .suggested-sub-quests:hover{
    background-color: #d6e9fd;
}
.fav-star {
    font-size: 20px;
    color: #c5c5c5;
    transition: color 0.3s ease;
    z-index: 999;
}
.fav-star.fav {
    color: rgb(250, 133, 133);
    text-shadow: 0 0 4px #f5c518;
}