/* termostok-comments-wrapper */
.termostok-comments-wrapper {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
    max-width: 1000px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    color: #333;
}

.tc-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.tc-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #111;
}

.tc-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0 0 20px 0;
}

.tc-btn-primary, .tc-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    gap: 8px;
}

.tc-btn-primary {
    background: #007bff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.tc-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

.tc-btn-primary svg {
    width: 18px;
    height: 18px;
}

.tc-btn-secondary {
    background: #f0f2f5;
    color: #444;
}

.tc-btn-secondary:hover {
    background: #e2e5e9;
}

/* Form Container */
.tc-form-container {
    display: none;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #eaeaea;
    animation: slideDown 0.3s ease-out forwards;
}

.tc-form-container.active {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tc-form-group {
    margin-bottom: 15px;
}

.tc-input, .tc-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.tc-textarea {
    resize: vertical;
    min-height: 100px;
}

.tc-input:focus, .tc-textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.tc-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Threads layout */
.tc-threads {
    position: relative;
}

.tc-thread-list {
    position: relative;
}

.tc-thread-list.level-0 > .tc-comment-node {
    margin-bottom: 24px;
}

.tc-comment-node {
    position: relative;
    margin-top: 16px;
}

.tc-thread-list:not(.level-0) {
    margin-left: 30px;
    padding-left: 20px;
    border-left: 2px solid #e0e4e8;
}

/* Connecting lines for children */
.tc-thread-line {
    position: absolute;
    left: -22px;
    top: 24px;
    width: 20px;
    height: 2px;
    background-color: #e0e4e8;
    border-radius: 0 4px 4px 0;
}

/* Comment Card */
.tc-comment-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 16px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tc-comment-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border-color: #ddd;
}

.tc-comment-card.tc-is-admin {
    border-left: 4px solid #007bff;
    background: #fcfdfe;
}

.tc-comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.tc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}

.tc-avatar-user {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    color: #2b5c9c;
}

.tc-avatar-admin {
    background: linear-gradient(135deg, #007bff 0%, #00d2ff 100%);
}

.tc-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tc-author {
    font-weight: 600;
    font-size: 15px;
    color: #222;
}

.tc-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tc-badge-admin {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.tc-badge-user {
    background: #f0f2f5;
    color: #666;
}

.tc-date {
    font-size: 13px;
    color: #999;
}

.tc-comment-body {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 12px;
}

.tc-comment-body p {
    margin: 0 0 10px 0;
}

.tc-comment-body p:last-child {
    margin-bottom: 0;
}

.tc-comment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tc-btn-reply {
    background: none;
    border: none;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: -8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.tc-btn-reply:hover {
    background: #f0f2f5;
    color: #007bff;
}

.tc-stats {
    display: flex;
    gap: 16px;
    color: #999;
    font-size: 13px;
    align-items: center;
}

.tc-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tc-stat svg {
    width: 14px;
    height: 14px;
}

.tc-empty-state {
    text-align: center;
    padding: 40px;
    color: #888;
    background: #f8f9fa;
    border-radius: 8px;
    font-style: italic;
}
