/* Bot Store Modal */
.bot-store-modal {
    max-width: 700px;
    width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.bot-store-modal .messaging-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-store-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bot-store-create-btn {
    background: #4a9eff;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.bot-store-create-btn:hover {
    background: #3a8eef;
}

.bot-store-modal .messaging-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 16px;
}

/* Tabs */
.bot-store-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #333;
    margin-bottom: 12px;
}

.bot-store-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
}

.bot-store-tab:hover {
    color: #e0e0e0;
}

.bot-store-tab.active {
    color: #4a9eff;
    border-bottom-color: #4a9eff;
}

/* Controls */
.bot-store-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.bot-store-search {
    flex: 1;
}

.bot-store-search input {
    width: 100%;
    padding: 8px 12px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
}

.bot-store-sort select {
    padding: 8px 12px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
}

/* Tags */
.bot-store-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.bot-store-tag-pill {
    background: #1a1a2e;
    border: 1px solid #333;
    color: #aaa;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
}

.bot-store-tag-pill:hover {
    border-color: #4a9eff;
    color: #e0e0e0;
}

.bot-store-tag-pill.active {
    background: #4a9eff;
    border-color: #4a9eff;
    color: #fff;
}

.tag-count {
    opacity: 0.6;
    font-size: 11px;
}

/* Grid */
.bot-store-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bot-store-loading,
.bot-store-empty,
.bot-store-error {
    text-align: center;
    color: #888;
    padding: 40px 20px;
}

/* Bot Card */
.bot-store-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

.bot-store-card:hover {
    border-color: #4a9eff;
}

/* Star Button */
.bot-star-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 1;
}

@media (hover: hover) {
    .bot-store-card:hover .bot-star-btn {
        display: flex;
    }
}

.bot-star-btn:hover {
    color: #faa61a;
    background: rgba(0, 0, 0, 0.7);
}

.bot-star-btn.starred {
    display: flex;
    color: #faa61a;
}

.bot-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2a2a3e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #888;
    font-size: 18px;
    overflow: hidden;
}

.bot-card-avatar-img,
.bot-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-card-info {
    flex: 1;
    min-width: 0;
}

.bot-card-name {
    font-weight: 600;
    color: #e0e0e0;
    font-size: 14px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bot-card-capabilities {
    display: inline-flex;
    gap: 5px;
    color: #666;
    font-size: 11px;
}

.bot-card-capabilities i {
    color: #4a9eff;
    opacity: 0.7;
}

.bot-card-desc {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bot-card-workflows {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.bot-card-workflow-pill {
    background: #252538;
    color: #8a8aaa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

.bot-card-meta {
    display: flex;
    gap: 12px;
    color: #666;
    font-size: 11px;
    margin-top: 4px;
}

.bot-card-meta i {
    margin-right: 3px;
}

/* Pagination */
.bot-store-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0 0;
}

.bot-store-page-btn {
    background: #1a1a2e;
    border: 1px solid #333;
    color: #aaa;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.bot-store-page-btn:hover:not(:disabled) {
    border-color: #4a9eff;
    color: #e0e0e0;
}

.bot-store-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.bot-store-page-info {
    color: #888;
    font-size: 12px;
}

/* Bot Detail View */
.bot-store-detail {
    padding: 0;
}

.bot-detail-top-back-btn {
    background: none;
    border: none;
    color: #4a9eff;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    margin-bottom: 12px;
    display: block;
}

.bot-detail-top-back-btn:hover {
    color: #3a8eef;
}

.bot-detail-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.bot-detail-avatar {
    width: 56px;
    height: 56px;
    font-size: 24px;
}

.bot-detail-header h3 {
    margin: 0;
    color: #e0e0e0;
}

.bot-detail-description {
    color: #bbb;
    font-size: 14px;
    margin-bottom: 10px;
}

.bot-detail-long {
    color: #999;
    font-size: 13px;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.bot-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.bot-detail-tag {
    background: #1a1a2e;
    border: 1px solid #333;
    color: #aaa;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.bot-detail-prompt {
    margin-bottom: 12px;
}

.bot-detail-prompt label {
    color: #888;
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}

.bot-detail-prompt pre {
    background: #111;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
    padding: 10px;
    color: #999;
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

.bot-detail-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.bot-detail-actions-right {
    display: flex;
    gap: 8px;
}

.bot-detail-back-btn {
    background: none;
    border: 1px solid #444;
    color: #aaa;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.bot-detail-back-btn:hover {
    border-color: #4a9eff;
    color: #4a9eff;
}

.bot-detail-chat-btn {
    background: #4a9eff;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.bot-detail-chat-btn:hover {
    background: #3a8eef;
}

.bot-detail-edit-btn {
    background: none;
    border: 1px solid #4a9eff;
    color: #4a9eff;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.bot-detail-edit-btn:hover {
    background: #4a9eff;
    color: #fff;
}

/* Bot Editor Modal */
.bot-editor-modal {
    max-width: 550px;
    width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.bot-editor-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #333;
    margin-bottom: 16px;
}

.bot-editor-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
}

.bot-editor-tab:hover {
    color: #e0e0e0;
}

.bot-editor-tab.active {
    color: #4a9eff;
    border-bottom-color: #4a9eff;
}

.bot-editor-field {
    margin-bottom: 14px;
}

.bot-editor-field label {
    display: block;
    color: #aaa;
    font-size: 12px;
    margin-bottom: 4px;
}

.bot-editor-field label .required {
    color: #ff6b6b;
}

.bot-editor-field label .hint {
    color: #666;
    font-weight: normal;
}

.bot-editor-field input:not([type="checkbox"]),
.bot-editor-field textarea,
.bot-editor-field select {
    width: 100%;
    padding: 8px 10px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
}

.bot-editor-field textarea {
    resize: vertical;
}

.bot-editor-modal .messaging-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-editor-footer-right {
    display: flex;
    gap: 8px;
}

.bot-editor-delete-btn {
    background: none;
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.bot-editor-delete-btn:hover {
    background: #ff4444;
    color: #fff;
}

/* Bot Editor Capabilities */
.bot-editor-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bot-editor-checkbox {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    cursor: pointer;
    padding: 10px 12px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
    color: #bbb;
    font-size: 13px;
}

.bot-editor-checkbox:hover {
    border-color: #4a9eff;
}

.bot-editor-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.bot-editor-checkbox span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.bot-editor-checkbox i {
    color: #4a9eff;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.bot-editor-workflows-section {
    margin-top: 10px;
}

.bot-editor-workflow-select {
    width: 100%;
    padding: 8px 10px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
    cursor: pointer;
}

.bot-editor-workflow-select:focus {
    outline: none;
    border-color: #4a9eff;
}

.bot-editor-workflow-pills {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.bot-editor-workflow-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
    color: #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.bot-editor-workflow-pill i {
    color: #4a9eff;
    font-size: 11px;
}

.bot-editor-workflow-pill-remove {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
    font-size: 14px;
    line-height: 1;
}

.bot-editor-workflow-pill-remove:hover {
    color: #ff6b6b;
}

.bot-editor-workflow-hint {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Sidebar bot dropdown additions */
.messaging-bot-dropdown-divider {
    border-top: 1px solid #333;
    margin: 6px 0;
}

.messaging-bot-dropdown-section-label {
    padding: 4px 12px;
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.messaging-bot-dropdown-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #4a9eff;
    cursor: pointer;
    font-size: 13px;
}

.messaging-bot-dropdown-action:hover {
    background: #1a1a2e;
}

.messaging-bot-dropdown-store {
    background: #5865f2;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 6px;
    margin: 6px;
}

.messaging-bot-dropdown-store:hover {
    background: #4752c4;
}

.messaging-bot-dropdown-action i {
    width: 16px;
    text-align: center;
}

/* Bot Detail Sections */
.bot-detail-section {
    margin-bottom: 14px;
}

.bot-detail-section label {
    color: #888;
    font-size: 12px;
    display: block;
    margin-bottom: 6px;
}

.bot-detail-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bot-capability {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    color: #bbb;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.bot-capability i {
    color: #4a9eff;
    font-size: 11px;
}

.bot-detail-workflows {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bot-workflow-tag {
    background: #2a2a3e;
    color: #aaa;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
}

.bot-detail-info {
    color: #888;
    font-size: 13px;
    font-style: italic;
}

.bot-detail-greeting {
    background: #111;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
    padding: 10px;
    color: #999;
    font-size: 13px;
    font-style: italic;
}

.bot-detail-prompt-text {
    background: #111;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
    padding: 10px;
    color: #999;
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
}

/* ============================================
   Bot Feedback System
   ============================================ */

/* Feedback Modal */
.bot-feedback-modal {
    max-width: 450px;
    width: 90vw;
}

.bot-feedback-like-section {
    margin-bottom: 16px;
}

.bot-feedback-like-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #1a1a2e;
    border: 2px solid #333;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.bot-feedback-like-btn:hover {
    border-color: #4a9eff;
    color: #e0e0e0;
}

.bot-feedback-like-btn.active {
    background: #1a3a5e;
    border-color: #4a9eff;
    color: #4a9eff;
}

.bot-feedback-like-btn i {
    font-size: 18px;
}

.bot-feedback-comment-section label {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 6px;
}

.bot-feedback-comment-section textarea {
    width: 100%;
    padding: 10px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.bot-feedback-comment-section textarea:focus {
    outline: none;
    border-color: #4a9eff;
}

.bot-feedback-char-count {
    text-align: right;
    color: #666;
    font-size: 11px;
    margin-top: 4px;
}

.bot-feedback-delete-btn {
    background: none;
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.bot-feedback-delete-btn:hover {
    background: #ff4444;
    color: #fff;
}

.bot-feedback-footer-right {
    display: flex;
    gap: 8px;
}

/* Feedback Section in Bot Detail */
.bot-detail-feedback-section {
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 16px;
}

.bot-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bot-feedback-count {
    color: #888;
    font-size: 13px;
    font-weight: 500;
}

.bot-feedback-sort {
    padding: 4px 8px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 12px;
    cursor: pointer;
}

.bot-feedback-sort:focus {
    outline: none;
    border-color: #4a9eff;
}

.bot-feedback-loading,
.bot-feedback-empty,
.bot-feedback-error {
    text-align: center;
    color: #666;
    padding: 30px;
}

.bot-feedback-empty i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.bot-feedback-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bot-feedback-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: #151525;
    border-radius: 6px;
}

/* Reddit-style vote column */
.bot-feedback-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 40px;
}

.vote-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.vote-btn:hover {
    color: #888;
}

.bot-feedback-vote.upvoted .vote-up {
    color: #ff6b35;
}

.bot-feedback-vote.downvoted .vote-down {
    color: #6b9fff;
}

.vote-score {
    font-size: 13px;
    font-weight: 600;
    color: #888;
}

.bot-feedback-vote.upvoted .vote-score {
    color: #ff6b35;
}

.bot-feedback-vote.downvoted .vote-score {
    color: #6b9fff;
}

.bot-feedback-content {
    flex: 1;
    min-width: 0;
}

.bot-feedback-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 12px;
    flex-wrap: wrap;
}

.bot-feedback-user {
    color: #4a9eff;
    font-weight: 500;
}

.bot-feedback-liked {
    color: #4a9eff;
    font-size: 11px;
}

.bot-feedback-time {
    color: #555;
}

.bot-feedback-edit-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 6px;
}

.bot-feedback-edit-btn:hover {
    color: #4a9eff;
}

.bot-feedback-text {
    color: #ccc;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.bot-feedback-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    color: #888;
    font-size: 12px;
}

.feedback-page-btn {
    background: #1a1a2e;
    border: 1px solid #333;
    color: #aaa;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.feedback-page-btn:hover:not(:disabled) {
    border-color: #4a9eff;
    color: #e0e0e0;
}

.feedback-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Feedback button in detail view */
.bot-detail-feedback-btn {
    background: none;
    border: 1px solid #4a9eff;
    color: #4a9eff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bot-detail-feedback-btn:hover {
    background: #4a9eff;
    color: #fff;
}

/* Like stat in bot cards */
.bot-card-stat-like {
    color: #4a9eff;
}
