/* Steam-style Comment System CSS */

/* Comment Container Base */
.comment-container {
    background: rgba(16, 29, 44, 0.8);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(102, 192, 244, 0.1);
    transition: all 0.3s ease;
}

.comment-container:hover {
    border-color: rgba(102, 192, 244, 0.3);
    background: rgba(16, 29, 44, 0.9);
}

/* Parent comment styling - more prominent */
.comment-container:not([class*="nested-"]) {
    background: rgba(16, 29, 44, 0.9);
    border: 1px solid rgba(102, 192, 244, 0.15);
    border-left: 3px solid rgba(102, 192, 244, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.comment-container:not([class*="nested-"]):hover {
    border-color: rgba(102, 192, 244, 0.4);
    border-left-color: #66c0f4;
    background: rgba(16, 29, 44, 1);
}

/* Reply comments styling - more subtle */
.comment-container[class*="nested-"] {
    background: rgba(27, 40, 56, 0.6);
    border: 1px solid rgba(102, 192, 244, 0.08);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
    margin-top: 8px;
    position: relative;
}

.comment-container[class*="nested-"]:hover {
    background: rgba(27, 40, 56, 0.8);
    border-color: rgba(102, 192, 244, 0.2);
}

/* Add connecting line for replies */
.comment-container[class*="nested-"]:before {
    content: '';
    position: absolute;
    left: -15px;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(102, 192, 244, 0.3);
    border-radius: 1px;
}

/* Comment Header */
.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid rgba(102, 192, 244, 0.3);
}

/* Smaller avatar for replies */
.comment-container[class*="nested-"] .comment-avatar {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(102, 192, 244, 0.2);
}

.comment-user {
    font-weight: 600;
    color: #66c0f4;
    margin-right: 10px;
}

/* Different styling for reply user names */
.comment-container[class*="nested-"] .comment-user {
    font-weight: 500;
    color: #8bc0e6;
    font-size: 0.95em;
}

.comment-time {
    font-size: 0.85em;
    color: #8f98a0;
}

/* Smaller time for replies */
.comment-container[class*="nested-"] .comment-time {
    font-size: 0.8em;
    color: #7a8a95;
}

/* Comment Content */
.comment-content {
    line-height: 1.5;
    margin-bottom: 10px;
    color: #acb2b8;
}

/* Slightly different content styling for replies */
.comment-container[class*="nested-"] .comment-content {
    color: #9ba7b3;
    font-size: 0.95em;
    margin-bottom: 8px;
}

/* Comment Actions */
.comment-actions {
    display: flex;
    gap: 10px;
}

/* Smaller actions for replies */
.comment-container[class*="nested-"] .comment-actions {
    gap: 8px;
}

.btn-reply {
    background: transparent;
    border: 1px solid rgba(102, 192, 244, 0.4);
    color: #66c0f4;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.btn-reply:hover {
    background: rgba(102, 192, 244, 0.1);
    border-color: #66c0f4;
    color: #ffffff;
}

/* Reply Form */
.reply-form {
    margin-top: 10px;
    padding: 10px;
    background: rgba(27, 40, 56, 0.6);
    border-radius: 5px;
    border: 1px solid rgba(102, 192, 244, 0.2);
    font-size: 0.9em;
}

.reply-form .form-control {
    font-size: 0.85em;
    padding: 6px 10px;
    min-height: auto;
}

.reply-form .btn {
    font-size: 0.75em;
    padding: 4px 10px;
}

/* Reply form styling */
.comment-container .reply-form {
    position: relative;
    z-index: 10;
}

/* Form Controls */
.form-control {
    background: rgba(16, 29, 44, 0.8);
    border: 1px solid rgba(102, 192, 244, 0.3);
    color: #c7d5e0;
    border-radius: 4px;
}

.form-control:focus {
    background: rgba(16, 29, 44, 0.9);
    border-color: #66c0f4;
    box-shadow: 0 0 0 0.2rem rgba(102, 192, 244, 0.25);
    color: #ffffff;
}

.form-control::placeholder {
    color: #8f98a0;
}

.text-success{
    color: #8bc53f!important;
}

.bg-success{
    background: linear-gradient(135deg, #4b6b22, #8bc53f)!important;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #4b6b22, #8bc53f);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a7829, #9fd142);
    transform: translateY(-1px);
}

.btn-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #c7d5e0;
    border-radius: 3px;
    padding: 4px 10px;
    margin-left: 8px;
    transition: all 0.3s ease;
    font-size: 0.75em;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Nested Layout */
.nested-1 { margin-left: 25px; }
.nested-2 { margin-left: 45px; }
.nested-3 { margin-left: 65px; }
.nested-4 { margin-left: 85px; }
.nested-5 { margin-left: 105px; }

/* Add reply indicator */
.comment-container[class*="nested-"] .comment-header:before {
    content: '↳';
    color: rgba(102, 192, 244, 0.6);
    margin-right: 5px;
    font-size: 0.9em;
    font-weight: bold;
}

/* Main Comment Form */
#main-comment-form {
    background: rgba(16, 29, 44, 0.8);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 192, 244, 0.2);
    /* display: none; */ /* Commented out - form always visible for testing */
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 40px;
    color: #8f98a0;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: #8f98a0;
    font-style: italic;
}

.comment-count {
    color: #66c0f4;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Emoji Picker Styling */
.emoji-container {
    position: relative;
    display: inline-block;
}

.emoji-btn {
    background: transparent;
    border: 1px solid rgba(102, 192, 244, 0.3);
    color: #66c0f4;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.emoji-btn:hover {
    background: rgba(102, 192, 244, 0.1);
    border-color: #66c0f4;
    color: #ffffff;
}

.emoji-picker-container {
    position: absolute;
    bottom: 100%;
    right: 0;
    z-index: 1000;
    margin-bottom: 5px;
    display: none;
}

.emoji-picker-container.show {
    display: block;
}

/* Custom emoji picker styling to match Steam theme */
emoji-picker {
    --background: rgba(16, 29, 44, 0.95);
    --border-color: rgba(102, 192, 244, 0.3);
    --outline-color: #66c0f4;
    --input-border-color: rgba(102, 192, 244, 0.2);
    --input-font-color: #c7d5e0;
    --input-background: rgba(27, 40, 56, 0.8);
    --button-hover-background: rgba(102, 192, 244, 0.1);
    --emoji-hover-background: rgba(102, 192, 244, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(102, 192, 244, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.input-group {
    position: relative;
}

.input-group .emoji-container {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.reply-form .input-group {
    position: relative;
}

.reply-form .emoji-container {
    position: absolute;
    right: 8px;
    top: 24px;
    z-index: 10;
}

.reply-form .emoji-btn {
    padding: 4px 6px;
    font-size: 0.8em;
}

/* View More Replies Button */
.view-more-replies {
    background: transparent;
    border: 1px solid rgba(102, 192, 244, 0.3);
    color: #8bc0e6;
    font-size: 0.8em;
    padding: 6px 12px;
    border-radius: 4px;
    margin: 8px 0 8px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-more-replies:hover {
    background: rgba(102, 192, 244, 0.1);
    border-color: #66c0f4;
    color: #66c0f4;
}

.view-more-replies.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.hidden-replies {
    display: none;
}

/* View More Comments Button */
.view-more-comments {
    background: rgba(16, 29, 44, 0.8);
    border: 1px solid rgba(102, 192, 244, 0.3);
    color: #66c0f4;
    font-size: 0.9em;
    padding: 12px 20px;
    border-radius: 6px;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.view-more-comments:hover {
    background: rgba(16, 29, 44, 0.9);
    border-color: #66c0f4;
    color: #ffffff;
    transform: translateY(-1px);
}

.view-more-comments.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.hidden-comments {
    display: none;
}

/* Hide Comments Button */
.hide-comments {
    background: rgba(16, 29, 44, 0.8);
    border: 1px solid rgba(102, 192, 244, 0.3);
    color: #66c0f4;
    font-size: 0.9em;
    padding: 12px 20px;
    border-radius: 6px;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.hide-comments:hover {
    background: rgba(16, 29, 44, 0.9);
    border-color: #66c0f4;
    color: #ffffff;
    transform: translateY(-1px);
}