
/* Header */
.chatgpt-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.chatgpt-avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatgpt-header-text { padding-top: 2px; }

.chatgpt-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
}

.chatgpt-subtitle {
    margin: 0;
    font-size: 13px;
    color: #8a8fa3;
    line-height: 1.4;
}

/* Conversation area (hidden until there are messages) */
.chatgpt-messages {
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 14px;
}

.chatgpt-messages:empty { display: none; margin: 0; }

.chatgpt-msg {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.chatgpt-msg-user { align-items: flex-end; }
.chatgpt-msg-assistant { align-items: flex-start; }

.chatgpt-bubble {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 85%;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.5;
}

.chatgpt-msg-user .chatgpt-bubble {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: #fff;
}

.chatgpt-msg-assistant .chatgpt-bubble {
    background: #f4f5f9;
    color: #1a1a2e;
}

.chatgpt-msg-image {
    max-width: 180px;
    border-radius: 8px;
    margin-bottom: 6px;
}

/* Form */
.chatgpt-form {
    display: flex;
    flex-direction: column;
}

.chatgpt-textarea-wrap {
    position: relative;
    margin-bottom: 14px;
}

.chatgpt-textarea-wrap textarea {
    width: 100%;
    resize: vertical;
    padding: 14px 16px 28px;
    border-radius: 12px;
    border: 1px solid #e5e7ee;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a2e;
    box-sizing: border-box;
    background: #fbfbfd;
}

.chatgpt-textarea-wrap textarea:focus {
    outline: none;
    border-color: #9b8cf2;
    background: #fff;
}

.chatgpt-textarea-wrap textarea::placeholder { color: #a7abbd; }

.chatgpt-char-count {
    position: absolute;
    right: 14px;
    bottom: 10px;
    font-size: 12px;
    color: #b0b3c2;
    pointer-events: none;
}

/* Attach row */
.chatgpt-attach-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7080;
    margin-bottom: 14px;
    width: fit-content;
}

.chatgpt-attach-row:hover { color: #4f46e5; }

.chatgpt-image-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.chatgpt-image-preview img {
    max-height: 100px;
    border-radius: 8px;
    display: block;
}

#chatgpt-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #d33;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    line-height: 1;
}

/* Security note */
.chatgpt-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eef0fd;
    color: #5b5f78;
    font-size: 12.5px;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-family: 'Poppins';
}

.chatgpt-shield { font-size: 14px; }

/* Send button */
.chatgpt-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    transition: opacity 0.15s ease;
}

.chatgpt-send-btn:hover { opacity: 0.92; }
.chatgpt-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.chatgpt-arrow { font-size: 16px; }

.chatgpt-footer-note {
    text-align: center;
    font-size: 12px;
    color: #a7abbd;
    margin: 10px 0 0;
    font-family: 'Poppins';
}

.chatgpt-status {
    font-size: 12px;
    color: #8a8fa3;
    margin-top: 8px;
    text-align: center;
}
