.custom-comment {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.custom-comment-title {
    margin: 0;
    color: #333;
}

.custom-comment-count {
    color: #666;
    font-size: 14px;
}

.custom-comment-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin-bottom: 10px;
}

    .custom-comment-item:last-child {
        border-bottom: none;
    }

.custom-comment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 5px;
}

.custom-comment-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.custom-comment-user-name {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.custom-comment-date {
    color: #999;
    font-size: 12px;
}

.custom-comment-item-title {
    color: #444;
    margin: 5px 0 10px 0;
    font-size: 16px;
}

.custom-comment-item-message {
    color: #666;
    margin: 0;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.custom-comment-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-inline-end: 5px;
    display: inline-block;
}

.custom-comment-badge-secondary {
    background-color: #6c757d;
    color: #fff;
}

.custom-comment-badge-success {
    background-color: #28a745;
    color: #fff;
}

.custom-comment-attachment {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    display: inline-block;
}

.custom-comment-attachment-link {
    color: #007bff;
    text-decoration: none;
}

.custom-comment-replies {
    margin-top: 15px;
    padding-inline-end: 10px;
    margin-inline-end: 10px;
}

.custom-comment-reply {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-inline-start: 3px solid #007bff;
}

.custom-comment-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap: 5px;
}

.custom-comment-reply-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.custom-comment-reply-user-name {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.custom-comment-reply-to {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 2px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 100%;
}

.custom-comment-reply-to-name {
    color: #007bff;
    font-weight: 600;
}

.custom-comment-reply-to-summary {
    color: #888;
    font-style: italic;
    font-size: 11px;
    direction: rtl;
    display: inline-block;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-comment-reply-date {
    color: #999;
    font-size: 11px;
}

.custom-comment-reply-message-text {
    margin: 0;
    color: #555;
    white-space: pre-wrap;
    word-break: break-word;
}

.custom-comment-reply-level {
    margin-top: 10px;
    padding-inline-start: 10px;
    border-inline-start: 2px dashed #d0d0d0;
    margin-inline-start: 5px;
}

    .custom-comment-reply-level .custom-comment-reply {
        background: #f8f9fa;
        border-inline-start-color: #007bff;
    }

.custom-comment-actions {
    margin-top: 10px;
}

.custom-comment-reply-btn {
    color: #007bff;
    padding: 0;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
}

    .custom-comment-reply-btn:hover {
        text-decoration: underline;
    }

.custom-comment-empty {
    text-align: center;
    padding: 30px 0;
    color: #999;
}

.custom-comment-empty-text {
    margin: 0;
}

.custom-comment-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.custom-comment-form-title {
    margin-bottom: 20px;
    color: #333;
}

.custom-comment-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.custom-comment-form-col-12,
.custom-comment-form-col-md-6,
.custom-comment-form-col-md-12 {
    padding: 0 10px;
    width: 100%;
}

.custom-comment-form-col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.custom-comment-form-col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.custom-comment-form-mb-3 {
    margin-bottom: 15px;
}

.custom-comment-form-group {
    margin-bottom: 15px;
}

.custom-comment-form-label {
    display: inline-block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.custom-comment-form-text-muted {
    color: #6c757d;
    margin: 0;
}

.custom-comment-form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-comment-form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.custom-comment-form-check-label {
    cursor: pointer;
    color: #333;
}

.custom-comment-btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    margin: 0 5px 5px 0;
}

.custom-comment-btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

    .custom-comment-btn-primary:hover {
        background-color: #0069d9;
        border-color: #0062cc;
    }

.custom-comment-btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

    .custom-comment-btn-secondary:hover {
        background-color: #5a6268;
        border-color: #545b62;
    }

.custom-comment-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.custom-comment-reply-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 4px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    display: none;
}

.custom-comment-alert {
    padding: 12px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.custom-comment-alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.custom-comment-alert-link {
    color: #856404;
    font-weight: 600;
}

.custom-comment-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: custom-comment-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-inline-start: 5px;
}

@keyframes custom-comment-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.custom-comment-text-danger {
    color: #dc3545;
}

@media (max-width: 768px) {
    .custom-comment-item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .custom-comment-replies {
        padding-inline-end: 5px;
        margin-inline-end: 5px;
    }

    .custom-comment-reply-level {
        padding-inline-end: 5px;
        margin-inline-end: 5px;
    }

    .custom-comment {
        padding: 15px;
    }

    .custom-comment-form-col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .custom-comment-btn {
        width: 100%;
        margin: 5px 0;
    }

    .custom-comment-reply-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .custom-comment-reply-to {
        font-size: 11px;
        padding: 2px 8px;
    }

    .custom-comment-reply-to-summary {
        max-width: 120px;
        font-size: 10px;
    }
}

[data-theme="dark"] .custom-comment {
    background: #1a1a2e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

[data-theme="dark"] .custom-comment-header {
    border-bottom-color: #2d2d44;
}

[data-theme="dark"] .custom-comment-title {
    color: #e0e0e0;
}

[data-theme="dark"] .custom-comment-count {
    color: #999;
}

[data-theme="dark"] .custom-comment-item {
    border-bottom-color: #2d2d44;
}

[data-theme="dark"] .custom-comment-user-name {
    color: #e0e0e0;
}

[data-theme="dark"] .custom-comment-date {
    color: #afadad;
}

[data-theme="dark"] .custom-comment-item-title {
    color: #ccc;
}

[data-theme="dark"] .custom-comment-item-message {
    color: #aaa;
}

[data-theme="dark"] .custom-comment-badge-secondary {
    background-color: #444;
    color: #ddd;
}

[data-theme="dark"] .custom-comment-badge-success {
    background-color: #1a7a2a;
    color: #ddd;
}

[data-theme="dark"] .custom-comment-attachment {
    background: #2d2d44;
}

[data-theme="dark"] .custom-comment-attachment-link {
    color: #4da6ff;
}

[data-theme="dark"] .custom-comment-reply {
    background: #16213e;
    border-inline-start-color: #4da6ff;
}

[data-theme="dark"] .custom-comment-reply-user-name {
    color: #e0e0e0;
}

[data-theme="dark"] .custom-comment-reply-to {
    color: #aaa;
    background: #2d2d44;
}

[data-theme="dark"] .custom-comment-reply-to-name {
    color: #4da6ff;
}

[data-theme="dark"] .custom-comment-reply-to-summary {
    color: #888;
}

[data-theme="dark"] .custom-comment-reply-date {
    color: #afadad;
}

[data-theme="dark"] .custom-comment-reply-message-text {
    color: #bbb;
}

[data-theme="dark"] .custom-comment-reply-level {
    border-inline-end-color: #3d3d5a;
}

    [data-theme="dark"] .custom-comment-reply-level .custom-comment-reply {
        background: #1a1a2e;
        border-inline-start-color: #4da6ff;
    }

[data-theme="dark"] .custom-comment-reply-btn {
    color: #4da6ff;
}

[data-theme="dark"] .custom-comment-empty {
    color: #afadad;
}

[data-theme="dark"] .custom-comment-form {
    border-top-color: #2d2d44;
}

[data-theme="dark"] .custom-comment-form-title {
    color: #e0e0e0;
}

[data-theme="dark"] .custom-comment-form-label {
    color: #ccc;
}

[data-theme="dark"] .custom-comment-form-text-muted {
    color: #888;
}

[data-theme="dark"] .custom-comment-form-check-label {
    color: #ccc;
}

[data-theme="dark"] .custom-comment-btn-primary {
    background-color: #0066cc;
    border-color: #0066cc;
}

    [data-theme="dark"] .custom-comment-btn-primary:hover {
        background-color: #0055aa;
        border-color: #0055aa;
    }

[data-theme="dark"] .custom-comment-btn-secondary {
    background-color: #444;
    border-color: #444;
}

    [data-theme="dark"] .custom-comment-btn-secondary:hover {
        background-color: #555;
        border-color: #555;
    }

[data-theme="dark"] .custom-comment-reply-message {
    background: #1a3a4a;
    border-color: #1a5a6a;
    color: #8ad4e0;
}

[data-theme="dark"] .custom-comment-alert-warning {
    color: #d4a84a;
    background-color: #2d2a1a;
    border-color: #4d4a2a;
}

[data-theme="dark"] .custom-comment-alert-link {
    color: #d4a84a;
}

[data-theme="dark"] .custom-comment-text-danger {
    color: #e65a5a;
}
