html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/*#aiolo-content-container {
  position: relative; /* Enables absolute/fixed children to be scoped here */
/*  width: 80%; /* Matches your main content width */
/*  margin-left: auto;
  margin-right: auto;
}*/

#aiolo-content-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px; /* Optional: add horizontal breathing room */
  box-sizing: border-box;
}


#aiolo-chat-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  max-width: 800px;
  margin: 0 auto;
  overflow: visible !important;
  width: 100%;
  position: relative;
  z-index: 1 !important;
}



#aiolo-chat-output {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  padding: 20px;
  box-sizing: border-box;
  margin-bottom: 160px;
  overflow: visible !important;
  width: 100% !important;
  max-width: 775px !important;
  margin: 0 auto;
  }

.aiolo-msg.ai-msg {
  overflow-y: visible !important;
  overflow-x: visible !important;
  max-height: none !important;
}


#aiolo-chat-form {
  position: static;
  bottom: 0;
  left: 50%; /* Sidebar is 20% width */
  width: 100%; /* Match the main content */
  max-width: 775px;
  background: transparent; /* ✅ instead of white */
  border: none;            /* ✅ just in case */
  box-shadow: none;        /* ✅ if anything is causing ghosting */
  padding: 15px 0;
  border-top: 0px solid #ddd;
  z-index: 999;
  display: flex;
  justify-content: center;
  

}

#aiolo-chat-form.aiolo-fixed-mode {
  position: fixed; /* ← THIS is the missing key */
  bottom: 0;
  left: 32.25%;
  width: 100%;
  max-width: 775px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 15px 0;
  z-index: 999;
  display: flex;
  justify-content: center;
    }


#aiolo-chat-form .aiolo-input-wrapper {
  width: 100%;
  max-width: 775px;
  padding: 0 20px;
  z-index: 999;
}

.aiolo-icons-left {
  display: flex;
  gap: 10px;
  margin-left: 15px; /* ✅ Left padding inside input wrapper */
}

#aiolo-submit {
  margin-right: 15px; /* ✅ Right padding for send icon */
  width: 40px !important;
}



#aiolo-chat-input {
  width: 100%;
  height: 100px;
  padding: 10px 80px 50px 20px;
  font-size: 16px;
  border: none;
  border-radius: 25px;
  background-color: #ffffff;
  box-shadow: 0 0 12px rgba(114, 41, 238, 0.2);
  outline: none;
  transition: box-shadow 0.2s ease-in-out;
  text-align: left;
  line-height: 1.4;
  resize: none;
}
#aiolo-chat-input::placeholder {
  color: #666;
  font-size: 15px;
  text-align: left;
}
#aiolo-chat-input:focus {
  box-shadow: 0 0 18px rgba(114, 41, 238, 0.4);
}

.aiolo-msg {
  width: fit-content;
  max-width: 90%;
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.5;
  word-break: normal;
  overflow-wrap: break-word;
  hypens: auto;
  transition: all 0.3s ease;
overflow: visible !important;  /* ✅ Remove internal scroll */
  max-height: none !important;   /* ✅ Prevent cutting off */
  }


.user-msg {
  background: #f0f0f0;
  color: #000;
  padding: 12px 16px;
  border-radius: 16px;
  margin: 10px 0;
  max-width: 70%;
  align-self: flex-end !important;  /* ✅ force right-align */
  text-align: left;
}

.ai-msg.lifted {
  margin-bottom: 140px !important;
}

.ai-msg {
  background: #fff;
  align-self: flex-start !important;
  text-align: left;
  color: #222;
  border-bottom-left-radius: 0;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
  word-wrap: break-word;
  white-space: normal;
  overflow-x: hidden !important;   /* ✅ Prevent horizontal scroll */
  overflow-y: visible !important;  /* ✅ Allow vertical growth */
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  flex-grow: 1 !important;
  max-height: none !important;
}



 
 .aiolo-msg.last-visible {
  margin-bottom: 20px; /* adjust as needed to clear the input box height */
}




.ai-msg table {
  width: 100% !important;
  max-width: none !important;
  overflow-x: auto;
}


.aiolo-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.aiolo-results-table {
  width: 100% !important;
  max-width: none !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  margin-top: 10px !important;
  /* 🔥 DO NOT USE display: block */
}

/* REMOVE any display:block! from thead */
.aiolo-results-table thead,
.aiolo-results-table tbody {
  display: table-header-group;  /* restore native behavior */
  width: 100% !important;
}

.aiolo-results-table tr {
  display: table-row;
}

.aiolo-results-table th,
.aiolo-results-table td {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
  
}

.aiolo-results-table td:last-child {
  text-align: center;
}

.aiolo-scan-table {
  table-layout: fixed;
  width: 100%;
}

/* Column 1: Page (50%) */
.aiolo-scan-table th:nth-child(1),
.aiolo-scan-table td:nth-child(1) {
  width: 50%;
  max-width: 50%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aiolo-scan-table td:nth-child(1) a {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Column 2: Grade (10%) */
.aiolo-scan-table th:nth-child(2),
.aiolo-scan-table td:nth-child(2) {
  width: 10%;
  text-align: center;
  vertical-align: middle;
}

/* Column 3: Analyze Status (20%) */
.aiolo-scan-table th:nth-child(3),
.aiolo-scan-table td:nth-child(3) {
  width: 20%;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

/* Column 4: Submit Status (10%) */
.aiolo-scan-table th:nth-child(4),
.aiolo-scan-table td:nth-child(4) {
  width: 10%;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

/* Column 5: Details (10%) */
.aiolo-scan-table th:nth-child(5),
.aiolo-scan-table td:nth-child(5) {
  width: 10%;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.aiolo-scan-results-block {
  background: #fff;
  padding: 10px;
  margin: 10px 0;
  border-radius: 8px;
  width: 100% !important;
  max-width: 1200px!important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.aiolo-scan-intro {
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 500;
}


.aiolo-td-subcat {
  min-width: 200px;
}

.aiolo-loading {
  display: inline-block;
  font-size: 18px;
  animation: blink 1s ease-in-out infinite;
  margin: 10px;
  line-height: 1;
  vertical-align: middle;
}
@keyframes blink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

.aiolo-premium-blurred {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: none;
  padding: 0;
  font-size: 15px;
  min-height: 400px !important;
}

.aiolo-blur-content {
  filter: blur(2px);           /* ← we’ll tweak this in step 2 */
  user-select: none;
  pointer-events: none;
  color: #444;
  line-height: 1.1;
  text-align: left;            /* ✅ Force left alignment */
  padding: 16px; 
  min-height: 250px;/* Optional: consistent padding */
}


.aiolo-blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 16px 10px;
  background: rgba(255, 255, 255, 0.8);
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 450px;
}

.aiolo-blur-overlay strong {
  font-size: 16px;
  margin-bottom: 4px;
}

.aiolo-blur-overlay span {
  font-weight: 500;
  margin-bottom: 10px; /* ✅ Tighter space under price */
  font-size: 14px;
}

.aiolo-benefits {
  text-align: left;
  margin-bottom: 12px;
  line-height: 1.5;
}

.aiolo-upgrade-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #6a0dad;   /* ✅ Aiolo Purple */
  color: #fff !important;                 /* ✅ White text */
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: background-color 0.2s ease-in-out;
}

.aiolo-upgrade-btn:hover {
  background-color: #00e6d8;   /* ✅ Aiolo Aqua */
  color: #fff !important; 
 }


.aiolo-results-table td.aiolo-premium-blurred {
  position: relative;
  vertical-align: top;
}

#aiolo-prompt-buttons .aiolo-prompt-btn {
  display: inline-flex !important; /* ✅ Inline behavior inside flex parent */
  width: auto !important;;     /* ✅ Prevents full-width stacking */
  max-width: 100% !important;
  white-space: nowrap !important;  /* ✅ Keeps icons and text on one line */
  flex-shrink: 0 !important;;

  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 999px;
  background-color: transparent;
  color: #333;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  gap: 6px;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}


#aiolo-prompt-buttons .aiolo-prompt-btn:hover {
  border-color: #999;
  color: #6a0dad;
  box-shadow: 0 2px 6px rgba(114, 41, 238, 0.15);
}

.tooltip-icon {
  width: 17px;
  height: 17px;
  margin-left: 0px;
  margin-bottom: 2px;
  vertical-align: middle;
}

.aiolo-tooltip {
  position: relative;
  display: inline-block;
}

.aiolo-tooltip .tooltip-text {
  visibility: hidden;
  width: 300px;
  background-color: #f0f0f0;
  color: #000;
  text-align: left;
  border-radius: 6px;
  padding: 8px 10px;
  position: absolute;
  z-index: 10;
  top: 20%;
  left: 130%; /* Push to the right of the icon */
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
}

.aiolo-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.ai-msg p {
  margin: 10px 0;
  line-height: 1.6;
}

.ai-msg br {
  line-height: 1.4;
}

.ai-msg strong {
  font-weight: 600;
}

.ai-msg ul,
.ai-msg ol {
  padding-left: 20px;
  margin: 10px 0;
}

.ai-msg li {
  margin-bottom: 6px;
}

#aiolo-chat-output .aiolo-scan-results-block {
  width: 100vw !important;
  max-width: 900px !important;
  margin-left: auto !important;
  margin-right: auto!important;
  padding: 30px 10px;
  background: #fff;
  border-radius: 10px;
  box-sizing: border-box;
}

@media screen and (max-width: 768px) {
  #aiolo-chat-wrapper,
  #aiolo-chat-output,
  #aiolo-chat-form {
    padding-left: 10px !important;
    padding-right: 10px !important;
    width: 100% !important;
  }

  #aiolo-chat-input {
    height: 80px;
    font-size: 15px;
    padding: 10px 60px 40px 16px;
  }

  .aiolo-msg {
    font-size: 15px;
    padding: 10px 14px;
  }

  .user-msg,
  .ai-msg {
    max-width: 90% !important;
    width: auto !important;
  }

  .ai-msg {
    padding-right: 10px;
  }

  #aiolo-submit {
    right: 10px !important;
  }
}
@media screen and (max-width: 768px) {
  .aiolo-scan-table,
  .aiolo-scan-table thead,
  .aiolo-scan-table tbody,
  .aiolo-scan-table tr {
    display: block !important;
    width: 100% !important;
  }

  .aiolo-scan-table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
  }

  .aiolo-scan-table th {
    display: none !important; /* hide table headers */
  }

  .aiolo-scan-table td {
    display: flex !important;
    justify-content: space-between;
    padding: 6px 8px;
    font-size: 14px;
    border: none !important;
    border-bottom: 1px solid #eee;
  }

  .aiolo-scan-table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #444;
  }

  .aiolo-scan-table td:last-child {
    border-bottom: none;
  }
}


@media screen and (max-width: 768px) {
  /* ❌ Remove padding from all outer containers */
  #aiolo-content-container,
  #aiolo-chat-wrapper,
  #aiolo-chat-output,
  #aiolo-chat-form,
  #aiolo-chat-input {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  /* ✅ Apply padding only to the final message bubble */
  .aiolo-msg.ai-msg.last-visible {
    padding-left: 10px !important;
    padding-right: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Optional: input tweaks */
  #aiolo-chat-input {
    height: 80px;
    font-size: 15px;
    padding: 10px 60px 40px 16px;
    box-sizing: border-box;
  }
}
@media screen and (max-width: 768px) {
  /* ❌ Remove margins/padding from wrappers */
  #aiolo-chat-form,
  .aiolo-input-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  /* ✅ Add spacing only to the actual input field */
  #aiolo-chat-input {
    width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box;
  }
}
@media screen and (max-width: 768px) {
  #aiolo-chat-form.aiolo-fixed-mode {
    left: 0 !important;
    width: 100% !important;
    max-width: 90% !important;
    padding: 0 !important;
    margin: 20px !important;
    box-sizing: border-box;
  }
}

.grade-cell {
  font-weight: bold;
  text-align: center;
  padding: 6px 10px;
}
.grade-a { color: #2ecc71; }      /* Green */
.grade-b { color: #f1c40f; }      /* Yellow */
.grade-c { color: #f39c12; }      /* Orange */
.grade-d { color: #e74c3c; }      /* Red */
.grade-f { color: #a83232; }      /* Dark Red */
.grade-na { color: #bdc3c7; }     /* Gray for missing */
.score-number {
  font-weight: normal;
  font-size: 0.85em;
  color: #555;
}

#submit-kb {
  width: 300px !important;
  background-color: #7c3aed; /* Aiolo Purple */
  color: white;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin: 25px auto; /* auto left & right centers it */
  display: block;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

#submit-kb:hover {
  background-color: #00e6d8; /* Aiolo Blue */
}

#submit-kb:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

