/* nest.css - стили для страницы Гнездо */

/* Reduce spacing between title and content on Nest page */
#header-container {
  margin-bottom: 12px;
  align-items: flex-start;
  text-align: left;
}

.nest-description {
  text-align: left;
}

/* Telegram Auth container styling for Nest page */
#telegram-auth-container {
  /* Переопределяем fixed позицию из telegramAuth.css */
  position: static;
  /* Убираем позиционирование справа */
  top: auto;
  right: auto;
  /* Располагаем под текстом */
  margin-top: 24px;
  margin-bottom: 48px;
  /* Убираем центрирование */
  display: block;
}

/* My Chat Button - переопределяем стили для страницы Гнездо */
#telegram-auth-container .my-chat-button {
  /* Переопределяем стили из telegramAuth.css */
  display: inline-block;
  background: var(--color-iris);
  color: var(--color-cloud-light);
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-family: 'Ubuntu Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
  opacity: 0.9;
  text-decoration: none;
}

#telegram-auth-container .my-chat-button:hover {
  opacity: 1;
}

/* Inline editing styles for nest title */
h1[contenteditable="true"] {
  outline: none;
}

h1 .editable-name {
  background: rgba(124, 119, 238, 0.1);
  border-radius: 3px;
  transition: background 0.2s ease;
  outline: none;
}

h1 .editable-name:focus {
  background: rgba(124, 119, 238, 0.15);
  outline: none;
}

/* Telegraph-style Editor.js */
#nest-editor-container {
  max-width: 980px;
  margin: 20px 0 60px 0;
  padding: 0;
}

#nest-editor {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.6;
  color: #222;
  min-height: 300px;
}

/* Editor.js core styles */
.codex-editor {
  border: none !important;
}

.codex-editor__redactor {
  padding-bottom: 100px !important;
}

.ce-block__content {
  max-width: 980px;
  margin: 0;
}

/* Hide settings button and tune menu in read-only */
.codex-editor--narrow .ce-toolbar__plus,
.codex-editor--narrow .ce-toolbar__settings-btn {
  display: none;
}

/* Paragraph */
.ce-paragraph {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.6;
  color: #222;
  margin: 0.2em 0;
}

/* Headers */
.ce-header {
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
  color: #222;
}

h1.ce-header {
  font-size: 36px;
  letter-spacing: -0.02em;
}

h2.ce-header {
  font-size: 28px;
}

h3.ce-header {
  font-size: 22px;
}

/* Lists */
.cdx-list {
  padding-left: 1.5em;
  margin: 1em 0;
}

.cdx-list__item {
  padding: 0.3em 0;
  line-height: 1.6;
}

/* Quote */
.cdx-quote {
  margin: 1.5em 0;
  padding-left: 1.2em;
  border-left: 3px solid var(--color-iris);
}

.cdx-quote__text {
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: #666;
  min-height: auto;
}

.cdx-quote__caption {
  margin-top: 0.5em;
  font-size: 14px;
  color: #999;
  text-align: right;
}

/* Delimiter */
.ce-delimiter {
  line-height: 1.6em;
  width: 100%;
  text-align: center;
  margin: 2em 0;
}

.ce-delimiter::before {
  display: inline-block;
  content: "***";
  font-size: 28px;
  line-height: 65px;
  height: 30px;
  letter-spacing: 0.2em;
  color: #999;
}

/* Inline code */
.cdx-inline-code {
  background: rgba(124, 119, 238, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 16px;
  color: var(--color-iris);
}

/* Toolbar customization */
.ce-toolbar__plus {
  left: -40px;
  color: #999;
}

.ce-toolbar__plus:hover {
  color: var(--color-iris);
}

.ce-toolbar__settings-btn {
  color: #999;
}

.ce-toolbar__settings-btn:hover {
  color: var(--color-iris);
}

/* Inline toolbar */
.ce-inline-toolbar {
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ce-inline-tool {
  color: #666;
}

.ce-inline-tool:hover {
  color: var(--color-iris);
  background: rgba(124, 119, 238, 0.05);
}

/* Placeholder */
.ce-block--empty .ce-block__content::before {
  color: #999;
  font-style: italic;
}

/* Links */
.ce-paragraph a,
.cdx-list a,
.cdx-quote__text a {
  color: var(--color-iris);
  text-decoration: none;
  border-bottom: 1px solid rgba(124, 119, 238, 0.3);
  transition: border-color 0.2s;
}

.ce-paragraph a:hover,
.cdx-list a:hover,
.cdx-quote__text a:hover {
  border-bottom-color: var(--color-iris);
}
