.go-ai-badge-wrap {
    max-width: 580px;
}

/* ---- Saved image row ---- */
.go-ai-badge-saved {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 10px;
    background: #f0f6fc;
    border: 1px solid #c3d9ed;
    border-radius: 4px;
}
.go-ai-badge-saved img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #dde3ea;
    flex-shrink: 0;
}
.go-ai-badge-saved span {
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

/* ---- Labels ---- */
.go-ai-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 4px;
}

/* ---- Prompt textarea ---- */
.go-ai-prompt {
    width: 100%;
    box-sizing: border-box;
}

/* ---- Style chips ---- */
.go-ai-styles {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}
.go-ai-style-option {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    background: #fff;
    user-select: none;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.go-ai-style-option:has(input:checked) {
    border-color: #2271b1;
    background: #e8f0fb;
    color: #2271b1;
    font-weight: 600;
}
.go-ai-style-option input[type="radio"] {
    display: none;
}

/* ---- Generate button ---- */
.go-ai-generate-btn {
    margin-top: 6px !important;
}

/* ---- Previews ---- */
.go-ai-badge-previews {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.go-ai-preview-current {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #2271b1;
    border-radius: 4px;
    background: #f0f6fc;
}
.go-ai-preview-current img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dde3ea;
    flex-shrink: 0;
    cursor: zoom-in;
    transition: opacity 0.15s;
}
.go-ai-preview-current img:hover {
    opacity: 0.85;
}
.go-ai-preview-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ---- History grid ---- */
.go-ai-preview-history {
    padding: 10px;
    border: 1px solid #dde3ea;
    border-radius: 4px;
    background: #fafafa;
}
.go-ai-history-label {
    display: block;
    font-size: 11px;
    color: #777;
    font-weight: 600;
    margin-bottom: 8px;
}
.go-ai-history-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.go-ai-history-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.go-ai-history-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dde3ea;
    cursor: zoom-in;
    transition: opacity 0.15s;
}
.go-ai-history-item img:hover {
    opacity: 0.85;
}

/* ---- Status line ---- */
.go-ai-status {
    margin-top: 8px;
    font-size: 12px;
    color: #555;
    min-height: 18px;
    line-height: 1.4;
}

/* ---- Style sample preview ---- */
.go-ai-sample {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}
.go-ai-sample-label {
    font-size: 12px;
    color: #555;
}
.go-ai-sample-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 6px;
    padding: 3px;
}

/* ---- Editable style prompt ---- */
.go-ai-style-prompt-wrap {
    margin: 8px 0;
}
.go-ai-style-prompt {
    width: 100%;
}
.go-ai-hint {
    font-weight: 400;
    font-size: 11px;
    color: #888;
}

/* ---- Custom prompt picker ---- */
.go-ai-custom-wrap {
    margin: 8px 0;
    padding: 10px;
    background: #f6f8fa;
    border: 1px solid #dde3ea;
    border-radius: 6px;
}
.go-ai-custom-select {
    width: 100%;
    max-width: 100%;
    margin-bottom: 6px;
}
.go-ai-custom-add {
    margin-top: 8px;
}
.go-ai-custom-title,
.go-ai-custom-prompt {
    width: 100%;
    margin-bottom: 6px;
}
.go-ai-custom-add-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Reference image picker — a quiet text link, not a button (it's optional) */
.go-ai-reference-add.button,
.go-ai-reference-add {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: normal !important;
    color: #6f7bd6 !important;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.88em;
}
.go-ai-reference-add:hover { color: #4a56b0 !important; }

/* Generate is a secondary (outlined) action so it reads differently from the
   solid primary "Save and Close" / "Use This Image" buttons. */
.go-ai-generate-btn.button,
.go-ai-generate-btn {
    background: #fff !important;
    color: #6f7bd6 !important;
    border: 1.5px solid #6f7bd6 !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}
.go-ai-generate-btn:hover {
    background: #eef0fb !important;
    color: #4a56b0 !important;
    border-color: #4a56b0 !important;
}

/* Reference image picker */
.go-ai-reference {
    margin: 10px 0 4px;
}
.go-ai-reference-label {
    display: block;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 6px;
}
.go-ai-reference-hint {
    display: inline;
    font-weight: 400;
    font-size: 0.85em;
    color: #777;
}
.go-ai-reference-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.go-ai-reference-thumb {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.go-ai-reference-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #f6f6f6;
}
.go-ai-reference-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    padding: 0;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    border: none;
    background: #e05252;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
