#iconButtons button,
.emoji-item img {
    width: 32px;
    height: 32px
}

.comments-container {
    margin: 25px auto;
    padding: 20px;
    background: var(--bg2);
    border-radius: 8px;
    box-shadow: var(--card-shadow)
}

.comments-header,
.tabs {
    margin-bottom: 20px;
    display: flex
}

.comments-header {
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px
}

.comments-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--text)
}

.comments-count {
    color: var(--text-secondary);
    font-size: 18px
}

.tabs {
    gap: 20px
}

.tab {
    padding: 8px 0;
    font-size: 16px;
    color: var(--muted-color);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: .3s
}

#commentBox,
.input {
    width: 100%;
    font-size: 15px;
    outline: 0
}

.tab.active {
    color: var(--text);
    border-bottom-color: var(--primary)
}

.tab:hover {
    color: var(--text)
}

.grid {
    display: grid
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr)
}

.gap-4 {
    gap: 1rem
}

.mb-10 {
    margin-bottom: 2rem
}

.mb-5 {
    margin-bottom: 5px
}

.col-span-full {
    grid-column: 1/-1
}

.input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color .3s
}

.input:focus {
    border-color: var(--primary)
}

#commentEditor {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--light);
    transition: .3s;
    overflow: visible;
    min-height: 48px;
    height: 48px
}

#commentEditor.expanded {
    background: var(--bg2);
    box-shadow: var(--elevated-shadow);
    height: auto;
    min-height: 150px;
    padding: 12px;
    display: flex;
    flex-direction: column
}

#commentBox {
    resize: none;
    height: 28px;
    border: none;
    background: 0 0;
    transition: .3s;
    font-family: inherit;
    line-height: 1.5;
    padding: 10px 150px 10px 12px;
    overflow: hidden
}

#commentBox:focus {
    border-color: transparent !important;
    outline: 0 !important;
    box-shadow: none !important
}

#commentEditor.expanded #commentBox {
    height: auto;
    min-height: 100px;
    padding: 0;
    margin-bottom: 10px
}

#commentBox::placeholder {
    color: var(--text-secondary)
}

#toolsWrapper {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: .3s
}

#commentEditor.expanded #toolsWrapper {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: auto
}

#iconButtons {
    display: flex;
    gap: 8px;
    align-items: center
}

#iconButtons button {
    border-radius: 50%;
    background: 0 0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s
}

#iconButtons button:hover,
.emoji-tab:hover {
    background: var(--border-color)
}

#iconButtons button i {
    font-size: 18px;
    color: var(--text-secondary);
    transition: color .2s
}

#iconButtons button:hover .fa-face-smile {
    color: var(--warning-orange)
}

#iconButtons button:hover .fa-link {
    color: var(--primary)
}

#iconButtons button:hover .fa-code {
    color: var(--error-red)
}

#submitBtn {
    background: var(--primary);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: .2s;
    display: none
}

#commentEditor.expanded #submitBtn,
.dropdown-menu.show {
    display: block
}

#submitBtn:hover,
.mass_comments_action input[type=submit].bbcodes:hover {
    background: var(--secondary)
}

.emoji-picker {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    background: var(--bg2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    box-shadow: var(--elevated-shadow);
    display: none;
    width: 580px;
    max-width: calc(100vw - 40px);
    z-index: 1000
}

.emoji-item,
.emoji-tab {
    background: 0 0;
    cursor: pointer
}

#commentEditor.expanded .emoji-picker {
    bottom: 50px
}

.emoji-picker.show {
    display: block;
    animation: .3s slideUp
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.emoji-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color)
}

.emoji-tab {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    transition: background .2s
}

.emoji-tab.active {
    background: var(--border-color)
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 40px);
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px
}

.emoji-grid.hidden {
    display: none
}

.emoji-item {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 4px;
    transition: .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px
}

.emoji-item:hover {
    background: var(--border-color);
    transform: scale(1.15)
}

.emoji-grid::-webkit-scrollbar {
    width: 6px
}

.emoji-grid::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px
}

.emoji-grid::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 3px
}

.emoji-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary)
}

.c-captcha {
    margin-top: 10px
}

.mt-2 {
    margin-top: .5rem
}

.coment_area {
    background: var(--bg2);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 16px;
    margin-bottom: 16px;
    transition: .2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif
}

.rating-btn,
.reply-btn,
.user-name {
    transition: color .2s
}

.coment_area:hover {
    box-shadow: var(--card-shadow)
}

.comment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px
}

.user-section {
    display: flex;
    align-items: flex-start;
    gap: 12px
}

.avatar-container {
    position: relative;
    flex-shrink: 0
}

.avatar-link {
    display: block;
    width: 48px;
    height: 48px;
    position: relative
}

.avatar-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: scale(1.15);
    pointer-events: none;
    z-index: 10
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%
}

.vip-badge-admin,
.vip-badge-client,
.vip-badge-users {
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 12px
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px
}

.user-name {
    font-weight: 600;
    color: var(--text);
    text-decoration: none
}

.reply-btn:hover,
.user-name:hover {
    color: var(--primary)
}

.vip-badge-client {
    font-weight: 500;
    background: linear-gradient(to right, #fbbf24, #f97316);
    color: var(--white)
}

.vip-badge-admin {
    font-weight: 500;
    background: linear-gradient(to right, #f30745, red);
    color: var(--white)
}

.vip-badge-users {
    font-weight: 500;
    background: linear-gradient(to right, #a1a1a1, #616161);
    color: var(--white)
}

.user-date {
    font-size: 12px;
    color: var(--text-secondary)
}

.rating-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px
}

.rating-box {
    display: flex;
    align-items: center;
    border-radius: 8px;
    padding: 4px 8px;
    min-width: 40px
}

.ratingtypeplusminus {
    margin: 0 10px;
    min-width: 40px;
    text-align: center;
    font-weight: 500;
    display: block;
    border-radius: 3px
}

.actions-left,
.comment-actions {
    display: flex;
    align-items: center
}

.comments-tree-list {
    list-style: none
}

.rating-box a {
    opacity: 0
}

.rating-btn {
    background: 0 0;
    border: none;
    color: var(--text-secondary);
    padding: 4px;
    cursor: pointer
}

.rating-btn:hover.rating-up {
    color: var(--success)
}

.rating-btn:hover.rating-down {
    color: var(--error-red)
}

.rating-number {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    padding: 0 4px
}



.news-highlight {
    margin-bottom: 12px;
    padding: 12px;
    background: var(--info-bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary)
}

.news-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--info-text-dark)
}

.comment-text {
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-words
}

.comment-images {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden
}

.comment-signature {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color)
}

.signature-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic
}

.comment-actions {
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color)
}

.actions-left {
    gap: 16px
}

.more-btn,
.reply-btn {
    display: flex;
    align-items: center;
    background: 0 0;
    color: var(--text-secondary);
    cursor: pointer
}

.reply-btn {
    gap: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500
}

.more-actions {
    position: relative
}

.more-btn {
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    transition: .2s
}

.dropdown-item,
.mass_comments_action input[type=submit].bbcodes {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .2s
}

.more-btn:hover {
    background: var(--light);
    color: var(--text)
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 36px;
    width: 192px;
    background: var(--bg2);
    border-radius: 8px;
    box-shadow: var(--elevated-shadow);
    border: 1px solid var(--border-color);
    z-index: 50
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    color: var(--text);
    background: 0 0;
    border: none;
    text-align: left;
    margin-bottom: 0 !important
}

.dropdown-item:hover {
    background: var(--bg)
}

.dropdown-item.delete {
    color: var(--danger)
}

.dropdown-item.delete:hover {
    background: var(--warning-bg-light)
}

.coment_area:hover .rating-box a {
    opacity: 1
}

.ratingplus {
    background-color: var(--success-bg-light);
    color: var(--success)
}

.ratingminus {
    color: var(--error-red);
    background-color: var(--warning-bg-light)
}

.ratingzero {
    background-color: transparent
}

.actions-left a,
.dropdown-menu a,
.user-name-row a {
    text-decoration: none !important
}

.dropdown-item label {
    position: absolute;
    right: 10px
}

.form-check-label input {
    margin-right: 5px
}

#dlereplypopup form {
    margin-top: 7px
}

li ol li.comments-tree-item {
    margin-left: 50px
}

.mass_comments_action select[name=mass_action] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg2);
    font-size: 14px;
    color: var(--text);
    min-width: 180px;
    transition: border-color .2s
}

.mass_comments_action select[name=mass_action]:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-outline)
}

.mass_comments_action input[type=submit].bbcodes {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px
}

.mass_comments_action input[type=submit].bbcodes:focus {
    outline: 0;
    box-shadow: 0 0 0 3px var(--focus-outline)
}

@media (max-width:640px) {
    .mass_comments_action {
        flex-direction: column;
        align-items: stretch;
        gap: 12px
    }

    .mass_comments_action select[name=mass_action] {
        min-width: auto;
        width: 100%
    }

    .mass_comments_action input[type=submit].bbcodes {
        width: 100%
    }
}

.mass_comments_action {
    text-align: right;
    margin-bottom: 20px
}

.comment-code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

.comment-code pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-code code {
    background: none;
    padding: 0;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Comments Edit Area */
.comments-edit-area {
    background: var(--bg2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.comments-edit-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 12px 12px 0 0;
}

.comments-edit-area:hover {
    box-shadow: var(--elevated-shadow);
    transform: translateY(-2px);
}

/* BB Editor Container */
.comments-edit-area .bb-editor {
    position: relative;
    margin-bottom: 16px;
}

/* Textarea Styling */
.comments-edit-area .bb-editor textarea {
    width: 100% !important;
    min-height: 250px !important;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.comments-edit-area .bb-editor textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

.comments-edit-area .bb-editor textarea:focus {
    border-color: var(--primary);
    background: var(--bg2);
    box-shadow: 0 0 0 4px var(--focus-outline);
    transform: scale(1.01);
}

.comments-edit-area .bb-editor textarea:hover:not(:focus) {
    border-color: var(--border-dark);
    background: var(--bg2);
}

/* Save Buttons Container */
.comments-edit-area .save-buttons {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px;
    padding-top: 16px !important;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
}

/* Button Base Styles */
.comments-edit-area .bbcodes {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    font-family: inherit;
}

.comments-edit-area .bbcodes::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 ease;
}

.comments-edit-area .bbcodes:hover::before {
    left: 100%;
}

/* Cancel Button */
.comments-edit-area .bbcodes.cancelchanges {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border-color);
}

.comments-edit-area .bbcodes.cancelchanges:hover {
    background: var(--border-color);
    border-color: var(--border-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.comments-edit-area .bbcodes.cancelchanges:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Apply Changes Button */
.comments-edit-area .bbcodes.applychanges {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.comments-edit-area .bbcodes.applychanges:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    transform: translateY(-2px);
    box-shadow: var(--elevated-shadow);
}

.comments-edit-area .bbcodes.applychanges:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Focus states for accessibility */
.comments-edit-area .bbcodes:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-outline);
}

/* Loading state animation (optional enhancement) */
.bbcodes.loading {
    pointer-events: none;
    opacity: 0.7;
}

.bbcodes.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 640px) {
    .comments-edit-area {
        padding: 16px;
        margin: 12px 0;
        border-radius: 8px;
    }

    .bb-editor textarea {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 200px !important;
    }

    .save-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .bbcodes {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .save-buttons {
        padding-top: 12px !important;
    }

    .bbcodes {
        min-width: auto;
        padding: 12px 16px;
    }
}

