/* ============================================
   Second Brain Management Page Styles
   ============================================ */

/* Category Tabs */
.sb-category-tabs {
    display: flex;
    gap: 0;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.sb-tab {
    padding: 0.375rem 0.75rem;
    background: transparent;
    color: var(--sidebar-text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    opacity: 0.7;
}

.sb-tab:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.sb-tab:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.sb-tab:not(:first-child) {
    border-left: none;
}

.sb-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 1;
    font-weight: 600;
}

.sb-tab:hover:not(.active) {
    background: var(--sidebar-hover);
    opacity: 1;
}

/* Category badge */
.sb-cat-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Item list overrides */
.note-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Confidence badges */
.sb-confidence-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.sb-conf-high {
    background: rgba(39, 174, 96, 0.2);
    color: #27AE60;
}

.sb-conf-med {
    background: rgba(241, 196, 15, 0.2);
    color: #F1C40F;
}

.sb-conf-low {
    background: rgba(231, 76, 60, 0.2);
    color: #E74C3C;
}

/* Detail category badge */
.sb-detail-category-badge {
    margin-bottom: 0.5rem;
}

/* Detail fields */
.sb-detail-fields {
    padding: 1rem 0;
}

.sb-field {
    margin-bottom: 1rem;
}

.sb-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 0.25rem;
}

.sb-field-value {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Follow-ups list */
.sb-followups {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-followups li {
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.sb-followup-status {
    font-size: 0.75rem;
    color: #888;
}

/* Inbox info section */
.sb-inbox-info {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.sb-inbox-info h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 0.5rem;
}

.sb-confidence-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.sb-original-text {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.25rem;
}

/* Stats footer */
.sb-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem;
}

.sb-stat {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.8;
}

/* Edit fields */
.sb-edit-field {
    margin-bottom: 1rem;
}

.sb-edit-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #888;
}

.sb-edit-input {
    width: 100%;
    padding: 0.625rem;
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    box-sizing: border-box;
}

.sb-edit-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.625rem;
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.sb-edit-input:focus,
.sb-edit-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Select dropdown */
.sb-select {
    width: 100%;
    padding: 0.625rem;
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    margin: 0.75rem 0;
}

/* Reclassify modal */
.sb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.sb-modal-overlay[hidden],
.note-view[hidden],
.note-editor[hidden] {
    display: none !important;
}

.sb-modal {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    min-width: 300px;
    max-width: 400px;
}

.sb-modal h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.sb-modal p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #888;
}

.sb-modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sb-category-tabs {
        padding: 0.375rem;
    }

    .sb-tab {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}
