.ait-widget .ait-open-btn {
    cursor: pointer;
}

.ait-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ait-modal-inner {
    background: #fff;
    padding: 28px;
    border-radius: 14px;
    max-width: 480px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ait-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    z-index: 2;
}

.ait-status {
    margin: 14px 0;
    font-style: italic;
    color: #444;
}

/* Result step */

.ait-result-image-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

.ait-result-img {
    display: block;
    width: 100%;
    border-radius: 12px;
}

.ait-product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    padding: 4px;
    box-sizing: border-box;
}

.ait-product-badge-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ait-product-name {
    margin-top: 12px;
    font-weight: 600;
    font-size: 16px;
    color: #222;
}

.ait-result-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.ait-result-actions .button {
    flex: 1;
    text-align: center;
    justify-content: center;
    display: inline-flex;
    align-items: center;
}

.ait-retry-btn {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}

.ait-view-product-btn {
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #ddd !important;
}

/* History strip */

.ait-history {
    margin-top: 22px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.ait-history-title {
    font-size: 13px;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 10px;
}

.ait-history-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.ait-history-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color 0.15s ease;
}

.ait-history-thumb:hover {
    border-color: #111;
}
