/* =========================================================
   Techinio - Modern RTL Comments Section Styles
   ========================================================= */

.tc-comments-wrapper {
    direction: rtl;
    text-align: right;
    margin-top: 32px;
    margin-bottom: 24px;
}

.tc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f2f5;
}

.tc-section-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #222222;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 12px;
    border-right: 4px solid #fc4a00;
}

.tc-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff3ed;
    color: #fc4a00;
    font-size: 13px;
    font-weight: 600;
}

/* Form Card */
.tc-form-card {
    background: #ffffff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.tc-form-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tc-form-intro h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.tc-privacy-note {
    font-size: 12px;
    color: #7f8c8d;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tc-reply-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #fff5f0;
    border: 1px solid #ffd5c2;
    color: #9a3412;
    font-size: 13px;
}

.tc-reply-banner.is-active {
    display: flex;
}

.tc-reply-cancel-btn {
    border: 1px solid #fc4a00;
    background: #ffffff;
    color: #fc4a00;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tc-reply-cancel-btn:hover {
    background: #fc4a00;
    color: #ffffff;
}

.tc-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.tc-required-star {
    color: #e53e3e;
    margin-right: 3px;
}

.tc-char-counter {
    font-size: 11px;
    font-weight: 500;
    color: #8b95a5;
}

.tc-form-card .form-control {
    border: 1px solid #dce1e8;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #222222;
    background-color: #fafbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tc-form-card .form-control:focus {
    background-color: #ffffff;
    border-color: #fc4a00;
    box-shadow: 0 0 0 3px rgba(252, 74, 0, 0.12);
    outline: none;
}

.tc-form-card textarea.form-control {
    min-height: 115px;
    resize: vertical;
    line-height: 1.75;
}

.tc-hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

/* Security Math Captcha & Submit Row */
.tc-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #f0f2f5;
}

.tc-captcha-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: #f8f9fb;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
}

.tc-captcha-label {
    font-size: 13px;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.tc-captcha-label i {
    color: #fc4a00;
}

.tc-captcha-question {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    background: #222222;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    direction: ltr;
    user-select: none;
}

.tc-captcha-input {
    width: 78px !important;
    text-align: center;
    direction: ltr;
    font-weight: 700;
    padding: 6px 8px !important;
    height: 36px;
}

.tc-captcha-refresh {
    border: 1px solid #d5dbe3;
    background: #ffffff;
    color: #4b5563;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tc-captcha-refresh:hover {
    color: #fc4a00;
    border-color: #fc4a00;
    background: #fff5f0;
}

.tc-captcha-refresh.is-spinning i {
    animation: tcSpin 0.6s linear infinite;
}

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

.tc-submit-btn {
    background-color: #fc4a00;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 26px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease, transform 0.15s ease;
    min-width: 140px;
}

.tc-submit-btn:hover:not(:disabled) {
    background-color: #e04200;
    transform: translateY(-1px);
}

.tc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tc-feedback-box {
    display: none;
    margin-top: 14px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.6;
}

.tc-feedback-box.is-visible {
    display: flex;
    align-items: center;
    gap: 9px;
}

.tc-feedback-box.is-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.tc-feedback-box.is-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Comments List */
.tc-empty-state {
    background: #fafbfc;
    border: 1px dashed #d5dce4;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    color: #6b7280;
}

.tc-empty-state i {
    font-size: 32px;
    color: #cbd5e1;
    margin-bottom: 10px;
    display: block;
}

.tc-empty-state p {
    margin: 0;
    font-size: 14px;
}

.tc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tc-thread {
    margin-bottom: 18px;
}

.tc-item {
    background: #ffffff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    padding: 18px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tc-item:hover {
    border-color: #d6dde6;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

/* Distinct Admin / Editorial Styling */
.tc-item--admin {
    background: linear-gradient(135deg, #fffaf7 0%, #fff4ee 100%);
    border: 1px solid #ffd5c2;
    border-right: 4px solid #fc4a00;
}

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

.tc-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #edf2f7;
    color: #374151;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
}

.tc-item--admin .tc-avatar {
    background: linear-gradient(135deg, #fc4a00 0%, #ff7b3b 100%);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(252, 74, 0, 0.28);
}

.tc-author-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

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

.tc-author-name {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.tc-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #fc4a00;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.tc-comment-date {
    font-size: 12px;
    color: #8a94a6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tc-item-body {
    font-size: 14.5px;
    line-height: 1.85;
    color: #374151;
    word-break: break-word;
    margin-bottom: 12px;
}

.tc-item-body p {
    margin: 0;
}

.tc-item-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.tc-reply-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #4b5563;
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.tc-reply-btn:hover {
    color: #fc4a00;
    border-color: #fc4a00;
    background: #fff5f0;
}

/* Nested Replies */
.tc-replies {
    list-style: none;
    padding: 0 18px 0 0;
    margin: 12px 22px 0 0;
    border-right: 2px solid #e5e9f0;
}

.tc-replies li {
    margin-bottom: 10px;
}

.tc-replies li:last-child {
    margin-bottom: 0;
}

.tc-replies .tc-item {
    padding: 15px 17px;
    background: #fafbfd;
}

.tc-replies .tc-item--admin {
    background: linear-gradient(135deg, #fffaf7 0%, #fff3ec 100%);
}

@media (max-width: 576px) {
    .tc-form-card {
        padding: 16px;
    }

    .tc-item {
        padding: 14px 15px;
    }

    .tc-replies {
        margin-right: 10px;
        padding-right: 12px;
    }

    .tc-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .tc-captcha-box {
        justify-content: space-between;
    }

    .tc-submit-btn {
        width: 100%;
    }
}
