/* ── Image to Amazon v2 — Styles ──────────────────────────────────── */

.ita-wrapper {
    max-width: 680px;
    margin: 28px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* Drop zone */
.ita-drop-zone {
    border: 2px dashed #d0d0d0;
    border-radius: 14px;
    background: #fafafa;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 24px;
    cursor: pointer;
    position: relative;
    transition: border-color .2s, background .2s;
}
.ita-drop-zone:hover,
.ita-drop-zone.ita-drag-over {
    border-color: #FF9900;
    background: #fffbf2;
}
.ita-drop-zone.ita-has-image {
    border-color: #ccc;
    padding: 20px;
    cursor: default;
    background: #fff;
}
.ita-file-input {
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer;
    width: 100%; height: 100%; z-index: 2;
}
.ita-upload-prompt { pointer-events: none; }
.ita-up-icon { font-size: 3em; display: block; margin-bottom: 10px; }
.ita-upload-prompt p { color: #666; font-size: .9em; margin: 4px 0; }
.ita-browse {
    color: #e47911; text-decoration: underline;
    cursor: pointer; pointer-events: all;
}
.ita-hint { font-size: .78em !important; color: #aaa !important; }

/* Canvas wrap */
.ita-canvas-wrap {
    position: relative;
    display: inline-block;
}
.ita-canvas {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    display: block;
    box-shadow: 0 2px 16px rgba(0,0,0,.1);
}
.ita-remove-btn {
    position: absolute; top: -10px; right: -10px;
    background: #e53935; color: #fff;
    border: none; border-radius: 50%;
    width: 28px; height: 28px;
    font-size: 13px; cursor: pointer;
    z-index: 10; line-height: 28px;
    text-align: center; padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.ita-remove-btn:hover { background: #b71c1c; }

/* Detect button */
.ita-detect-btn {
    display: block; width: 100%;
    margin-top: 16px; padding: 14px;
    background: linear-gradient(135deg, #FF9900, #e47911);
    color: #fff; font-size: 1em; font-weight: 700;
    border: none; border-radius: 10px;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    letter-spacing: .2px;
}
.ita-detect-btn:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.ita-detect-btn:disabled { background: #ddd; color: #999; cursor: not-allowed; transform: none; }

/* Progress */
.ita-status-wrap { margin-top: 14px; }
.ita-progress-bar {
    height: 5px; background: #eee;
    border-radius: 99px; overflow: hidden;
}
.ita-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF9900, #ffcc55);
    border-radius: 99px;
    width: 0%;
    transition: width .4s ease;
}
.ita-status-text {
    font-size: .82em; color: #888;
    margin-top: 8px; text-align: center;
}

/* Results */
.ita-results { margin-top: 24px; }

.ita-results-header {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.ita-results-title {
    font-size: 1em; font-weight: 700;
    color: #111;
}
.ita-item-count {
    font-size: .78em; color: #888;
    background: #f2f2f2;
    padding: 3px 10px; border-radius: 20px;
}

/* Detected items chips */
.ita-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 20px;
}
.ita-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff3e0; border: 1px solid #ffe0b2;
    color: #e65100; border-radius: 20px;
    padding: 5px 12px; font-size: .82em; font-weight: 500;
    cursor: pointer; transition: background .15s;
    user-select: none;
}
.ita-chip:hover { background: #ffe0b2; }
.ita-chip.ita-chip-off {
    background: #f5f5f5; border-color: #ddd;
    color: #aaa; text-decoration: line-through;
}
.ita-chip-dot {
    width: 7px; height: 7px;
    background: #FF9900; border-radius: 50%;
    flex-shrink: 0;
}
.ita-chip.ita-chip-off .ita-chip-dot { background: #ccc; }

.ita-chips-note {
    font-size: .78em; color: #aaa;
    margin-bottom: 16px;
}

/* Product grid */
.ita-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    list-style: none; margin: 0; padding: 0;
}
.ita-product-card {
    border: 1px solid #e8e8e8;
    border-radius: 10px; padding: 14px 16px;
    background: #fff;
    transition: box-shadow .2s, transform .15s, border-color .2s;
}
.ita-product-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    transform: translateY(-2px);
    border-color: #FF9900;
}
.ita-product-card a {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: #111;
    font-size: .85em; font-weight: 500;
}
.ita-product-card a:hover { color: #e47911; }
.ita-amazon-logo {
    font-size: 1.3em; flex-shrink: 0;
}
.ita-confidence {
    font-size: .7em; color: #bbb;
    display: block; margin-top: 2px;
    font-weight: 400;
}

.ita-no-results {
    text-align: center; padding: 24px;
    color: #999; font-size: .9em;
    background: #fafafa; border-radius: 10px;
    border: 1px dashed #ddd;
}

.ita-disclaimer {
    margin-top: 14px; font-size: .73em;
    color: #bbb; text-align: center;
}

/* Scan again */
.ita-scan-again {
    margin-top: 18px; display: block; width: 100%;
    padding: 10px; background: #fff;
    border: 1px solid #ddd; border-radius: 8px;
    color: #666; font-size: .85em; cursor: pointer;
    transition: border-color .2s, color .2s;
}
.ita-scan-again:hover { border-color: #FF9900; color: #e47911; }
