/* Mr Pellets AI-assistent — Fas 1. Ljus stil, namnrymd .mrpai-*,
   ska samexistera med Classic-temat utan att skriva över dess regler. */

.mrpai-widget {
    width: 100%;
    margin: 0 0 1rem 0;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
}

.mrpai-head {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.6rem;
}

.mrpai-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #232323;
}

.mrpai-subtitle {
    font-size: 0.85rem;
    color: #6f6f6f;
}

.mrpai-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.mrpai-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid #b6b6b6;
    border-radius: 3px;
    font-size: 0.95rem;
    background: #fff;
}

.mrpai-input:focus {
    outline: 2px solid #2fb5d2;
    outline-offset: -1px;
}

.mrpai-btn {
    flex: 0 0 auto;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: 3px;
    background: #2fb5d2;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
}

.mrpai-btn:hover { background: #2599b3; }
.mrpai-btn:disabled { opacity: 0.6; cursor: default; }

.mrpai-mode {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: #878787;
}

.mrpai-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.mrpai-results:empty { display: none; }

.mrpai-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 3px;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.mrpai-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.mrpai-img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.mrpai-body {
    padding: 0.5rem 0.65rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mrpai-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #232323;
    line-height: 1.25;
}

.mrpai-ref {
    font-size: 0.72rem;
    color: #878787;
    letter-spacing: 0.02em;
}

.mrpai-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #232323;
}

.mrpai-price-unverified {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9a6b00;
}

.mrpai-stock {
    align-self: flex-start;
    font-size: 0.72rem;
    padding: 0.12rem 0.45rem;
    border-radius: 10px;
    font-weight: 600;
}

.mrpai-stock-in_stock { background: #e6f6e9; color: #1c7c3c; }
.mrpai-stock-few_left { background: #fdf3dc; color: #9a6b00; }
.mrpai-stock-out_of_stock { background: #f3f3f3; color: #6f6f6f; }

.mrpai-more-wrap {
    text-align: center;
    margin-top: 0.75rem;
}

.mrpai-more {
    padding: 0.45rem 1.2rem;
    border: 1px solid #2fb5d2;
    border-radius: 3px;
    background: transparent;
    color: #2599b3;
    font-size: 0.9rem;
    cursor: pointer;
}

.mrpai-more:hover { background: #e9f8fb; }

.mrpai-notice {
    grid-column: 1 / -1;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    color: #6f6f6f;
    background: #fafafa;
    border: 1px dashed #d8d8d8;
    border-radius: 3px;
}

.mrpai-error { color: #b02a2a; border-color: #e7bcbc; background: #fdf3f3; }

.mrpai-disclaimer {
    margin: 0.9rem 0 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #878787;
}

.mrpai-remote-test { border-top: 1px solid #e3e3e3; margin-top: 1rem; padding-top: 1rem; }
.mrpai-remote-test button { font-size: .9rem; }
.mrpai-remote-test .mrpai-results { max-width: 280px; }

/* Read-only imported product preview: no outbound navigation or checkout. */
.mrpai-remote-card { cursor: default; }
.mrpai-remote-card:hover { box-shadow: none; }
.mrpai-details-btn {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid #268157;
    border-radius: 4px;
    color: #17573a;
    background: #f2f8f3;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}
.mrpai-details-btn:hover { background: #e7f2e8; }
.mrpai-preview-details[hidden] { display: none !important; }
.mrpai-preview-note { font-size: 0.75rem; line-height: 1.4; color: #5c6860; margin: 0.35rem 0 0; }

/* Remote own-catalog previews are intentionally not links or purchasable. */
.mrpai-card:not(a) { cursor: default; }
.mrpai-card:not(a):hover { box-shadow: none; }
.mrpai-card .mrpai-preview-note { font-size: .72rem; margin-top: .35rem; }
