/**
 * HuskyNote Main Styles
 * Night theme with gray tones, white text, and dark blue accents
 */

/* Reset and base styles */
* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: #ffffff;
	background-color: #4d4d4d; /* Серый 70% */
}

/* Layout */
.huskynote-container {
	max-width: 100%;
	margin: 0;
	padding: 0;
}

.huskynote-layout {
	display: flex;
	height: calc(100vh - 120px);
	margin-top: 60px;
}

/* Левая колонка - список постов */
.huskynote-sidebar {
	width: 420px;
	min-width: 380px;
	background-color: #333333; /* Серый ~80% */
	border-right: 1px solid #1a1a1a;
	overflow-y: auto;
	overflow-x: hidden;
}

.posts-list {
	padding: 20px 0;
}

.post-card {
	display: flex;
	padding: 15px;
	margin: 0 10px 10px 10px;
	background-color: #3d3d3d; /* Серый ~75% */
	border: 1px solid #2a2a2a;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
	min-height: 120px;
}

.post-card:hover {
	box-shadow: 0 2px 8px rgba(45, 90, 143, 0.5); /* Более светлый темно-синий */
	transform: translateY(-2px);
	background-color: #474747;
}

.post-card.active {
	background-color: #2d5a8f; /* Более светлый темно-синий */
	border-color: #3d6a9f;
	color: #ffffff;
}

.post-thumbnail {
	width: 80px;
	height: 80px;
	min-width: 80px;
	margin-right: 15px;
	border-radius: 4px;
	overflow: hidden;
	background-color: #f0f0f0;
}

.post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-thumbnail.placeholder {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.post-info {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.post-title {
	margin: 0 0 10px 0;
	font-size: 15px;
	font-weight: 500;
	color: #ffffff;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.post-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 12px;
	color: #666;
	margin-top: auto;
}

.post-taxonomies {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.post-date-author {
	display: flex;
	gap: 8px;
	color: #e0e0e0;
	font-size: 11px;
}

.tag {
	background-color: #2d5a8f; /* Более светлый темно-синий */
	padding: 2px 8px;
	border-radius: 3px;
	color: #ffffff;
	font-size: 11px;
}

.post-author,
.post-date {
	color: #e0e0e0;
}

.post-card.active .post-title,
.post-card.active .post-author,
.post-card.active .post-date {
	color: #ffffff;
}

/* Центральная колонка - редактор/просмотр */
.huskynote-editor {
	flex: 1;
	background-color: #3d3d3d; /* Серый ~75% */
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	transition: margin-right 0.3s ease;
}

.huskynote-editor.sidebar-open {
	margin-right: 350px;
}

/* Правая колонка - сайдбар с метаданными */
.post-meta-sidebar {
	width: 350px;
	background-color: #333333; /* Серый ~80% */
	border-left: 1px solid #1a1a1a;
	position: fixed;
	right: -350px;
	top: 60px;
	bottom: 0;
	overflow-y: auto;
	transition: right 0.3s ease;
	z-index: 999;
	color: #ffffff;
}

.post-meta-sidebar.active {
	right: 0;
}

.sidebar-content {
	padding: 20px;
}

.meta-section {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #1a1a1a;
}

.meta-section:last-child {
	border-bottom: none;
}

.meta-section-title {
	font-size: 14px;
	font-weight: 500;
	color: #ffffff;
	margin: 0 0 15px 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.meta-value {
	font-size: 14px;
	color: #e0e0e0;
	margin-bottom: 10px;
}

.meta-list {
	margin-bottom: 10px;
}

.meta-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background-color: #2d5a8f; /* Более светлый темно-синий */
	padding: 4px 8px 4px 10px;
	border-radius: 3px;
	color: #ffffff;
	font-size: 12px;
	margin-right: 5px;
	margin-bottom: 5px;
	position: relative;
}

.meta-tag-remove {
	background: none;
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 0;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 2px;
	transition: background-color 0.2s;
	opacity: 0.8;
	font-size: 14px;
	line-height: 1;
	flex-shrink: 0;
}

.meta-tag-remove:hover {
	background-color: rgba(255, 255, 255, 0.3);
	opacity: 1;
}

.meta-tag-remove::before {
	content: '×';
	font-size: 18px;
	font-weight: bold;
	line-height: 1;
}

.meta-empty {
	color: #cccccc;
	font-style: italic;
	font-size: 13px;
}

.meta-select {
	width: 100%;
	padding: 8px;
	border: 1px solid #1a1a1a;
	border-radius: 4px;
	font-size: 14px;
	margin-bottom: 10px;
	background-color: #4d4d4d; /* Серый 70% */
	color: #ffffff;
	font-family: 'Roboto', sans-serif;
}

.meta-input {
	width: 100%;
	padding: 8px;
	border: 1px solid #1a1a1a;
	border-radius: 4px;
	font-size: 14px;
	margin-bottom: 10px;
	background-color: #4d4d4d; /* Серый 70% */
	color: #ffffff;
	font-family: 'Roboto', sans-serif;
}

.meta-checkboxes {
	margin-bottom: 10px;
}

.meta-checkboxes label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	color: #ffffff;
	cursor: pointer;
}

.meta-checkboxes input[type="checkbox"] {
	margin-right: 8px;
}

.thumbnail-preview {
	margin-bottom: 10px;
	text-align: center;
}

.thumbnail-preview img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
}

.thumbnail-preview .no-thumbnail {
	display: block;
	padding: 40px 20px;
	background-color: #f0f0f0;
	border-radius: 4px;
	color: #999;
	font-size: 13px;
}

.thumbnail-actions {
	display: flex;
	gap: 10px;
}

.button {
	padding: 8px 16px;
	background-color: #2d5a8f; /* Более светлый темно-синий */
	color: #ffffff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	transition: background-color 0.2s;
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
}

.button:hover {
	background-color: #3d6a9f;
}

.button-small {
	padding: 6px 12px;
	font-size: 12px;
}

.editor-wrapper,
.viewer-wrapper {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 40px 60px;
	max-width: 900px;
	margin: 0 auto;
	width: 100%;
}

/* Редактор */
.editor-title {
	width: 100%;
	font-size: 32px;
	font-weight: 500;
	border: none;
	outline: none;
	padding: 10px 0;
	margin-bottom: 20px;
	color: #cccccc !important; /* Серый цвет вместо белого */
	background-color: #3d3d3d !important; /* Серый фон как общий */
	background: transparent !important;
}

.editor-title::placeholder {
	color: #cccccc;
}

.editor-content {
	flex: 1;
	min-height: 400px;
	font-size: 16px;
	line-height: 1.8;
	color: #ffffff;
	border: none;
	outline: none;
	padding: 0;
	background: transparent;
}

.editor-content:empty:before {
	content: attr(placeholder);
	color: #cccccc;
}

/* Всплывающее уведомление о сохранении */
.huskynote-save-notification {
	position: relative;
	margin-bottom: 10px;
	z-index: 10000;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #ffffff;
	opacity: 0;
	transition: all 0.3s ease;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	min-width: 200px;
	text-align: center;
	font-family: 'Roboto', sans-serif;
	display: block;
	width: 100%;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.huskynote-save-notification.show {
	opacity: 1;
	transform: translateY(0);
}

.huskynote-save-notification.saving {
	background-color: #2d5a8f; /* Более светлый темно-синий */
}

.huskynote-save-notification.saved {
	background-color: #4caf50; /* Зеленый для успешного сохранения */
}

.huskynote-save-notification.error {
	background-color: #f44336;
}

/* Индикатор загрузки */
.huskynote-loading-indicator {
	position: relative;
	margin-bottom: 10px;
	z-index: 9999;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #ffffff;
	opacity: 0;
	transition: all 0.3s ease;
	background-color: #2d5a8f;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: 'Roboto', sans-serif;
	width: 100%;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.huskynote-loading-indicator.show {
	opacity: 1;
	transform: translateY(0);
}

.huskynote-loading-indicator .loading-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.huskynote-loading-indicator span {
	display: inline-block;
}

/* Просмотр */
#post-viewer {
	min-height: 400px;
}

.post-viewer-title {
	font-size: 32px;
	font-weight: 500;
	margin-bottom: 20px;
	color: #ffffff;
}

.post-viewer-content {
	font-size: 16px;
	line-height: 1.8;
	color: #ffffff;
}

.post-viewer-content p {
	margin-bottom: 16px;
}

.post-viewer-content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

.select-message {
	text-align: center;
	color: #cccccc;
	font-size: 18px;
	padding: 60px 20px;
}

/* Header */
.site-header {
	background-color: #333333; /* Серый ~80% */
	border-bottom: 1px solid #1a1a1a;
	padding: 15px 30px;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.site-branding {
	flex: 1;
}

.site-title {
	margin: 0;
	font-size: 24px;
}

.site-title a {
	text-decoration: none;
	color: #ffffff;
}

.site-description {
	margin: 5px 0 0 0;
	font-size: 14px;
	color: #e0e0e0;
}

/* Header Actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: 15px;
}

.sidebar-toggle-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px;
	color: #ffffff;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.sidebar-toggle-btn:hover {
	color: #2196F3; /* Ярко-синий */
}

.user-menu-wrapper {
	position: relative;
}

.user-avatar-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	border-radius: 50%;
	overflow: hidden;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s;
}

.user-avatar-btn:hover {
	transform: scale(1.05);
}

.user-avatar-btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.user-menu-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 10px;
	background: #333333; /* Серый ~80% */
	border: 1px solid #1a1a1a;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(30, 58, 95, 0.6);
	padding: 20px;
	min-width: 250px;
	display: none;
	z-index: 1001;
	color: #ffffff;
}

.user-menu-dropdown.login-form {
	min-width: 300px;
}

.user-menu-dropdown.active {
	display: block;
}

.user-menu-avatar {
	text-align: center;
	margin-bottom: 15px;
}

.user-menu-avatar img {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
}

.user-menu-name {
	text-align: center;
	font-size: 18px;
	font-weight: 500;
	color: #ffffff;
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #1a1a1a;
}

.user-menu-link,
.user-menu-logout {
	text-align: center;
	margin-bottom: 10px;
}

.user-menu-link a,
.user-menu-logout a {
	color: #2196F3; /* Ярко-синий */
	text-decoration: none;
	font-size: 14px;
	transition: color 0.2s;
	font-weight: 500;
}

.user-menu-link a:hover,
.user-menu-logout a:hover {
	color: #42A5F5; /* Более светлый ярко-синий */
	text-decoration: underline;
}

/* Форма входа */
.login-title {
	margin: 0 0 20px 0;
	color: #ffffff;
	font-size: 20px;
	font-weight: 500;
	text-align: center;
}

.login-field {
	margin-bottom: 15px;
}

.login-field label {
	display: block;
	margin-bottom: 5px;
	color: #ffffff;
	font-size: 14px;
	font-weight: 400;
}

.login-field input[type="text"],
.login-field input[type="password"] {
	width: 100%;
	padding: 10px;
	border: 1px solid #1a1a1a;
	border-radius: 4px;
	background-color: #4d4d4d; /* Серый 70% */
	color: #ffffff;
	font-size: 14px;
	font-family: 'Roboto', sans-serif;
}

.login-field input[type="text"]:focus,
.login-field input[type="password"]:focus {
	outline: none;
	border-color: #2d5a8f; /* Более светлый темно-синий */
	background-color: #d9d9d9;
}

.login-field input[type="checkbox"] {
	margin-right: 8px;
}

.login-field .button-primary {
	width: 100%;
	padding: 12px;
	background-color: #2d5a8f; /* Более светлый темно-синий */
	color: #ffffff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.2s;
}

.login-field .button-primary:hover {
	background-color: #3d6a9f;
}

.login-register {
	text-align: center;
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #1a1a1a;
}

.login-register a {
	color: #2196F3; /* Ярко-синий */
	text-decoration: none;
	font-size: 13px;
}

.login-register a:hover {
	text-decoration: underline;
}

.guest-avatar {
	background-color: #4d4d4d; /* Серый 70% */
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.guest-avatar .dashicons {
	font-size: 24px;
}

/* Footer */
.site-footer {
	background-color: #333333; /* Серый ~80% */
	border-top: 1px solid #1a1a1a;
	padding: 20px 30px;
	text-align: center;
	font-size: 12px;
	color: #e0e0e0;
}

.site-info a {
	background-color: #2d5a8f; /* Более светлый темно-синий */
	color: #ffffff;
	text-decoration: none;
	padding: 4px 8px;
	border-radius: 3px;
	display: inline-block;
}

.site-info a:hover {
	background-color: #3d6a9f;
	text-decoration: none;
}

/* Все ссылки с ярко-синим фоном */
a {
	color: #ffffff;
	background-color: #2196F3; /* Ярко-синий */
	padding: 2px 6px;
	border-radius: 3px;
	text-decoration: none;
	display: inline-block;
	transition: background-color 0.2s;
}

a:hover {
	background-color: #42A5F5; /* Более светлый ярко-синий */
	color: #ffffff;
	text-decoration: none;
}

/* Исключения для некоторых элементов */
.site-title a,
.user-menu-link a,
.user-menu-logout a,
.login-register a {
	padding: 0;
	background-color: transparent;
}

.site-title a:hover,
.user-menu-link a:hover,
.user-menu-logout a:hover,
.login-register a:hover {
	background-color: transparent;
	text-decoration: underline;
}

.post-viewer-content a {
	padding: 3px 8px;
	margin: 0 2px;
}

.editor-content a {
	padding: 3px 8px;
	margin: 0 2px;
}

/* Scrollbar */
.huskynote-sidebar::-webkit-scrollbar,
.huskynote-editor::-webkit-scrollbar,
.post-meta-sidebar::-webkit-scrollbar {
	width: 8px;
}

.huskynote-sidebar::-webkit-scrollbar-track,
.huskynote-editor::-webkit-scrollbar-track,
.post-meta-sidebar::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.huskynote-sidebar::-webkit-scrollbar-thumb,
.huskynote-editor::-webkit-scrollbar-thumb,
.post-meta-sidebar::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 4px;
}

.huskynote-sidebar::-webkit-scrollbar-thumb:hover,
.huskynote-editor::-webkit-scrollbar-thumb:hover,
.post-meta-sidebar::-webkit-scrollbar-thumb:hover {
	background: #555;
}

/* WordPress Editor Styles */
#post-content-editor-wrapper .wp-editor-container {
	border: 1px solid #1a1a1a;
	border-radius: 4px;
	background-color: #4d4d4d; /* Серый 70% */
}

#post-content-editor-wrapper .mce-toolbar {
	border-bottom: 1px solid #1a1a1a;
}

/* Gutenberg Editor Styles - копируем стили из админки */
.gutenberg-editor-container {
	background-color: #3d3d3d; /* Серый ~75% */
	border-radius: 4px;
	padding: 10px;
	min-height: 400px;
}

.huskynote-block-editor {
	color: #ffffff;
}

/* Применяем стили как в админке */
.huskynote-block-editor.editor-styles-wrapper {
	background-color: #3d3d3d;
	padding: 20px;
	min-height: 400px;
}

.huskynote-block-editor .block-editor-block-list__layout {
	color: #ffffff;
	padding: 20px 0;
}

.huskynote-block-editor .editor-rich-text__editable {
	color: #ffffff;
	background-color: transparent;
	border: none;
	padding: 0;
	margin: 0;
}

/* Стили для блоков как в админке */
.huskynote-block-editor .block-editor-block-list__block {
	margin: 0;
	padding: 0;
	position: relative;
}

.huskynote-block-editor .block-editor-block-list__block.is-selected {
	outline: 1px solid #2d5a8f;
	outline-offset: 2px;
}

/* Кнопки вставки между блоками (как в админке) */
.huskynote-block-editor .block-editor-block-list__insertion-point-indicator {
	background-color: #2d5a8f;
	border-color: #3d6a9f;
}

.huskynote-block-editor .block-editor-block-list__insertion-point-button {
	background-color: #2d5a8f;
	border-color: #3d6a9f;
	color: #ffffff;
}

.huskynote-block-editor .block-editor-block-list__insertion-point-button:hover {
	background-color: #3d6a9f;
}

/* Панель инструментов блока (как в админке) */
.huskynote-block-editor .block-editor-block-toolbar {
	background-color: #333333;
	border: 1px solid #1a1a1a;
	border-radius: 4px;
}

.huskynote-block-editor .block-editor-block-toolbar .components-button {
	color: #ffffff;
}

.huskynote-block-editor .block-editor-block-toolbar .components-button:hover {
	background-color: #2d5a8f;
	color: #ffffff;
}

/* Плавающая панель инструментов */
.huskynote-floating-toolbar {
	position: fixed;
	top: 80px;
	right: 50%;
	transform: translateX(50%);
	z-index: 10000;
	display: flex;
	gap: 8px;
	align-items: center;
}

.huskynote-inserter-button {
	background-color: #2d5a8f !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 50% !important;
	width: 48px !important;
	height: 48px !important;
	min-width: 48px !important;
	padding: 0 !important;
	font-size: 24px !important;
	font-weight: bold !important;
	cursor: pointer !important;
	box-shadow: 0 4px 12px rgba(45, 90, 143, 0.5) !important;
	transition: all 0.2s ease !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.huskynote-inserter-button:hover {
	background-color: #3d6a9f !important;
	transform: scale(1.1);
	box-shadow: 0 6px 16px rgba(45, 90, 143, 0.7) !important;
}

.huskynote-inserter-button.is-pressed {
	background-color: #3d6a9f !important;
}

/* Блок Inserter */
.block-editor-inserter__panel {
	background-color: #333333 !important;
	color: #ffffff !important;
	border: 1px solid #1a1a1a !important;
	border-radius: 8px !important;
	padding: 20px !important;
	position: fixed !important;
	top: 140px !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	max-width: 600px !important;
	width: 90% !important;
	max-height: 70vh !important;
	overflow-y: auto !important;
	z-index: 10001 !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

/* Плавающая панель инструментов для блоков */
.huskynote-block-editor .block-editor-block-contextual-toolbar {
	position: relative !important;
}

.huskynote-block-editor .block-editor-block-toolbar {
	background-color: #333333 !important;
	border: 1px solid #1a1a1a !important;
	border-radius: 8px !important;
	padding: 8px !important;
	display: flex !important;
	gap: 4px !important;
	z-index: 9999 !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	transform: translateY(-100%) !important;
	margin-top: -8px !important;
	margin-bottom: 8px !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Стили для кнопки добавления блока в конце */
.block-list-appender {
	margin: 20px 0 !important;
	padding: 12px 20px !important;
	background-color: #2d5a8f !important;
	color: #ffffff !important;
	border: 1px dashed #3d6a9f !important;
	border-radius: 4px !important;
	cursor: pointer !important;
	text-align: center !important;
	font-size: 14px !important;
	transition: all 0.2s ease !important;
	display: block !important;
	width: 100% !important;
}

.block-list-appender:hover {
	background-color: #3d6a9f !important;
	border-color: #2d5a8f !important;
}

/* Контекстное меню для удаления постов */
.post-context-menu {
	position: fixed;
	background-color: #333333;
	border: 1px solid #1a1a1a;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
	padding: 5px 0;
	min-width: 150px;
	z-index: 10000;
	display: none;
}

.context-menu-item {
	padding: 8px 16px;
	cursor: pointer;
	color: #ffffff;
	font-size: 14px;
	transition: background-color 0.2s;
}

.context-menu-item:hover {
	background-color: #2d5a8f;
}

.context-menu-item.delete-post {
	color: #ff6b6b;
}

.context-menu-item.delete-post:hover {
	background-color: #ff5252;
	color: #ffffff;
}

/* Блок вложений в записи */
.post-attachments-section {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #2a2a2a;
}

.attachments-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	cursor: pointer;
	user-select: none;
	position: relative;
	z-index: 1;
}

/* Заголовок вложений - кликабельная область только для заголовка и кнопки */
.attachments-title {
	margin: 0;
	font-size: 18px;
	font-weight: 500;
	color: #ffffff;
	pointer-events: auto;
}

.attachments-toggle {
	background: none;
	border: none;
	color: #cccccc;
	cursor: pointer;
	padding: 5px;
	font-size: 16px;
	transition: color 0.2s;
}

.attachments-toggle:hover {
	color: #ffffff;
}

.toggle-icon {
	display: inline-block;
	transition: transform 0.2s;
}

.attachments-content {
	margin-top: 15px;
	position: relative;
	z-index: 0;
	pointer-events: auto;
}

.attachments-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.attachment-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 15px;
	background-color: #2a2a2a;
	border-radius: 4px;
	font-size: 14px;
	color: #cccccc;
	transition: background-color 0.2s;
}

.attachment-item:hover {
	background-color: #353535;
}

.attachment-icon {
	width: 24px;
	height: 24px;
	object-fit: contain;
	flex-shrink: 0;
}

.attachment-link {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	color: #2196F3; /* Ярко-синий для ссылок */
	text-decoration: none;
	overflow: hidden;
	background-color: transparent;
	padding: 0;
}

.attachment-link:hover {
	color: #42A5F5; /* Более светлый ярко-синий */
	background-color: transparent;
	text-decoration: underline;
}

.attachment-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.attachment-delete {
	background: none;
	border: none;
	color: #ff6b6b;
	cursor: pointer;
	padding: 5px;
	border-radius: 3px;
	transition: all 0.2s;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.attachment-delete:hover {
	background-color: #ff5252;
	color: #ffffff;
}

.attachment-delete .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

.attachments-empty {
	text-align: center;
	padding: 20px;
	color: #888888;
	font-style: italic;
}

/* Стили для перебивки глобальных стилей Gutenberg */
.block-editor-block-inspector__no-blocks {
	background-color: #3d3d3d !important;
	color: #cccccc !important;
}

/* Responsive */
@media (max-width: 768px) {
	.huskynote-layout {
		flex-direction: column;
		height: calc(100vh - 60px);
		position: relative;
	}

	.huskynote-sidebar {
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 10;
		transition: transform 0.3s ease;
	}

	.huskynote-sidebar.mobile-hidden {
		transform: translateX(-100%);
	}

	.huskynote-editor {
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 20;
		transform: translateX(100%);
		transition: transform 0.3s ease;
	}

	.huskynote-editor.mobile-visible {
		transform: translateX(0);
	}

	.huskynote-editor.sidebar-open {
		margin-right: 0;
	}

	.post-meta-sidebar {
		width: 100%;
		right: -100%;
		top: 60px;
	}

	.post-meta-sidebar.active {
		right: 0;
	}

	.editor-wrapper,
	.viewer-wrapper {
		padding: 20px;
	}

	.header-actions {
		gap: 10px;
	}

}

