/**
 * forum-styles.css
 * Complete styles for forum boards including base styles, tag display, and enhanced tag features.
 */

/* Base page styles */
body {
    background-color: #000;
    color: #FFF;
    font-family: "Courier New", Courier, monospace;
    margin: 0;
    padding: 20px 0;
}

/* Navigation styles */
.nav-bar {
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.nav-bar a {
    color: #88aaff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
}

.nav-bar a:hover {
    text-decoration: underline;
}

.nav-bar a.active {
    font-weight: bold;
    color: #FFF;
}

/* Main container and sidebar layout */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

.sidebar {
    position: absolute;
    top: 0;
    left: 100%;
    width: 300px;
    margin-left: 40px;
}

/* Responsive layout for smaller screens */
@media (max-width: 1200px) {
    .sidebar {
        position: static;
        width: auto;
        margin-left: 0;
        margin-top: 40px;
    }
}

/* Typography */
h1 {
    color: #FFF;
    border-bottom: 1px solid #FFF;
    padding-bottom: 10px;
    font-weight: normal;
}

p, label {
    color: #AAA;
    font-size: 14px;
}

hr {
    border: 0;
    border-top: 1px solid #555;
    margin: 20px 0;
}

/* Form styles */
form {
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    height: 100px;
    background-color: #111;
    color: #FFF;
    border: 1px solid #555;
    padding: 10px;
    font-family: inherit;
    resize: vertical;
}

input[type="file"] {
    color: #AAA;
    background-color: #111;
    border: 1px solid #555;
    padding: 8px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

button {
    background-color: #333;
    color: #FFF;
    border: 1px solid #777;
    padding: 10px 15px;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background-color: #444;
}

button:disabled {
    background-color: #222;
    color: #666;
    cursor: not-allowed;
}

/* Form actions */
.form-actions {
    display: flex;
    align-items: center;
    margin-top: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.form-actions label {
    margin-left: 5px;
    cursor: pointer;
}

.admin-controls, .mod-controls {
    display: none;
    align-items: center;
}

/* Message display */
.message {
    margin-top: 10px;
    min-height: 20px;
    text-align: center;
    width: 100%;
}

.message.success {
    color: #88ff88;
}

.message.error {
    color: #ff8888;
}

/* Sorting controls */
.sort-controls {
    margin-bottom: 20px;
    text-align: right;
}

.sort-controls label {
    margin-right: 10px;
}

.sort-controls select {
    background-color: #111;
    color: #FFF;
    border: 1px solid #555;
    padding: 5px;
    font-family: inherit;
}

/* Comment styles */
.comment {
    border: 1px solid #444;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #1a1a1a;
}

.comment-header {
    font-size: 12px;
    color: #AAA;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* User styling */
.user-id, .username {
    font-weight: bold;
    color: #CCC;
}

.username a {
    color: #88aaff;
    text-decoration: none;
}

.username a:hover {
    text-decoration: underline;
}

.admin-user {
    color: #ff8888;
    font-weight: bold;
}

.mod-user {
    color: #f0e68c;
    font-weight: bold;
}

/* Comment content */
.comment-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 5px;
}

.comment-content .text-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-content img, .comment-content video {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
    border-radius: 3px;
    display: block;
}

/* Comment actions */
.comment-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.action-btn {
    font-size: 12px;
    background: none;
    border: none;
    padding: 5px 0;
    cursor: pointer;
    margin-right: 15px;
}

.reply-btn {
    color: #88aaff;
}

.delete-btn {
    color: #ff8888;
}

.pin-btn {
    color: #f0e68c;
}

/* Pinned comments */
.pinned {
    border-left: 3px solid #f0e68c;
}

.pin-icon {
    font-size: 16px;
    color: #f0e68c;
}

/* Voting controls */
.vote-controls {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.vote-btn {
    font-size: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 5px;
}

.like-btn {
    color: #88ff88;
}

.dislike-btn {
    color: #ff8888;
}

.vote-count {
    font-size: 12px;
    color: #AAA;
    margin: 0 8px;
    min-width: 10px;
    text-align: center;
}

/* Reply form and container */
.reply-form {
    margin-top: 15px;
    border-top: 1px dashed #444;
    padding-top: 15px;
}

.replies-container {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 1px solid #333;
}

/* Highlight state */
.highlight {
    background-color: #2a2a20;
    border-color: #776600;
}

/* Styles for the tag display controls */
.tag-display-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0; /* Adjusted from 10px 0 */
    padding: 8px 12px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
}

.tag-display-controls input[type="checkbox"] {
    margin: 0;
}

.tag-display-controls label {
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.tag-display-controls input[type="checkbox"]:checked + label {
    color: #88aaff;
}

/* Hide tags when disabled */
.tags-hidden .tag {
    display: none;
}

.tags-hidden .comment-header > div:first-child .tag {
    display: none;
}

/* Enhanced Tag display in comment headers */
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.comment-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Username and tag container */
.username {
    font-weight: bold;
    margin-right: 5px;
}

/* Tag container styling */
.comment-header .tag {
    margin: 0 2px;
    vertical-align: middle;
}

/* Multiple tags spacing */
.comment-header .tag + .tag {
    margin-left: 3px;
}

/* Responsive tag display */
@media (max-width: 768px) {
    .comment-header > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comment-header .tag {
        height: 18px;
        width: 55px;
        font-size: 8px;
    }
}