/**
 * Infineural AI Bot - Frontend Stylesheet
 */

/* Main container for the bot app */
.iab-solver-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 2rem auto;
    text-align: center;
    border: 1px solid #e2e8f0;
}

/* Title styling using CSS variable */
.iab-title {
    font-family: inherit;
    font-weight: 700;
    color: var(--iab-primary-color, #0A3161);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Description text styling */
.iab-description {
    color: #4A4A4A;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Wrapper for the input field and button */
.iab-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .iab-input-wrapper {
        flex-direction: row;
    }
}

/* Input field styling */
.iab-input {
    flex-grow: 1;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: box-shadow 0.3s, border-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.iab-input:focus {
    border-color: var(--iab-primary-color, #0A3161);
    box-shadow: 0 0 0 3px rgba(10, 49, 97, 0.2);
    outline: none;
}

/* Button styling using CSS variable */
.iab-button {
    background-color: var(--iab-secondary-color, #BF0A30);
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    white-space: nowrap;
}

.iab-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Container for the AI's response */
.iab-response-container {
    margin-top: 1.5rem;
    text-align: left;
    background-color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    min-height: 100px;
}

/* The actual response content wrapper */
.iab-response {
    color: #374151;
    font-size: 1rem;
    line-height: 1.6;
    white-space: normal; /* Changed from pre-wrap to allow HTML flow */
}

/* Styling for HTML elements inside the response */
.iab-response h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--iab-primary-color, #0A3161);
    margin-bottom: 1rem;
}

.iab-response h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--iab-primary-color, #0A3161);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.iab-response p {
    margin-bottom: 1rem;
}

.iab-response ul, .iab-response ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-type: disc;
}

.iab-response li {
    margin-bottom: 0.5rem;
}

.iab-response a {
    color: var(--iab-secondary-color, #BF0A30);
    font-weight: bold;
    text-decoration: underline;
}

.iab-response a:hover {
    text-decoration: none;
}

.iab-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    color: var(--iab-primary-color, #0A3161);
    font-size: 1.1rem;
}

.iab-spinner {
    border: 4px solid rgba(10, 49, 97, 0.2);
    border-left-color: var(--iab-primary-color, #0A3161);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: iab-spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes iab-spin {
    to {
        transform: rotate(360deg);
    }
}
