/* ── Poznámky ────────────────────────────────────────────────────────────────── */

.notes-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 2rem;
}

.notes-section-card {
  background: var(--bg2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notes-section-card:hover {
  border-color: rgba(167, 139, 250, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.notes-section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent2); /* Jantarově zlatá pro sekce */
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notes-char-switcher-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notes-char-switcher-inline label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}

.notes-char-switcher-inline select {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.notes-char-switcher-inline select:focus {
  border-color: var(--accent);
}

.notes-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}

.notes-tab {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
}

.notes-tab:hover {
  color: var(--text);
}

.notes-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
}

.notes-panels {
  position: relative;
}

.notes-panel {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}

.notes-panel.active {
  display: flex;
}

.notes-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 0.25rem;
}

.notes-textarea {
  width: 100%;
  height: 160px;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: var(--transition);
}

.notes-textarea:focus {
  border-color: var(--accent);
  background: var(--input-bg-focus);
  box-shadow: 0 0 8px var(--accent-glow);
}

.notes-textarea[readonly] {
  background: var(--input-bg);
  opacity: 0.65;
  color: var(--text-dim);
  cursor: not-allowed;
  border-style: dashed;
}

.notes-status-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 1rem;
}

.notes-status {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
  transition: opacity 0.3s;
}

.notes-hidden {
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

/* ── Společný deník ── */
.diary-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-bottom: 0.5rem;
}

/* Custom scrollbar for diary list */
.diary-list::-webkit-scrollbar {
  width: 6px;
}
.diary-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}
.diary-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.diary-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.diary-entry {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: var(--transition);
}

.diary-entry:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(167, 139, 250, 0.15);
}

.diary-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.3rem;
}

.diary-entry-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.diary-entry-author {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent2);
}

.diary-entry-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.diary-entry-actions {
  display: flex;
  gap: 0.25rem;
}

.diary-entry-content {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.diary-edit-form, .diary-add-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Badge notifikace pro poznámky */
.badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 6px #ef4444;
  animation: pulseBadge 2s infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.badge-dot-small {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 4px #ef4444;
  animation: pulseBadge 2s infinite;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.badge-dot.hidden, .badge-dot-small.hidden {
  display: none !important;
}

/* ── Formátovací lišta (Toolbar) ────────────────────────────────────────── */
.notes-textarea-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

.notes-textarea-container .notes-textarea {
  border-radius: 0 0 6px 6px;
  border-top: none;
  margin-bottom: 0;
}

.notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

.notes-btn-tool {
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text);
  padding: 0.2rem 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  min-width: 1.6rem;
  height: 1.6rem;
}

.notes-btn-tool:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

html.theme-light .notes-btn-tool:hover,
html.theme-colorful-light .notes-btn-tool:hover,
html.theme-honzikova .notes-btn-tool:hover {
  background: rgba(0, 0, 0, 0.05);
}

.notes-toolbar-divider {
  width: 1px;
  height: 1.2rem;
  background: var(--border);
  margin: 0 0.25rem;
}

/* ── Zobrazení formátovaného obsahu ──────────────────────────────────────── */
.note-list {
  padding-left: 1.5rem;
  margin: 0.4rem 0;
}

ul.note-list {
  list-style-type: disc;
}

ol.note-list {
  list-style-type: decimal;
}

.note-list li {
  margin-bottom: 0.2rem;
}

.note-image-container {
  display: block;
  margin: 0.75rem 0;
}

.note-inserted-image {
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.1);
  cursor: zoom-in;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.note-inserted-image:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.notes-textarea.drag-active {
  border-color: var(--accent2) !important;
  background: rgba(167, 139, 250, 0.05) !important;
}

