/* FindingWalt Research Search — search.css */

.fws-container {
    max-width: 780px;
    margin: 2em auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
}

/* ── Header ── */
.fws-header {
    text-align: center;
    margin-bottom: 1.5em;
}
.fws-icon {
    font-size: 2.5em;
    display: block;
    margin-bottom: 0.2em;
}
.fws-header h3 {
    margin: 0 0 0.25em;
    font-size: 1.5em;
    color: #1a1a2e;
}
.fws-subtitle {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

/* ── Form ── */
.fws-form {
    margin-bottom: 1.5em;
}
.fws-input-row {
    display: flex;
    gap: 0.5em;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}
.fws-input-row input[type="text"] {
    flex: 1;
    padding: 0.85em 1.1em;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}
.fws-input-row input[type="text"]:focus {
    border-color: #2563eb;
}
.fws-input-row button {
    padding: 0.85em 1.6em;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.fws-input-row button:hover:not(:disabled) {
    background: #1d4ed8;
}
.fws-input-row button:disabled {
    background: #93c5fd;
    cursor: wait;
}

/* ── Results ── */
.fws-results {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.fws-answer {
    padding: 1.4em 1.6em;
    background: #fff;
    line-height: 1.75;
    font-size: 0.97em;
}
.fws-answer p      { margin: 0 0 0.9em; }
.fws-answer p:last-child { margin-bottom: 0; }
.fws-answer strong { color: #1a1a2e; }
.fws-answer em     { color: #444; }

/* ── Sources ── */
.fws-sources {
    padding: 0.8em 1.6em;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    font-size: 0.82em;
    color: #64748b;
}
.fws-sources strong {
    color: #374151;
}
.fws-sources ul {
    margin: 0.3em 0 0;
    padding-left: 1.2em;
}
.fws-sources li {
    margin-bottom: 0.15em;
}

/* ── Loading state ── */
.fws-loading-indicator {
    padding: 2em;
    text-align: center;
    color: #6b7280;
    font-size: 0.95em;
}
.fws-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: fws-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 0.5em;
}
@keyframes fws-spin {
    to { transform: rotate(360deg); }
}

/* ── Error ── */
.fws-error {
    padding: 1em 1.4em;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 0.93em;
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .fws-input-row { flex-direction: column; border-radius: 8px; }
    .fws-input-row input[type="text"] {
        border-right: 2px solid #e0e0e0;
        border-bottom: none;
        border-radius: 8px 8px 0 0;
    }
    .fws-input-row button {
        border-radius: 0 0 8px 8px;
    }
}
