/**
 * AIEO Complementary Products
 *
 * Picker block emitted on the single-product page right above (or
 * below) the Add-to-cart button. Three rows by default, each with a
 * checkbox + thumbnail + name + price, then a single CTA button.
 */
.aieo-compl {
    margin: 16px 0;
    padding: 14px;
    border: var(--aieo-compl-border-w, 1px) solid var(--aieo-compl-border, #e2e2e2);
    border-radius: var(--aieo-compl-border-r, 8px);
    background: var(--aieo-compl-bg, #fafafa);
}
.aieo-compl-title {
    margin: 0 0 10px;
    font-size: var(--aieo-compl-title-size, 15px);
    font-weight: 600;
    color: #222;
}
.aieo-compl-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.aieo-compl-item {
    margin: 0;
    padding: 0;
}
.aieo-compl-item > label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.aieo-compl-item > label:hover {
    background: rgba(0, 0, 0, 0.03);
}
.aieo-compl-check {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}
.aieo-compl-thumb {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aieo-compl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.aieo-compl-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.aieo-compl-name {
    font-size: var(--aieo-compl-text-size, 14px);
    color: #222;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aieo-compl-price {
    font-size: calc(var(--aieo-compl-text-size, 14px) - 1px);
    color: #555;
    font-weight: 500;
}
.aieo-compl-add {
    margin-top: 12px;
    width: 100%;
    padding: 10px 14px;
    cursor: pointer;
    font-size: var(--aieo-compl-text-size, 14px);
    background: var(--aieo-compl-btn-bg, #222);
    color: var(--aieo-compl-btn-text, #fff);
    border: var(--aieo-compl-btn-border-w, 0) solid var(--aieo-compl-btn-border, #222);
    border-radius: var(--aieo-compl-btn-border-r, 4px);
    transition: filter 0.2s ease;
}
.aieo-compl-add:hover { filter: brightness(0.92); }
.aieo-compl-add[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}
.aieo-compl-status {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
    color: #2e7d32;
    min-height: 18px;
}
.aieo-compl-status.error {
    color: #c62828;
}

@media (max-width: 600px) {
    .aieo-compl { padding: 10px; }
    .aieo-compl-thumb { width: 40px; height: 40px; }
    .aieo-compl-name { font-size: 13px; }
    .aieo-compl-price { font-size: 12px; }
}

/* Inline variation dropdown for variable products */
.aieo-compl-variation {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #1f2937;
    max-width: 100%;
}
.aieo-compl-variation:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}
.aieo-compl-variation--error {
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.15);
}
.aieo-compl-novar {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
}

/* Visit-product link — sibling of <label> so its click doesn't toggle the checkbox.
   External-link arrow icon, opens product page in a new tab. */
.aieo-compl-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.aieo-compl-label {
    flex: 1 1 auto;
    min-width: 0;
}
.aieo-compl-visit {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    margin-top: 4px;
}
.aieo-compl-visit:hover {
    background: rgba(244, 103, 103, 0.1);
    color: #f46767;
}
.aieo-compl-visit:focus-visible {
    outline: 2px solid #f46767;
    outline-offset: 1px;
}
.aieo-compl-visit svg {
    display: block;
}
