* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
}
html {
    font-size: 15px;
    height: 100%;
    width: 100%;
}

body {
    font-family: 'poppins', arial, serif;
    font-size: 15px;
    line-height: 1.6em;
    min-width: 300px;
    background-color: #fff;
    color: rgb(92, 110, 126); 
    margin: 0;
    /*
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-wrap: nowrap;
    flex-direction: column;*/
}
a {
    color: #f08e57;
    font-weight: 400;
    text-decoration: none;
}
a:hover {
    color: #ffaa68;
    text-decoration: none;
}

.container {
    max-width: 600px;
    margin: 20px auto; /* horizontally center the container */
    padding: 0 20px;
}

label {
    background-color: #f5f5f5;
    border-color: #c5c5c5;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    color: #414141;
    margin: 0 0 5px 0;
    padding: 10px 15px 10px 12px;
    width: 100%;
}
input[type="text"] {
    background: none;
    border: none;
    display: block;
    width: 100%;
    font-size: 16px;
}

#question {
    font-size: 16px;
}

.FormSubmitButton {
    background-color: #48759a;
    border-color: #000000;
    border-radius: 0.3076rem 0.3076rem 0.3076rem 0.3076rem;
    border-style: none;
    border-width: 1px 1px 1px 1px;
    color: #f5f5f5;
    font-family: 'montserrat', arial, serif;
    font-size: 16px;
    margin: 0 0 0 0;
    padding: 10px 15px 10px 15px;
}
.FormSubmitButton.active,
.FormSubmitButton:hover {
    background-color: #3a5e7b;
    cursor: pointer;
}
.FormSubmitButton.disabled {
    background-color: #999;
}

#answer {
    color: rgb(92, 110, 126);
    line-height: 1.6;
    font-size: 16px;
    text-align: left;
    padding: 20px 10px;
    display: none;
}
#answer p {
    margin: revert;
}
#answer hr {
    background: rgba(0,0,0,0.2);
    height: 1px;
}
#disclaimer {
    width: 80%;
    margin: 20px auto;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.blur {
    -webkit-filter: blur(5px); 
    -moz-filter: blur(5px);
    -o-filter: blur(5px);
    -ms-filter: blur(5px); 
    filter: url(#blur); 
    filter: blur(5px);   
    filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='3') grayscale(100%);
}

.centerit {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    padding: 10px 15px; /* Give some top padding so it's not cramped */
    margin: 0;
}

#loader {
    display: none;
    position: fixed; 
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

#loader div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 51px;
    height: 51px;
    margin: 6px;
    border: 6px solid rgb(92, 110, 126);
    border-radius: 50%;
    animation: loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: rgb(92, 110, 126) transparent transparent transparent;
}

#loader div:nth-child(1) {
    animation-delay: -0.45s;
}

#loader div:nth-child(2) {
    animation-delay: -0.3s;
}

#loader div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes loader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Container to center Q&A */
.qa-container {
  margin: 0px auto;
  padding: 20px;
  background: #f8f9fa; 
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: none; /* hidden until we get an answer */
  max-width: 400px; 
  transition: max-width 0.3s ease;
}

.qa-container.expanded {
  max-width: 90%; /* Make it wider if there's space */
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

/* Question styling */
.question {
  margin-bottom: 20px;
  font-weight: bold;
  color: #333;
  text-align: center;
}

/* Answer styling */
.answer {
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  color: #333;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
  line-height: 1.4em;
  font-size: 0.95em;
  transition: max-height 0.3s ease;
  position:relative;
}

.article-container {
    position: relative;
}

.article-container #expandToggle {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,255,255,0.8);
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1em;
    cursor: pointer;
    padding: 3px 6px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: background 0.2s;
    z-index: 1000;
}

.article-container #expandToggle:hover {
    background: #f0f0f0;
}

.qa-container.expanded .answer {
  max-height: none; /* Remove the scroll and let it fit content */
}

.answer ol, .answer ul, .answer li {
    margin: revert;
    padding: revert;
}

/* Custom scrollbar for the answer box */
.answer::-webkit-scrollbar {
  width: 5px;
}
.answer::-webkit-scrollbar-track {
  background: #f0f0f0;
}
.answer::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 5px;
}

#errorContainer {
    color: red;
    margin: 10px 0;
    text-align: center;
}

#ratingAnswerContainer {
    color: green;
    margin: 10px 0;
    text-align: center;
}

#ratingContainer {
    display: none;
    margin-top: 20px;
    text-align: center;
    font-size: 1.5em;
    cursor: pointer;
    user-select: none;
}

.star {
    display: inline-block;
    color: #ccc;
    transition: color 0.2s;
    font-size: 2em;
    margin-right: 0.1em;
}

.star.hovered,
.star.selected {
    color: #f0ad4e; /* highlight color */
}
