/* ==================== */
/* Image Generation (chat composer) */
/* ==================== */

/* Composer button — matches .claude-attach-btn / .voice-mic-btn / .meeting-rec-btn */
.image-gen-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b6b6b;
    transition: all 0.15s ease;
}

.image-gen-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text);
}

.image-gen-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- modal ---------- */
.imggen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 20px;
}

.imggen-modal {
    background: var(--color-surface, #fff);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 460px;
    padding: 20px 22px 18px;
}

.imggen-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.imggen-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
}

.imggen-close {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #9a9a9a;
    cursor: pointer;
    padding: 0 4px;
}
.imggen-close:hover { color: var(--color-text, #1a1a1a); }

.imggen-sub {
    margin: 4px 0 14px;
    font-size: 13px;
    color: #6b6b6b;
}

.imggen-prompt {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--color-border, #e2e2e2);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    resize: vertical;
    color: var(--color-text, #1a1a1a);
}
.imggen-prompt:focus {
    outline: none;
    border-color: var(--color-primary, #4f46e5);
}

.imggen-upload {
    display: block;
    margin-top: 10px;
    cursor: pointer;
}
.imggen-upload-label {
    font-size: 12.5px;
    color: var(--color-primary, #4f46e5);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.imggen-thumb {
    margin-top: 10px;
    position: relative;
    display: inline-block;
}
.imggen-thumb img {
    max-height: 90px;
    border-radius: 8px;
    display: block;
}
.imggen-thumb-x {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: #1a1a1a;
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.imggen-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.imggen-cancel,
.imggen-go {
    border-radius: 9px;
    padding: 8px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}
.imggen-cancel {
    background: transparent;
    color: #6b6b6b;
    border-color: var(--color-border, #e2e2e2);
}
.imggen-cancel:hover { background: rgba(0, 0, 0, 0.04); }
.imggen-go {
    background: var(--color-primary, #4f46e5);
    color: #fff;
}
.imggen-go:hover:not(:disabled) { filter: brightness(1.05); }
.imggen-go:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- inline chat result ---------- */
.imggen-result-img {
    display: block;
    max-width: 100%;
    width: 360px;
    border-radius: 12px;
    margin-top: 4px;
}

.imggen-note {
    font-size: 13.5px;
    color: var(--color-text, #1a1a1a);
    margin-bottom: 8px;
}

.imggen-result-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.imggen-download {
    display: inline-block;
    background: var(--color-primary, #4f46e5);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
}
.imggen-download:hover { filter: brightness(1.05); }
.imggen-session-hint {
    font-size: 11.5px;
    color: #9a9a9a;
}

.imggen-error {
    color: #b91c1c;
    font-size: 13.5px;
}

/* ---------- inline edit-mode chip (above composer) ---------- */
.imggen-edit-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.25);
    border-radius: 10px;
    padding: 6px 10px;
    margin-bottom: 8px;
    font-size: 12.5px;
    color: var(--color-text, #1a1a1a);
}
.imggen-edit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary, #4f46e5);
    flex-shrink: 0;
}
.imggen-edit-text { flex: 1; }
.imggen-edit-exit {
    border: none;
    background: transparent;
    color: #6b6b6b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.imggen-edit-exit:hover { color: var(--color-text, #1a1a1a); }

.imggen-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--color-primary, #4f46e5);
    border-radius: 50%;
    animation: imggen-spin 0.7s linear infinite;
    vertical-align: -2px;
    margin-right: 4px;
}
@keyframes imggen-spin { to { transform: rotate(360deg); } }
