/**
 * Стили компонентов комментирования (Класс Comments)
 * Включает: форму добавления комментария, публичный список с таймлайном, карточки авторов и админ-таблицу модерации
 */

/* ==========================================================================
   1. Форма добавления комментария (form.view)
   ========================================================================== */
.comment-form-box {
	margin: 1.5rem 0;
	font-family: inherit;
}
.comment-status {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 1rem 1.25rem;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
}
.comment-status--closed {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #475569;
}
.comment-status--auth {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1e40af;
	flex-direction: column;
	align-items: flex-start;
}
.comment-status--forbidden {
	background: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}
.comment-status p {
	margin: 0.25rem 0 0;
	font-size: 0.9rem;
}
.comment-form {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 1.25rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.comment-form__label {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	color: #1e293b;
	margin-bottom: 0.5rem;
}
.comment-form__textarea {
	width: 100%;
	min-height: 90px;
	padding: 0.75rem 1rem;
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.5;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	box-sizing: border-box;
	resize: vertical;
	transition: border-color 0.15s ease-in-out;
}
.comment-form__textarea:focus {
	outline: none;
	border-color: #16a34a;
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}
.comment-form__footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 0.75rem;
}
.comment-form__counter {
	font-size: 0.8rem;
	color: #94a3b8;
}
.comment-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.65rem 1.4rem;
	font-size: 0.95rem;
	font-weight: 700;
	border-radius: 30px;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none !important;
	transition: all 0.2s ease-in-out;
	background-color: #16a34a;
	color: #ffffff !important;
	box-sizing: border-box;
}
.comment-btn:hover {
	background-color: #15803d;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}
.comment-btn--primary {
	background-color: #16a34a;
	color: #ffffff !important;
}
.comment-btn--primary:hover {
	background-color: #15803d;
}
.comment-btn--submit {
	background-color: #16a34a;
	color: #ffffff !important;
}
.comment-btn--submit:hover {
	background-color: #15803d;
}

/* ==========================================================================
   2. Публичный список комментариев (list.view)
   ========================================================================== */
.comments-list-wrapper {
	margin: 2rem 0;
	font-family: inherit;
}
.comments-list-header {
	display: flex;
	align-items: center;
	border-bottom: 2px solid #e2e8f0;
	padding-bottom: 0.75rem;
	margin-bottom: 1.25rem;
}
.comments-list-header__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
}
.comments-list-header__count {
	font-size: 1.05rem;
	font-weight: 500;
	color: #64748b;
}
.comments-list-empty {
	padding: 2rem;
	text-align: center;
	color: #64748b;
	background: #f8fafc;
	border-radius: 8px;
	border: 1px dashed #cbd5e1;
}
.comments-timeline {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.comment-card {
	display: flex;
	gap: 1rem;
	padding: 1.25rem;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	transition: all 0.2s ease-in-out;
}
.comment-card--unpublished {
	background: #fffdf7;
	border: 1px dashed #f59e0b;
}
.comment-card__author-group {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.comment-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.2rem 0.6rem;
	border-radius: 20px;
	line-height: 1.2;
}
.comment-badge--admin {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
}
.comment-badge--pending {
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fde68a;
}
.comment-avatar-img {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 1px solid #e2e8f0;
}
.comment-avatar-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #e0e7ff;
	color: #3730a3;
	font-weight: 700;
	font-size: 1.1rem;
	text-transform: uppercase;
}
.comment-card__content {
	flex: 1;
	min-width: 0;
}
.comment-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.5rem;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.comment-card__author {
	font-weight: 600;
	color: #0f172a;
	font-size: 0.95rem;
}
.comment-card__meta-right {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-left: auto;
}
.comment-del-form {
	display: inline-flex;
	margin: 0;
	padding: 0;
}
.comment-author-btn-del {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.2rem 0.65rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: #dc2626;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 20px;
	cursor: pointer;
	line-height: 1.2;
	transition: all 0.15s ease-in-out;
}
.comment-author-btn-del:hover {
	background: #dc2626;
	color: #ffffff;
	border-color: #dc2626;
}
.comment-author-btn-del svg {
	flex-shrink: 0;
}
.comment-card__time {
	font-size: 0.8rem;
	color: #94a3b8;
}
.comment-card__text {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #334155;
	word-break: break-word;
}
.comments-pagination {
	margin-top: 1.5rem;
	display: flex;
	justify-content: center;
}
.comments-pagination__list {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 0.35rem;
}
.comments-pagination__item a,
.comments-pagination__item span {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	border-radius: 30px;
	border: 1px solid #e2e8f0;
	text-decoration: none;
	font-size: 0.875rem;
	color: #334155;
	transition: all 0.2s ease-in-out;
}
.comments-pagination__item a:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
}
.comments-pagination__item--active span {
	background: #16a34a;
	color: #ffffff;
	border-color: #16a34a;
	font-weight: 700;
}

/* ==========================================================================
   3. Админ-панель модерации комментариев (list_admin.view)
   ========================================================================== */
.comments-admin-wrapper {
	margin: 2rem 0;
	padding: 1.25rem;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	font-family: inherit;
	box-sizing: border-box;
	width: 100%;
}
.comments-admin-badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	background: #fef3c7;
	color: #92400e;
	margin-right: 0.5rem;
	vertical-align: middle;
}
.comments-admin-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 2px solid #e2e8f0;
	padding-bottom: 0.75rem;
	margin-bottom: 1rem;
}
.comments-admin-header__title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: #0f172a;
}
.comments-admin-header__count {
	font-size: 0.95rem;
	font-weight: 500;
	color: #64748b;
}
.comments-admin-table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.comments-admin-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	text-align: left;
}
.comments-admin-table th {
	background: #f8fafc;
	color: #475569;
	font-weight: 600;
	padding: 0.6rem 0.65rem;
	border-bottom: 2px solid #e2e8f0;
	white-space: nowrap;
}
.comments-admin-table td {
	padding: 0.65rem 0.65rem;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}
.row-hidden {
	background: #fffdf5;
}
.col-id {
	width: 35px;
	color: #94a3b8;
	font-size: 0.8rem;
	text-align: center;
}
.col-author {
	width: 145px;
}
.author-sub {
	font-size: 0.75rem;
	color: #64748b;
}
.col-message {
	min-width: 120px;
	word-break: break-word;
}
.comment-text-preview {
	max-height: 100px;
	overflow-y: auto;
	line-height: 1.45;
	color: #334155;
	font-size: 0.85rem;
}
.col-date {
	width: 80px;
	font-size: 0.75rem;
	color: #64748b;
	white-space: nowrap;
}
.col-status {
	width: 90px;
	text-align: center;
	white-space: nowrap;
}
.status-badge {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0.2rem 0.45rem;
	border-radius: 4px;
	white-space: nowrap;
}
.status-badge--published {
	background: #dcfce7;
	color: #15803d;
}
.status-badge--hidden {
	background: #fee2e2;
	color: #b91c1c;
}
.col-ip {
	width: 85px;
	font-size: 0.72rem;
}
.col-ip code {
	background: #f1f5f9;
	padding: 0.1rem 0.25rem;
	border-radius: 3px;
	font-size: 0.72rem;
	display: inline-block;
}
.ua-preview {
	font-size: 0.7rem;
	color: #94a3b8;
	margin-top: 0.15rem;
}
.col-actions {
	width: 175px;
	min-width: 175px;
	text-align: right;
	white-space: nowrap;
}
.comments-adm-actions {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 0.4rem !important;
	white-space: nowrap !important;
}
.comments-adm-form {
	display: inline-block !important;
	margin: 0 !important;
	padding: 0 !important;
}
.admin-author-box {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.admin-author-avatar {
	flex-shrink: 0;
}
.admin-avatar-img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 1px solid #e2e8f0;
}
.admin-avatar-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #e0e7ff;
	color: #3730a3;
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
}
.admin-author-info {
	min-width: 0;
	line-height: 1.25;
}
.admin-author-info strong {
	font-size: 0.85rem;
	display: block;
	word-break: break-word;
}
.comments-adm-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	min-width: 72px !important;
	max-width: none !important;
	height: auto !important;
	flex: 0 0 auto !important;
	padding: 0.35rem 0.8rem !important;
	font-family: inherit !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	border-radius: 30px !important;
	border: 1px solid transparent !important;
	cursor: pointer !important;
	white-space: nowrap !important;
	text-decoration: none !important;
	line-height: 1.2 !important;
	box-sizing: border-box !important;
	transition: all 0.15s ease-in-out !important;
}
.comments-adm-btn--hide {
	background-color: #fef3c7 !important;
	color: #92400e !important;
	border-color: #fde68a !important;
}
.comments-adm-btn--hide:hover {
	background-color: #fde68a !important;
	color: #78350f !important;
}
.comments-adm-btn--show {
	background-color: #16a34a !important;
	color: #ffffff !important;
	border-color: #16a34a !important;
}
.comments-adm-btn--show:hover {
	background-color: #15803d !important;
	border-color: #15803d !important;
	color: #ffffff !important;
}
.comments-adm-btn--del {
	background-color: #fee2e2 !important;
	color: #b91c1c !important;
	border-color: #fca5a5 !important;
}
.comments-adm-btn--del:hover {
	background-color: #dc2626 !important;
	border-color: #dc2626 !important;
	color: #ffffff !important;
}

/* ==========================================================================
   Адмін-панель у блоках виводу коментарів
   ========================================================================== */
.comment-form-admin-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px dashed #cbd5e1;
}
.comment-admin-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	color: #1e293b !important;
	background-color: #f1f5f9;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	text-decoration: none !important;
	transition: all 0.15s ease-in-out;
}
.comment-admin-btn:hover {
	background-color: #e2e8f0;
	color: #0f172a !important;
	border-color: #94a3b8;
}
.comment-admin-btn svg {
	color: #3b82f6;
	flex-shrink: 0;
}
.comment-admin-btn--osx {
	background-color: #f8fafc;
	color: #475569 !important;
}
.comment-admin-btn--osx:hover {
	background-color: #ede9fe;
	color: #6d28d9 !important;
	border-color: #c4b5fd;
}
.comments-list-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}
.comments-list-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}
.comment-admin-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	color: #475569 !important;
	background-color: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	text-decoration: none !important;
	transition: all 0.15s ease-in-out;
}
.comment-admin-link:hover {
	background-color: #f1f5f9;
	color: #1e293b !important;
	border-color: #cbd5e1;
}
.comment-admin-link svg {
	color: #3b82f6;
}
.comment-admin-link--osx:hover {
	background-color: #ede9fe;
	color: #6d28d9 !important;
	border-color: #c4b5fd;
}

