/* ============================================
   COMMENTS PAGE STYLES - Novix Website
   مینیمال، حرفه‌ای، سریع
   ============================================ */

.comments-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.comment-form-wrapper {
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.comment-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.comment-form h3 {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.comment-form .form-group {
    margin-bottom: 0.7rem;
}

.comment-form .form-group input,
.comment-form .form-group textarea {
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    font-size: clamp(0.8rem, 0.9vw, 0.85rem);
    transition: all var(--transition);
    direction: rtl;
}

.comment-form .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.comment-form .form-group input:focus,
.comment-form .form-group textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form .btn {
    width: 100%;
    justify-content: center;
}

.comment-status {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: clamp(0.75rem, 0.85vw, 0.8rem);
    color: var(--text-secondary);
    min-height: 44px;
}

.comment-status i {
    color: var(--accent-light);
    flex-shrink: 0;
}

.comment-status .status-success {
    color: var(--success);
}
.comment-status .status-error {
    color: var(--danger);
}
.comment-status .status-warning {
    color: var(--warning);
}

.comment-message {
    margin-top: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    display: none;
}

.comment-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.comment-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.comments-list-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-height: 550px;
    overflow-y: auto;
}

.comments-list-wrapper::-webkit-scrollbar {
    width: 3px;
}
.comments-list-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.comments-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.comments-list-header h3 {
    font-size: clamp(0.95rem, 1.1vw, 1rem);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.comment-count {
    font-size: 0.65rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.15rem 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.comment-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.7rem;
    transition: all var(--transition);
}

.comment-item:hover {
    border-color: var(--border-light);
}

.comment-item .comment-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.comment-item .comment-header .comment-name {
    font-weight: 700;
    font-size: clamp(0.9rem, 1vw, 0.95rem);
}

.comment-item .comment-header .comment-username {
    color: var(--accent-light);
    font-size: 0.75rem;
}

.comment-item .comment-header .comment-date {
    color: var(--text-muted);
    font-size: 0.6rem;
    margin-right: auto;
}

.comment-item .comment-text {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 0.95vw, 0.9rem);
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.comment-actions button {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.15rem 0.8rem;
    border-radius: 6px;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Vazirmatn', sans-serif;
    min-height: 30px;
}

.comment-actions .edit-btn:hover {
    background: var(--accent-glow);
    color: var(--accent-light);
    border-color: var(--accent);
}

.comment-actions .delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

.comment-actions .edited-badge {
    font-size: 0.55rem;
    color: var(--text-muted);
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem 0;
    font-size: 0.9rem;
}

.no-comments i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

.loading-spinner {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 2rem 0;
}

/* ===== مودال ویرایش ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    padding: 1.5rem;
    box-shadow: var(--shadow-hover);
    animation: modalFadeIn 0.25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalFadeIn {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: var(--danger);
    transform: rotate(90deg);
}

.modal-body textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
    direction: rtl;
    transition: all var(--transition);
}

.modal-body textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-footer {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.2rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    min-height: 38px;
}

/* ============================================
   RESPONSIVE - COMMENTS
   ============================================ */

@media (max-width: 360px) {
    .comments-container { grid-template-columns: 1fr; gap: 1rem; }
    .comment-form-wrapper { position: static; }
    .comment-form { padding: 1rem; }
    .comments-list-wrapper { padding: 1rem; max-height: 400px; }
    .comment-item { padding: 0.7rem; }
    .comment-item .comment-header { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
    .comment-item .comment-header .comment-date { margin-right: 0; }
    .modal-content { padding: 1rem; }
}

@media (min-width: 361px) and (max-width: 480px) {
    .comments-container { grid-template-columns: 1fr; gap: 1.2rem; }
    .comment-form-wrapper { position: static; }
    .comment-form { padding: 1.2rem; }
    .comments-list-wrapper { padding: 1.2rem; max-height: 450px; }
    .comment-item .comment-header { flex-wrap: wrap; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .comments-container { grid-template-columns: 1fr; gap: 1.2rem; }
    .comment-form-wrapper { position: static; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .comments-container { grid-template-columns: 1fr 1.2fr; gap: 1.2rem; }
}

@media (min-width: 1025px) {
    .comment-form { padding: 2rem; }
    .comments-list-wrapper { padding: 2rem; max-height: 600px; }
}

@media (max-width: 768px) {
    .modal-overlay { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
} 
