/* Acceptatiegids Zoeker - frontend styles */

.hz-search {
    max-width: 900px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hz-search__form {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.5rem;
    transition: border-color 0.15s ease;
}

.hz-search__form:focus-within {
    border-color: #2563eb;
}

.hz-search__input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    resize: none;
    background: transparent;
    font-family: inherit;
    line-height: 1.5;
    color: #111827;
}

.hz-search__input::placeholder {
    color: #9ca3af;
}

.hz-search__button {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    align-self: stretch;
    min-width: 100px;
}

.hz-search__button:hover:not(:disabled) {
    background: #1d4ed8;
}

.hz-search__button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.hz-search__status {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.9rem;
}

.hz-search__status--error {
    background: #fef2f2;
    color: #991b1b;
}

.hz-search__results {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hz-result {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    transition: box-shadow 0.15s ease;
}

.hz-result:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hz-result__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.75rem;
}

.hz-result__lender {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
}

.hz-result__status {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
}

.hz-result__status--loading::before {
    content: "⏳";
    margin-right: 0.25rem;
}

.hz-result__status--found {
    color: #059669;
}

.hz-result__status--not-found {
    color: #9ca3af;
}

.hz-result__status--error {
    color: #dc2626;
}

.hz-result__answer {
    color: #374151;
    line-height: 1.6;
    font-size: 0.95rem;
    white-space: pre-wrap;
}

.hz-result__answer--loading {
    color: #9ca3af;
    font-style: italic;
}

.hz-result__answer--not-found {
    color: #6b7280;
    font-style: italic;
}

.hz-result__pages {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e5e7eb;
    font-size: 0.85rem;
    color: #6b7280;
}

.hz-result__pages strong {
    color: #374151;
    font-weight: 600;
    margin-right: 0.5rem;
}

.hz-result__page-link {
    display: inline-block;
    margin-right: 0.4rem;
    padding: 2px 8px;
    background: #eff6ff;
    color: #1e40af;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
}

.hz-result__page-link:hover {
    background: #dbeafe;
    text-decoration: none;
}

.hz-search__loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: hz-spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes hz-spin {
    to { transform: rotate(360deg); }
}

/* Mobile */
@media (max-width: 640px) {
    .hz-search__form {
        flex-direction: column;
    }
    .hz-search__button {
        width: 100%;
        padding: 0.75rem;
    }
    .hz-result {
        padding: 1rem;
    }
}
