/* Device compatibility checker widget (shared by /tools/device-compatibility and /faq).
   Device knowledge lives in /js/device-rules.js; this file only styles the widget. */

.device-checker {
    max-width: 600px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.device-checker .search-box {
    position: relative;
}

#device-search {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-line);
    border-radius: 2px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#device-search:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: 2px;
    margin-top: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 10;
    text-align: left;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--color-line);
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--color-primary-tint);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .compat-badge {
    margin-left: 0.4rem;
    vertical-align: middle;
}

.search-result-brand {
    color: var(--color-slate);
}

.search-result-empty {
    cursor: default;
    color: var(--color-slate);
    line-height: 1.5;
}

.compatibility-result {
    max-width: 800px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.result-content {
    background: var(--color-surface);
    border: 2px solid var(--color-line);
    border-radius: 2px;
    padding: 1.5rem;
    text-align: left;
}

.result-head {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.result-head h2 {
    margin-bottom: 0.5rem;
}

.result-meta {
    background: var(--color-surface-dim);
    padding: 1.25rem 1.5rem;
    border-radius: 2px;
    margin-bottom: 1.25rem;
}

.result-meta p {
    margin: 0;
    color: var(--color-slate);
}

.result-meta p + p {
    margin-top: 0.5rem;
}

.result-callout {
    padding: 1rem;
    border-radius: 2px;
    margin-bottom: 1rem;
}

.result-callout p {
    margin: 0;
}

.result-ok {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result-bad {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.result-content h3 {
    margin: 1.5rem 0 0.75rem;
}

.result-content ol,
.result-content ul {
    color: var(--color-slate);
    line-height: 1.8;
    padding-left: 1.25rem;
}

.result-cta {
    text-align: center;
    margin-top: 2rem;
}

.compat-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 600;
}

.compat-badge.yes {
    background: #d4edda;
    color: #155724;
}

.compat-badge.no {
    background: #f8d7da;
    color: #721c24;
}
