/* Public-facing styling for AAI Query Box */

/* Container wrapper */
.ai-query-app {
    max-width: 600px;
    margin: 2em auto;
    font-family: Arial, sans-serif;
  }
  
  /* Question input */
  #aaiqp-question {
    width: 100%;
    padding: 0.75em 1em;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }
  
  /* Button group centering */
  .aaiqp-button-group {
    text-align: center;
    margin-top: 1em;
  }
  
  /* Buttons */
  .aaiqp-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.6em 1.2em;
    margin: 0 0.5em;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  .aaiqp-btn:hover,
  .aaiqp-btn:focus {
    background: #005177;
  }
  .aaiqp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  /* Result container and feedback (white framed boxes) */
.ai-result-frame {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5em;
    margin-top: 1.5em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Result container starts hidden */
.aaiqp-result-container {
    display: none;
    margin-top: 1.5em;
}

/* Loading animation */
.ai-loading {
    text-align: center;
    font-size: 1.1em;
    color: #666;
    padding: 2em;
    font-style: italic;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

  /* Show container when it has content */
  .aaiqp-result-container:not(:empty) {
    display: block;
  }
  
  /* Loading state messages */
  .ai-query-app .loading-state {
    font-style: italic;
    color: #555;
  }
  
  /* Summary text */
  .ai-summary {
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 1em;
  }
  
  /* Reference list */
  .ai-references {
    list-style-type: none;
    padding-left: 0;
  }
  .ai-references li {
    margin-bottom: 0.5em;
  }
  .ai-references li a {
    color: #0073aa;
    text-decoration: underline;
  }
  .ai-references li a:hover {
    color: #005177;
  }

  /* Instructions box */
  .aaiqp-instructions {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5em;
    margin-top: 1.5em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  /* Hide instructions when results are shown */
  .aaiqp-result-container:not(:empty) + .aaiqp-instructions {
    display: none;
  }

  .aaiqp-instructions p {
    margin: 0 0 1em 0;
    line-height: 1.5;
    color: #333;
  }

  .aaiqp-instructions p:last-child {
    margin-bottom: 0;
  }