/* Splintr - Component Visual Styles */
/* Visual styling for all UI components - safe to customize */

/* === TYPOGRAPHY STYLES === */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

h1 { font-size: var(--font-size-xl); }
h2 { font-size: 20px; }
h3 { font-size: var(--font-size-lg); }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* === HEADER STYLES === */
.header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    backdrop-filter: blur(10px);
}

.logo h1 {
    margin: 0;
    font-size: var(--font-size-xl);
    color: var(--primary-color);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.tagline {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-left: var(--spacing-sm);
}

/* === USER MENU STYLES === */
.user-info:hover {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.user-dropdown {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
}

.user-dropdown a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.user-dropdown a:hover {
    background: var(--bg-secondary);
}

.user-dropdown a:last-child {
    border-bottom: none;
}

/* === BUTTON STYLES === */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--bg-secondary);
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--transition-normal), height var(--transition-normal);
}

.btn:active::after {
    width: 200px;
    height: 200px;
    transition: width 0.1s, height 0.1s;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-light);
    border: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--text-light);
    text-decoration: none;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    color: var(--text-light);
    text-decoration: none;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--text-light);
}

.btn-danger:hover {
    background: #c82333;
    color: var(--text-light);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === FORM STYLES === */
.form-control {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    background: var(--input-bg);
    color: var(--text-color);
    transition: all var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
    transform: translateY(-1px);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-color);
}

.form-help {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* === WIDGET STYLES === */
.widget {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--post-shadow);
}

.widget h3 {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
    color: var(--text-color);
}

/* === POST STYLES === */
.post {
    background: var(--gradient-card);
    border: 1px solid var(--post-border);
    border-radius: var(--border-radius);
    box-shadow: var(--post-shadow);
    position: relative;
    overflow: hidden;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color), var(--success-color));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post:hover::before {
    opacity: 1;
}

.post-header {
    border-bottom: 1px solid var(--border-color);
}

.post-avatar {
    width: var(--avatar-lg);
    height: var(--avatar-lg);
    border-radius: 5%;
    object-fit: cover;
    margin-right: var(--spacing-sm);
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, var(--primary-color), var(--info-color)) border-box;
    transition: all var(--transition-normal);
}

.post-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 124, 186, 0.3);
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-author-name {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 2px;
    display: block;
}

.post-author-name:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.post-meta {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.post-text {
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.post-media {
    margin-bottom: var(--spacing-md);
}

.post-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.post-link-preview {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.post-link-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-link-info {
    padding: var(--spacing-md);
}

.post-link-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.post-link-description {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.post-reactions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.post-action {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
    margin-right: var(--spacing-sm);
    position: relative;
    overflow: hidden;
}

.post-action:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.post-action::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--transition-normal), height var(--transition-normal);
}

.post-action:active::after {
    width: 200px;
    height: 200px;
    transition: width 0.1s, height 0.1s;
}

/* === COMMENT STYLES === */
.comments {
    border-top: 1px solid var(--border-color);
    background: var(--comment-bg);
}

.comment {
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment.reply::before {
    content: '';
    position: absolute;
    left: -var(--spacing-xl);
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.comment-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.comment-avatar {
    width: var(--avatar-md);
    height: var(--avatar-md);
    border-radius: 2%;
    object-fit: cover;
    margin-right: var(--spacing-sm);
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-color), var(--bg-color)) padding-box,
                linear-gradient(45deg, var(--primary-color), var(--info-color)) border-box;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-color);
    text-decoration: none;
    margin-right: var(--spacing-xs);
}

.comment-time {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    flex: 0 1 100%;
}

.comment-content {
    font-size: var(--font-size-sm);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.comments-hidden-notice {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-style: italic;
    padding: var(--spacing-sm) 0;
    text-align: center;
}

.privacy-picker-overlay {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-width: 180px;
}

.post-privacy-inline {
    display: block;
    margin-top: var(--spacing-xs);
    margin-left: auto;
    padding: 2px 4px;
    font-size: var(--font-size-xs, 0.75rem);
    color: var(--text-muted);
    background: var(--bg-secondary, transparent);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
}

.post-privacy-label {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-xs, 0.75rem);
    color: var(--text-muted);
    text-align: right;
}

.comment-action {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px var(--spacing-xs);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.comment-action:hover {
    color: var(--primary-color);
    background: var(--bg-color);
}

.comment-loading {
    padding: var(--spacing-md);
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.comment-unavailable {
    padding: var(--spacing-md);
    color: var(--text-muted);
    font-style: italic;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    margin: var(--spacing-xs);
}

.comment-input {
    width: 100%;
    min-height: 60px;
    resize: vertical;
}

/* === AVATAR STYLES === */
.user-avatar,
.profile-avatar,
.friend-avatar {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-color), var(--bg-color)) padding-box,
                linear-gradient(45deg, var(--primary-color), var(--info-color)) border-box;
    transition: all var(--transition-normal);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 5%;
    object-fit: cover;
}

.profile-avatar {
    width: 200px;
    height: 200px;
    border-radius: 5%;
    object-fit: cover;
    border: 4px solid var(--border-color);
}

.friend-avatar {
    width: var(--avatar-lg);
    height: var(--avatar-lg);
    border-radius: 5%;
    object-fit: cover;
    margin-right: var(--spacing-md);
}

.user-avatar:hover,
.friend-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 124, 186, 0.3);
}

/* === PROFILE STYLES === */
.profile-header {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.profile-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23007cba" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.profile-name {
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
}

.profile-username {
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.profile-bio {
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.profile-stats span {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.profile-stats strong {
    color: var(--text-color);
}

/* === FRIEND STYLES === */
.friend-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.friend-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.friend-item:hover {
    box-shadow: var(--box-shadow);
}

.friend-item:hover::before {
    opacity: 1;
}

.friend-name {
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-color);
}

.friend-username {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.friend-node {
    font-size: var(--font-size-sm);
    color: var(--info-color);
}

/* === TAB STYLES === */
.friends-tabs {
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--transition-normal), height var(--transition-normal);
}

.tab-btn:active::after {
    width: 200px;
    height: 200px;
    transition: width 0.1s, height 0.1s;
}

/* === SETTINGS STYLES === */
.settings-section {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.settings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--info-color));
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.settings-section h3 {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.node-address {
    font-family: monospace;
    background: var(--bg-secondary);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
}

/* === MODAL STYLES === */
.modal-content {
    background: var(--modal-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--modal-shadow);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-color);
}

/* === RICH TEXT EDITOR STYLES === */
.rich-text-editor {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.editor-toolbar {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.editor-btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.editor-btn:hover,
.editor-btn.active {
    background: var(--gradient-primary);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.editor-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--transition-normal), height var(--transition-normal);
}

.editor-btn:active::after {
    width: 200px;
    height: 200px;
    transition: width 0.1s, height 0.1s;
}

.editor-textarea {
    border: none;
    border-radius: 0;
    resize: vertical;
    min-height: 120px;
}

.editor-textarea:focus {
    box-shadow: none;
    border-color: transparent;
}

.editor-preview {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    min-height: 120px;
}

/* === PHOTO UPLOAD STYLES === */
.photo-preview {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.photo-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.photo-preview:hover::after {
    opacity: 1;
}

.photo-preview-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
}

/* === QR CODE STYLES === */
.qr-container img {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* === TOAST STYLES === */
.toast {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--success-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
}

.toast.show {
    animation: slideInRight 0.3s ease-out, pulse 0.2s 0.1s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
}

/* === LOADING STYLES === */
.loading {
    color: var(--text-muted);
    animation: pulse 2s ease-in-out infinite;
}

.loading::after {
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
}

.feed-empty {
    color: var(--text-muted);
}

.feed-empty h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

/* === PRIVACY INDICATOR STYLES === */
.privacy-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-left: var(--spacing-sm);
    background: var(--primary-light);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
}

/* === FOCUS STYLES FOR ACCESSIBILITY === */
.btn:focus,
.form-control:focus,
.post-action:focus,
.comment-action:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* === CUSTOM SCROLLBARS === */
.feed::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.feed::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.feed::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--border-radius);
}

.feed::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* ===== Visitor Sidebar Styles ===== */

.sidebar-visitor-context {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.visitor-host-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.visitor-host-info .user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.visitor-label {
    font-size: 0.75em;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-separator {
    height: 1px;
    margin: 8px 20px;
    background: var(--border-color, #e0e0e0);
    list-style: none;
}

.home-link {
    color: var(--primary-color, #0066cc) !important;
    font-weight: 600;
}

.sidebar-footer .visitor-label {
    font-size: 0.7em;
    opacity: 0.7;
}

/* === TAB BUTTON STYLES === */
/* Used in settings, profile, friends, and bookmarks pages */
.tab-button {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tab-button:hover {
    color: var(--text-color);
    background: var(--bg-tertiary);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--transition-normal), height var(--transition-normal);
}

.tab-button:active::after {
    width: 200px;
    height: 200px;
    transition: width 0.1s, height 0.1s;
}

/* === REACTION BUTTON STYLES === */
/* Like, love, laugh, loathe buttons on posts */
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-muted);
    border-radius: 20px;
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal);
}

.reaction-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-color);
    border-color: var(--text-muted);
}

.reaction-btn.active,
.reaction-btn.reacted {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* === COMMENT BUTTON STYLES === */
/* Comment toggle button on posts */
.comment-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-muted);
    border-radius: 20px;
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal);
    margin-left: auto;
}

.comment-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-color);
    border-color: var(--text-muted);
}

/* === POST PERMALINK & MENU LINK STYLES === */

/* Timestamp as a permalink — always on its own line via .author-info column layout */
.post-time-link {
    color: inherit;
    text-decoration: none;
}

.post-time-link:hover {
    text-decoration: underline;
    color: var(--text-color);
}

/* Top row: name + node always grouped together */
.author-info-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--spacing-xs, 4px);
}

/* Override core.css row layout — with explicit top/time structure, use column */
.author-info {
    flex-direction: column;
}

/* Author name/node as links — no underline, inherit existing styles */
a.author-name {
    text-decoration: none;
    color: var(--text-primary);
}

a.author-name:hover {
    text-decoration: underline;
}

a.author-node {
    text-decoration: none;
    color: var(--text-secondary);
}

a.author-node:hover {
    text-decoration: underline;
}

/* Menu items that are <a> links instead of <button> */
.post-menu-item.open-post-link {
    display: block;
    text-decoration: none;
    color: var(--text-color);
}

/* Direct permalink icon for non-logged-in users */
.post-permalink-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
    line-height: 1;
    text-decoration: none;
}

.post-permalink-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-color);
}

/* === COMMENT FORM INPUT STYLES === */
/* Textarea and submit button inside the comment form */
.comment-input textarea,
.comment-form textarea {
    width: 100%;
    min-height: 60px;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--input-bg);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    resize: vertical;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    box-sizing: border-box;
}

.comment-input textarea:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.comment-input textarea::placeholder,
.comment-form textarea::placeholder {
    color: var(--text-muted);
}

.comment-input button,
.comment-form button[type="submit"] {
    padding: var(--spacing-xs) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-normal);
    margin-top: var(--spacing-xs);
}

.comment-input button:hover,
.comment-form button[type="submit"]:hover {
    background: var(--primary-hover);
}

.comment-input button:disabled,
.comment-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === GENERIC FORM ELEMENT STYLES === */
/* Theme-aware defaults for inputs, selects, and textareas */
/* Applied to settings, bookmarks, and other pages */
.settings-section input[type="text"],
.settings-section input[type="email"],
.settings-section input[type="password"],
.settings-section input[type="url"],
.settings-section input[type="number"],
.settings-section textarea,
.settings-section select,
.settings-content input[type="text"],
.settings-content input[type="email"],
.settings-content input[type="password"],
.settings-content input[type="url"],
.settings-content input[type="number"],
.settings-content textarea,
.settings-content select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--input-bg);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    box-sizing: border-box;
}

.settings-section input[type="text"]:focus,
.settings-section input[type="email"]:focus,
.settings-section input[type="password"]:focus,
.settings-section input[type="url"]:focus,
.settings-section input[type="number"]:focus,
.settings-section textarea:focus,
.settings-section select:focus,
.settings-content input[type="text"]:focus,
.settings-content input[type="email"]:focus,
.settings-content input[type="password"]:focus,
.settings-content input[type="url"]:focus,
.settings-content input[type="number"]:focus,
.settings-content textarea:focus,
.settings-content select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.settings-section textarea,
.settings-content textarea {
    resize: vertical;
    min-height: 80px;
}

.settings-section input[type="checkbox"],
.settings-content input[type="checkbox"],
.settings-section input[type="radio"],
.settings-content input[type="radio"] {
    width: auto;
    accent-color: var(--primary-color);
}

.settings-section select,
.settings-content select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8078' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--spacing-sm) center;
    padding-right: calc(var(--spacing-sm) + 20px);
}

.settings-section input:disabled,
.settings-content input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Settings tabs container */
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

/* === LOAD MORE BUTTON === */
.load-more button,
#load-more-btn {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.load-more button:hover,
#load-more-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

/* === POST MENU BUTTON STYLES === */
.post-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
    line-height: 1;
}

.post-menu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-color);
}

.post-menu {
    position: relative;
    text-align: right;
}

.post-menu-dropdown {
    display: none;
    position: fixed;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 100;
    min-width: 120px;
}

.post-menu-dropdown.active {
    display: block;
}

.post-menu-item {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: none;
    color: var(--text-color);
    font-size: var(--font-size-sm);
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.post-menu-item:hover {
    background: var(--bg-tertiary);
}

.post-menu-item.discard-post-btn {
    color: var(--danger-color, #dc3545);
}

.post-menu-item.discard-post-btn:hover {
    background: #fff0f0;
}

/* === CREATE POST BUTTON === */
#create-post-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-normal);
    margin-top: var(--spacing-sm);
}

#create-post-btn:hover {
    background: var(--primary-hover);
}

/* Bot-generated content badge */
.bot-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    margin-left: 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--accent-muted, #e8f5e9);
    color: var(--accent-text, #2e7d32);
    vertical-align: middle;
    line-height: 1.4;
}