﻿/* Pantalla principal de CuaderNOTE según el boceto aprobado (official-library-interface.jpg):
   fondo oscuro, botón "Crear nuevo contenido", fichas de filtro, cuadrícula de tarjetas
   compactas (ilustración, ★ ♥ ⋯ 🗑, nombre y tipo) y barra inferior con el + central.
   El encabezado de CuaderNOTE (.notebooks-hero) no se modifica. */

/* ---------- Fondo ---------- */
body.cuadernote-exclusive .app-shell {
  background: radial-gradient(130% 55% at 50% 0%, #10231b 0%, #121b42 52%, #0f173c 100%) !important;
}
body.cuadernote-exclusive .app-shell::before { opacity: .35; }

body #view-notes .notebooks-summary { color: #8a9b94; font-size: 11px; }
body #view-notes .notebooks-summary span { color: inherit; }

/* ---------- Botón principal, agenda y filtros ---------- */
body #view-notes .library-mockup-bar { display: grid; gap: 12px; margin: 10px 0 14px; }
body #view-notes .library-mockup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
body #view-notes .library-create-pill {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px 0 16px;
  border: 0;
  border-radius: 27px;
  background: linear-gradient(90deg, #66f19d, #3fdc7e);
  color: #04160c;
  font: 700 16px var(--ian-ui-font), Manrope, sans-serif;
  box-shadow: 0 0 24px rgba(61, 255, 134, .3), inset 0 1px 0 rgba(255, 255, 255, .38);
  cursor: pointer;
}
body #view-notes .library-create-pill .ian-icon { width: 26px; height: 26px; }
body #view-notes .library-create-pill-icon { display: inline-grid; place-items: center; }
body #view-notes .library-agenda-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid #2c4a3d;
  border-radius: 27px;
  background: #131d46;
  color: #d3e6dc;
  font: 600 14px var(--ian-ui-font), Manrope, sans-serif;
  cursor: pointer;
}
body #view-notes .library-create-pill:focus-visible,
body #view-notes .library-agenda-pill:focus-visible,
body #view-notes .library-filter-chip:focus-visible { outline: 2px solid #7dffb0; outline-offset: 2px; }

body #view-notes .library-mockup-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  padding: 8px 10px;
  border: 1px solid #1d2d27;
  border-radius: 22px;
  background: #121c44;
}
body #view-notes .library-filter-chip {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 19px;
  background: transparent;
  color: #b6c4be;
  font: 500 14px var(--ian-ui-font), Manrope, sans-serif;
  text-align: center;
  cursor: pointer;
}
body #view-notes .library-filter-chip:hover { color: #fff; }
body #view-notes .library-filter-chip.is-active {
  border-color: #4dff8f;
  color: #fff;
  box-shadow: inset 0 0 8px rgba(77, 255, 143, .22), 0 0 10px rgba(77, 255, 143, .25);
}

/* ---------- Cuadrícula ---------- */
body #view-notes .library-mockup-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 9px !important;
  align-items: start;
}
@media (min-width: 640px) {
  body #view-notes .library-mockup-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 14px !important; }
}
body #view-notes .mockup-list .library-mockup-grid { grid-template-columns: minmax(0, 1fr) !important; }
body #view-notes .library-mockup-grid > .notebooks-empty { grid-column: 1 / -1; }

body #view-notes .library-mockup-grid > .notebook-card-shell,
body #view-notes .library-mockup-grid > .library-item-card-shell {
  --mk-pad: 6px;
  --mk-art: 88px;
  --mk-row: 26px;
  position: relative;
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  padding: var(--mk-pad);
  border: 1px solid #1c2b2c;
  border-radius: 14px;
  background: linear-gradient(180deg, #17214e 0%, #151f49 60%, #141d47 100%);
  box-shadow: none;
}
body #view-notes .library-mockup-grid > .in-trash { opacity: .7; }

/* Botones de apertura: sin el aspecto de tarjeta antiguo */
body #view-notes .library-mockup-grid :is(.notebook-card, .library-note-open, .library-media-open, .library-reminder-open, .library-item-card) {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f2f8f5;
  text-align: left;
  transform: none !important;
}
body #view-notes .library-mockup-grid :is(.notebook-card, .library-note-open, .library-media-open, .library-reminder-open, .library-item-card):focus-visible {
  outline: 2px solid #7dffb0;
  outline-offset: 2px;
  border-radius: 10px !important;
}

/* Ilustraciones */
body #view-notes .library-mockup-grid .notebook-cover-visual {
  display: block !important;
  width: 100% !important;
  height: var(--mk-art) !important;
  border-radius: 10px !important;
  background: #17214e url("./assets/cuadernote/library/art-notebook.jpg") center / cover no-repeat !important;
  font-size: 0 !important;
  overflow: hidden !important;
}
body #view-notes .library-mockup-grid .notebook-cover-visual > * { display: none !important; }

body #view-notes .library-mockup-grid :is(.library-item-type-file, .library-item-type-link) .library-item-icon {
  display: block !important;
  width: 100% !important;
  height: var(--mk-art) !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #17214e center / cover no-repeat !important;
  box-shadow: none !important;
  font-size: 0 !important;
  overflow: hidden !important;
}
body #view-notes .library-mockup-grid .library-item-icon > * { display: none !important; }
body #view-notes .library-mockup-grid .library-item-type-file .library-item-icon { background-image: url("./assets/cuadernote/library/art-file.jpg") !important; }
body #view-notes .library-mockup-grid .library-item-type-link .library-item-icon { background-image: url("./assets/cuadernote/library/art-link.jpg") !important; }

body #view-notes .library-mockup-grid .media-studio {
  position: relative;
  display: block !important;
  width: 100% !important;
  height: var(--mk-art) !important;
  border-radius: 10px;
  background: #17214e url("./assets/cuadernote/library/art-video.jpg") center / cover no-repeat !important;
  overflow: hidden;
}
body #view-notes .library-mockup-grid .media-studio > * { display: none !important; }
/* Imágenes con miniatura real: se muestra la foto en lugar del televisor. */
body #view-notes .library-mockup-grid .media-studio:has(.media-tv-screen img) { background: #141e47 !important; }
body #view-notes .library-mockup-grid .media-studio:has(.media-tv-screen img) > .media-studio-device { display: block !important; position: absolute; inset: 6px; }
body #view-notes .library-mockup-grid .media-studio:has(.media-tv-screen img) .media-studio-screen { display: block !important; width: 100%; height: 100%; border-radius: 8px; overflow: hidden; }
body #view-notes .library-mockup-grid .media-studio:has(.media-tv-screen img) .media-studio-screen img { width: 100%; height: 100%; object-fit: cover; }
body #view-notes .library-mockup-grid .media-studio:has(.media-tv-screen img) .media-studio-side-rail { display: none !important; }

/* Nota adhesiva con chincheta (texto y color reales de la nota) */
body #view-notes .library-mockup-grid .library-note-paper {
  position: relative;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  width: calc(100% - 12px);
  height: calc(var(--mk-art) - 10px);
  margin: 6px auto 4px;
  padding: 16px 8px 8px;
  border: 0 !important;
  border-radius: 2px !important;
  background: var(--note-bg, #F9DA6C) !important;
  color: var(--note-ink, #10201a) !important;
  font-family: var(--note-font, "Segoe Print"), "Segoe Print", "Bradley Hand", cursive;
  transform: rotate(-2deg);
  box-shadow: 0 8px 14px rgba(0, 0, 0, .45);
  overflow: hidden;
}
body #view-notes .library-mockup-grid .library-note-paper::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8dffb8, #1fa85a 72%);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .4);
}
body #view-notes .library-mockup-grid .library-note-paper-head,
body #view-notes .library-mockup-grid .library-note-paper-foot { display: none !important; }
body #view-notes .library-mockup-grid .library-note-content {
  display: -webkit-box !important;
  overflow: hidden;
  color: inherit !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-align: center;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* Recordatorio: mini calendario con la fecha y hora reales */
body #view-notes .library-mockup-grid .reminder-calendar {
  display: grid !important;
  grid-template-rows: 22px 1fr auto;
  width: 80%;
  height: calc(var(--mk-art) - 8px);
  margin: 4px auto;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #f4f6f5 !important;
  color: #151f4a !important;
  text-align: center;
  box-shadow: 0 8px 14px rgba(0, 0, 0, .4) !important;
  overflow: hidden;
}
body #view-notes .library-mockup-grid .reminder-calendar-month {
  display: grid;
  place-items: center;
  background: #182350 !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: .18em;
}
body #view-notes .library-mockup-grid .reminder-calendar strong { align-self: center; color: #151f4a !important; font-size: 34px !important; line-height: 1; }
body #view-notes .library-mockup-grid .reminder-calendar small { padding-bottom: 6px; color: #4b5751 !important; font-size: 10px !important; }
body #view-notes .library-mockup-grid .reminder-calendar-dates { display: none !important; }

/* Texto de la tarjeta: nombre y "TIPO · dato" */
body #view-notes .library-mockup-grid :is(.notebook-card-copy, .library-item-copy) {
  display: block !important;
  width: 100%;
  padding-top: calc(var(--mk-row) + 6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body #view-notes .library-mockup-grid :is(.notebook-card-copy, .library-item-copy) strong {
  display: block;
  overflow: hidden;
  color: #f2f8f5;
  font: 600 12.5px/1.3 var(--ian-ui-font), Manrope, sans-serif !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body #view-notes .library-mockup-grid :is(.notebook-card-copy, .library-item-copy) :is(small, em, .notebook-card-meta) {
  display: inline !important;
  color: #8fa39b !important;
  font: 600 10px/1.4 var(--ian-ui-font), Manrope, sans-serif !important;
  letter-spacing: .05em;
  text-transform: uppercase;
}
body #view-notes .library-mockup-grid :is(.notebook-card-kind, .library-item-kind)::after { content: " · "; }
body #view-notes .library-mockup-grid .notebook-card-meta time,
body #view-notes .library-mockup-grid .notebook-card-copy em,
body #view-notes .library-mockup-grid .reminder-message { display: none !important; }

/* Ajustes y Copias: botón para volver a CuaderNOTE (solo se ve en esas pantallas) */
body .ian-back-home {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(0, 255, 102, .5);
  border-radius: 999px;
  background: rgba(8, 17, 14, .94);
  color: #7dffb0;
  font: 800 14px/1 inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body[data-active-app="settings"] .ian-back-home, body[data-active-app="storage"] .ian-back-home { display: inline-flex; }
body[data-active-app="settings"] .main-content, body[data-active-app="storage"] .main-content { padding-top: 70px !important; }

/* Elementos sueltos de versiones anteriores (al final de la pestaña Cuadernos) */
body #view-notes .library-loose { margin-top: 22px; padding-top: 14px; border-top: 1px dashed rgba(255, 255, 255, .16); }
body #view-notes .library-loose-head { display: grid; gap: 2px; margin-bottom: 10px; }
body #view-notes .library-loose-head h3 { margin: 0; color: #dbe7e0; font-size: 14px; font-weight: 800; letter-spacing: .02em; }
body #view-notes .library-loose-head small { color: #8fa39a; font-size: 12px; }

/* Fila de acciones de cada tarjeta: ⋯ Menú · 🗑 Eliminar */
body #view-notes .library-mockup-grid .library-context-actions {
  position: absolute !important;
  inset: auto !important;
  top: calc(var(--mk-pad) + var(--mk-art) + 2px) !important;
  right: var(--mk-pad) !important;
  left: var(--mk-pad) !important;
  bottom: auto !important;
  z-index: 6;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  height: var(--mk-row);
  pointer-events: auto;
}
body #view-notes .library-mockup-grid .library-context-actions :is(button, summary) {
  position: static !important;
  inset: auto !important;
  display: grid !important;
  place-items: center;
  width: 26px !important;
  min-width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #8ea59b !important;
  font-size: 18px !important;
  line-height: 1;
  text-shadow: none !important;
  list-style: none;
  cursor: pointer;
}
body #view-notes .library-mockup-grid .library-context-actions summary::-webkit-details-marker { display: none; }
body #view-notes .library-mockup-grid .library-context-actions :is(button, summary):hover { background: rgba(255, 255, 255, .07) !important; }
body #view-notes .library-mockup-grid .library-context-actions :is(button, summary):focus-visible { outline: 2px solid #7dffb0 !important; outline-offset: 1px; }
body #view-notes .library-mockup-grid .library-star-action.is-on { color: #f7c531 !important; }
body #view-notes .library-mockup-grid .library-like-action.is-on { color: #ff4d5f !important; }
body #view-notes .library-mockup-grid .library-context-actions .trash-action { color: #ff5a5f !important; }
body #view-notes .library-mockup-grid .library-context-actions .trash-action .ian-icon,
body #view-notes .library-mockup-grid .library-context-actions .trash-action svg { width: 18px !important; height: 18px !important; }
body #view-notes .library-mockup-grid .library-context-actions details { position: static !important; }
body #view-notes .library-mockup-grid .library-context-actions details > div {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: auto !important;
  z-index: 30;
  display: grid;
  gap: 4px;
  width: max(100%, 132px);
  padding: 6px;
  border: 1px solid #27423a;
  border-radius: 10px;
  background: #141e47;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .6);
}
body #view-notes .library-mockup-grid > :nth-child(3n) .library-context-actions details > div { right: 0 !important; left: auto !important; }
body #view-notes .library-mockup-grid .library-context-actions details > div button {
  width: 100% !important;
  height: auto !important;
  min-height: 30px !important;
  padding: 6px 8px !important;
  justify-items: start;
  border: 1px solid #22352f !important;
  border-radius: 8px !important;
  background: #16204c !important;
  color: #d3e6dc !important;
  font: 500 11px var(--ian-ui-font), Manrope, sans-serif !important;
  text-align: left;
}

/* ---------- Lema ---------- */
body #view-notes .cuadernote-library-motto {
  margin: 20px 0 14px;
  color: #7d8b85;
  font-size: 11px;
  letter-spacing: .3em;
  text-align: center;
  text-transform: uppercase;
}
body #view-notes .cuadernote-library-motto::after { background: #3fdc7e; box-shadow: 0 0 12px rgba(63, 220, 126, .5); }

/* ---------- Barra inferior ---------- */
/* Fija abajo de la pantalla (sticky no se pegaba porque el documento no es el contenedor que se desplaza) */
body #view-notes .mockup-view { padding-bottom: 116px !important; animation: none !important; transform: none !important; }
body #view-notes .cuadernote-bottom-nav {
  position: fixed;
  right: auto;
  bottom: 10px;
  left: 50%;
  z-index: 40;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  width: min(calc(100% - 24px), 560px);
  min-height: 84px;
  margin: 0;
  padding: 10px 6px 8px;
  overflow: visible;
  border: 1px solid #1c285a;
  border-radius: 28px;
  background: linear-gradient(180deg, #151f4a, #121b43);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
}
body #view-notes .cuadernote-bottom-nav > button {
  align-self: end;
  width: auto !important;
  min-height: 60px !important;
  margin: 0 !important;
  padding: 6px 2px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #8ea69b !important;
  transform: none !important;
}
body #view-notes .cuadernote-bottom-nav > button > small { color: inherit !important; font-size: 11px !important; font-weight: 600 !important; }
body #view-notes .cuadernote-bottom-nav > button.is-active { color: #48f08a !important; }
body #view-notes .cuadernote-bottom-nav .bottom-nav-icon-shell,
body #view-notes .cuadernote-bottom-nav > button.is-active .bottom-nav-icon-shell {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
}
body #view-notes .cuadernote-bottom-nav .bottom-nav-icon-shell .ian-icon,
body #view-notes .cuadernote-bottom-nav > button.is-active .bottom-nav-icon-shell .ian-icon { width: 27px !important; height: 27px !important; }
body #view-notes .cuadernote-bottom-nav > button:hover,
body #view-notes .cuadernote-bottom-nav > button:focus-visible { background: rgba(255, 255, 255, .05) !important; outline: 2px solid rgba(72, 240, 138, .5); outline-offset: 2px; }
body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-create {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 70px !important;
  height: 70px !important;
  min-height: 70px !important;
  margin-top: -36px !important;
  padding: 0 !important;
  border: 2px solid #45f28a !important;
  border-radius: 50% !important;
  background: #121c44 !important;
  color: #45f28a !important;
  box-shadow: 0 0 0 6px #121b43, 0 0 22px rgba(69, 242, 138, .45) !important;
}
body #view-notes .cuadernote-bottom-nav .cuadernote-nav-create-ring { display: grid; place-items: center; }
body #view-notes .cuadernote-bottom-nav .cuadernote-nav-create-ring .ian-icon { width: 34px !important; height: 34px !important; }

/* ---------- Refuerzos: reglas antiguas fijaban orden, alto y alineación ---------- */
body #view-notes .library-mockup-grid { align-items: stretch !important; }
body #view-notes .library-mockup-grid .library-context-actions {
  justify-content: space-around !important;
  height: var(--mk-row) !important;
  min-height: 0 !important;
  gap: 0 !important;
  padding: 0 !important;
}
body #view-notes .library-mockup-grid .library-context-actions > * { transform: none !important; }
body #view-notes .library-mockup-grid .library-context-actions .library-star-action { order: 1 !important; }
body #view-notes .library-mockup-grid .library-context-actions .library-like-action { order: 2 !important; }
body #view-notes .library-mockup-grid .library-context-actions details { order: 3 !important; }
body #view-notes .library-mockup-grid .library-context-actions .trash-action { order: 4 !important; }
body #view-notes .library-mockup-grid .library-note-paper { min-height: 0 !important; height: calc(var(--mk-art) - 10px) !important; }

/* Segunda línea de la tarjeta: "TIPO · dato" en una sola línea con puntos suspensivos */
body #view-notes .library-mockup-grid :is(.notebook-card-copy, .library-item-copy) {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 4px;
  white-space: normal;
}
body #view-notes .library-mockup-grid :is(.notebook-card-copy, .library-item-copy) > strong { flex: 0 0 100%; }
body #view-notes .library-mockup-grid :is(.notebook-card-kind, .library-item-kind) { flex: 0 0 auto; }
body #view-notes .library-mockup-grid :is(.notebook-card-meta, .library-item-meta) {
  display: block !important;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden !important;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}
body #view-notes .library-mockup-grid :is(.notebook-card-kind, .library-item-kind)::after { content: none; }
body #view-notes .library-mockup-grid .notebook-card-kind:has(+ .notebook-card-meta)::after,
body #view-notes .library-mockup-grid .library-item-kind:has(+ .library-item-meta)::after { content: " ·"; }
/* Notas, archivos y multimedia ya traen el tipo al inicio de su dato */
body #view-notes .library-mockup-grid :is(.library-item-type-note, .library-item-type-file, .library-media-item) .library-item-kind { display: none !important; }

/* Más refuerzos: alto libre del texto, cinco columnas en la barra inferior y botones que caben */
body #view-notes .library-mockup-grid :is(.notebook-card-copy, .library-item-copy) { height: auto !important; max-height: none !important; }
body #view-notes .cuadernote-bottom-nav { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
body #view-notes .library-mockup-grid .library-context-actions :is(button, summary):not(#mk):not(#mk2) {
  width: 21px !important;
  min-width: 21px !important;
  max-width: 21px !important;
  height: 24px !important;
  min-height: 24px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 16px !important;
}
body #view-notes .library-mockup-grid .library-context-actions details:not(#mk):not(#mk2) { flex: 0 0 21px !important; width: 21px !important; min-width: 0 !important; }
/* Sin fondos ni bordes de color heredados: la tarjeta es neutra y la ilustración lleva el color */
body #view-notes .library-mockup-grid :is(.notebook-card, .library-note-open, .library-media-open, .library-reminder-open, .library-item-card):not(#mk):not(#mk2) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
body #view-notes .library-mockup-grid > :is(.notebook-card-shell, .library-item-card-shell):not(#mk):not(#mk2) {
  border-color: #1c2b2c !important;
  box-shadow: none !important;
}
/* El texto de la tarjeta heredaba un fondo y borde verdes de la regla antigua ".notebook-card > span" */
body #view-notes .library-mockup-grid :is(.notebook-card-copy, .library-item-copy):not(#mk):not(#mk2) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* El recordatorio tenía su propio relleno: se iguala al resto para que el título quede bajo la fila de botones */
body #view-notes .library-mockup-grid :is(.notebook-card-copy, .library-item-copy):not(#mk):not(#mk2) { padding: calc(var(--mk-row) + 6px) 0 0 !important; }
body #view-notes .library-mockup-grid .library-context-actions :is(button, summary):not(#mk):not(#mk2):hover { background: rgba(255, 255, 255, .07) !important; }
body #view-notes .library-mockup-grid .library-context-actions .trash-action:not(#mk) .ian-icon,
body #view-notes .library-mockup-grid .library-context-actions .trash-action:not(#mk) svg { width: 16px !important; height: 16px !important; }

/* Portadas, carpetas y televisores con color elegido: src/art-recolor.js pinta la ilustración del PDF
   con ese color (atributo data-art-color); mientras tanto se ve la ilustración por defecto. */

/* Agenda: solo el icono en pantallas angostas, para que quepa junto al botón verde */
@media (max-width: 460px) {
  body #view-notes .library-agenda-pill { width: 54px; padding: 0; justify-content: center; }
  body #view-notes .library-agenda-pill span:last-child { display: none; }
  body #view-notes .library-agenda-pill span:first-child { font-size: 22px; }
}

@media (max-width: 380px) {
  body #view-notes .library-agenda-pill { width: 48px; }
  body #view-notes .library-create-pill { min-height: 48px; padding: 0 16px 0 12px; font-size: 14px; }
  body #view-notes .library-agenda-pill { min-height: 48px; padding: 0 14px; }
  body #view-notes .library-filter-chip { padding: 0 8px; font-size: 13px; }
}

/* Chat es la entrada principal: la burbuja ocupa los dos carriles centrales
   de la barra. Estas reglas viven al final de esta hoja porque la maqueta fija
   tamaños de los botones con !important. */
body #view-notes .cuadernote-bottom-nav { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
body #view-notes .cuadernote-bottom-nav button[data-library-tab="notebook"] { grid-column: 1 !important; grid-row: 1 !important; }
body #view-notes .cuadernote-bottom-nav button[data-library-tab="reminder"] { grid-column: 2 !important; grid-row: 1 !important; }
body #view-notes .cuadernote-bottom-nav button[data-library-open-settings] { grid-column: 4 !important; grid-row: 1 !important; }
body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat { display: grid !important; grid-column: 2 / span 2 !important; grid-row: 1 !important; z-index: 3; place-items: center !important; align-self: start !important; justify-self: center !important; width: 76px !important; height: 76px !important; min-height: 76px !important; margin-top: -38px !important; padding: 7px 3px !important; border: 4px solid var(--library-accent) !important; border-radius: 50% !important; background: radial-gradient(circle at 34% 28%, #ffffff 0 8%, color-mix(in srgb, var(--library-accent) 18%, #ffffff) 42%, color-mix(in srgb, var(--library-accent) 9%, #eefaf2) 100%) !important; color: var(--library-accent) !important; box-shadow: 0 0 0 5px #f9fbff, 0 14px 28px color-mix(in srgb, var(--library-accent) 40%, transparent) !important; transform: none !important; }
body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat > small { color: inherit !important; font-size: 10px !important; font-weight: 800 !important; }
body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat .bottom-nav-icon-shell { width: 35px !important; height: 35px !important; min-height: 35px !important; border: 1px solid color-mix(in srgb, var(--library-accent) 52%, #c8e8d5) !important; border-radius: 12px !important; background: #ffffff !important; box-shadow: inset 1px 1px #ffffff, inset -1px -1px #c9ead7, 0 4px 8px color-mix(in srgb, var(--library-accent) 26%, transparent) !important; }
body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat .bottom-nav-icon-shell .ian-icon { width: 22px !important; height: 22px !important; }
body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat:hover,
body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat:focus-visible { background: radial-gradient(circle at 34% 28%, #ffffff 0 8%, color-mix(in srgb, var(--library-accent) 28%, #ffffff) 42%, color-mix(in srgb, var(--library-accent) 13%, #eefaf2) 100%) !important; color: var(--library-accent) !important; outline: 2px solid color-mix(in srgb, var(--library-accent) 55%, transparent); outline-offset: 3px; transform: translateY(-2px) !important; }
body #view-notes .cuadernote-bottom-nav > button.is-library-active { background: #edf4f0 !important; color: #1e6c48 !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--library-accent) 26%, transparent) !important; }
body #view-notes .cuadernote-bottom-nav > button.is-library-active .bottom-nav-icon-shell { border-color: color-mix(in srgb, var(--library-accent) 48%, #c8e8d5) !important; }
@media (max-width: 420px) {
  body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat { width: 70px !important; height: 70px !important; min-height: 70px !important; margin-top: -34px !important; border-width: 3px !important; }
  body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat .bottom-nav-icon-shell { width: 32px !important; height: 32px !important; min-height: 32px !important; }
  body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat .bottom-nav-icon-shell .ian-icon { width: 20px !important; height: 20px !important; }
}
@media (max-width: 360px) {
  body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat { width: 64px !important; height: 64px !important; min-height: 64px !important; margin-top: -28px !important; }
  body #view-notes .cuadernote-bottom-nav > .cuadernote-nav-chat > small { font-size: 8px !important; }
}


/* ===================================================================================================
   2026-10-09 · Barra de abajo y Recordatorios con el estilo del Chat (pedido de Edilberto)
   Barra flotante oscura con brillo verde, al estilo de Telegram: Cuadernos · Chat (burbuja central) · Ajustes.
   Recordatorios ya no está en la barra: es la campanita de arriba (con número) y un aviso al entrar.
   Estas reglas van al final y con .cn-dock para ganarle a las versiones anteriores de la barra.
   =================================================================================================== */
body #view-notes .cuadernote-bottom-nav.cn-dock {
  grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr) !important;
  align-items: center !important;
  width: min(calc(100% - 28px), 420px) !important;
  min-height: 70px !important;
  bottom: calc(12px + env(safe-area-inset-bottom)) !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(0, 255, 102, .2) !important;
  border-radius: 28px !important;
  background: linear-gradient(180deg, rgba(14, 44, 33, .92), rgba(6, 22, 16, .95)) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .07) !important;
}
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-item {
  grid-row: 1 !important;
  display: grid !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 3px !important;
  width: auto !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 6px 4px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #8fb8a4 !important;
  transition: background .2s ease, color .2s ease !important;
}
body #view-notes .cuadernote-bottom-nav.cn-dock > [data-library-tab="notebook"] { grid-column: 1 !important; }
body #view-notes .cuadernote-bottom-nav.cn-dock > [data-library-open-settings] { grid-column: 3 !important; }
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-item:hover { color: #e6fbf0 !important; background: rgba(255, 255, 255, .05) !important; }
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-item.is-library-active { color: #00ff66 !important; background: rgba(0, 255, 102, .12) !important; box-shadow: inset 0 0 0 1px rgba(0, 255, 102, .25) !important; }
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-item > small { color: inherit !important; font: 700 11px/1.1 Manrope, Inter, system-ui, sans-serif !important; letter-spacing: .01em; }
body #view-notes .cuadernote-bottom-nav.cn-dock .bottom-nav-icon-shell { width: 28px !important; height: 28px !important; min-height: 28px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; color: inherit !important; }
body #view-notes .cuadernote-bottom-nav.cn-dock .bottom-nav-icon-shell .ian-icon { width: 24px !important; height: 24px !important; }
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-item.is-library-active .bottom-nav-icon-shell { filter: drop-shadow(0 0 6px rgba(0, 255, 102, .55)); }
/* Burbuja central del Chat: la protagonista */
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-chat {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  align-self: center !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 1px !important;
  width: 74px !important;
  height: 74px !important;
  min-height: 74px !important;
  margin: -36px 0 0 !important;
  padding: 0 !important;
  border: 4px solid #131d46 !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 32% 26%, #8dffbd 0%, #1cf173 38%, #00b84b 72%, #008a37 100%) !important;
  color: #032212 !important;
  box-shadow: 0 12px 28px rgba(0, 255, 102, .32), 0 0 0 1px rgba(0, 255, 102, .55), inset 0 2px 0 rgba(255, 255, 255, .45) !important;
  transition: transform .2s ease, box-shadow .2s ease !important;
}
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-chat:hover,
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-chat:focus-visible { transform: translateY(-3px) scale(1.03) !important; box-shadow: 0 16px 34px rgba(0, 255, 102, .45), 0 0 0 1px rgba(0, 255, 102, .7), inset 0 2px 0 rgba(255, 255, 255, .5) !important; outline: none !important; }
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-chat .bottom-nav-icon-shell { width: 30px !important; height: 30px !important; min-height: 30px !important; color: #032212 !important; }
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-chat .bottom-nav-icon-shell .ian-icon { width: 27px !important; height: 27px !important; color: #032212 !important; }
body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-chat > small { color: #032212 !important; font: 800 10px/1 Manrope, Inter, system-ui, sans-serif !important; }
@media (max-width: 360px) {
  body #view-notes .cuadernote-bottom-nav.cn-dock { grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr) !important; }
  body #view-notes .cuadernote-bottom-nav.cn-dock > .cn-dock-chat { width: 66px !important; height: 66px !important; min-height: 66px !important; margin-top: -30px !important; }
}

/* Campanita de Recordatorios (arriba, junto a la lupa) */
body #view-notes .library-outside-actions { display: flex !important; align-items: center; gap: 10px; }
body #view-notes .cn-bell { position: relative; overflow: visible !important; }
body #view-notes .cn-bell.is-active { color: var(--library-accent, #00ff66) !important; border-color: rgba(0, 255, 102, .6) !important; box-shadow: 0 0 0 3px rgba(0, 255, 102, .18) !important; }
body #view-notes .cn-bell-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border: 2px solid #131d46; border-radius: 999px; background: #ff6a1a; color: #fff; font: 800 10px/1 Manrope, Inter, system-ui, sans-serif; font-style: normal; box-shadow: 0 2px 6px rgba(255, 106, 26, .45); }

/* Aviso de recordatorios al entrar a Cuadernos (tarjeta oscura con brillo, como el Chat) */
body #view-notes .cn-reminder-hint {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 14px; padding: 12px 14px;
  border: 1px solid rgba(0, 255, 102, .22); border-radius: 20px;
  background: linear-gradient(135deg, #12382a, #0a2219);
  box-shadow: 0 10px 26px rgba(4, 30, 20, .25); color: #e6fbf0; text-align: left; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease;
}
body #view-notes .cn-reminder-hint:hover { transform: translateY(-1px); border-color: rgba(0, 255, 102, .45); }
body #view-notes .cn-reminder-hint-icon { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(0, 255, 102, .14); color: #00ff66; }
body #view-notes .cn-reminder-hint-icon .ian-icon { width: 22px; height: 22px; }
body #view-notes .cn-reminder-hint-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
body #view-notes .cn-reminder-hint-text b { color: #f2fff8; font: 800 14.5px/1.25 Manrope, Inter, system-ui, sans-serif; }
body #view-notes .cn-reminder-hint-text small { color: #9cc3b0; font: 500 12.5px/1.3 Manrope, Inter, system-ui, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body #view-notes .cn-reminder-hint-go { flex: none; color: #8fb8a4; font-size: 24px; line-height: 1; }
body #view-notes .cn-reminder-hint.is-today { border-color: rgba(0, 255, 102, .5); box-shadow: 0 10px 26px rgba(4, 30, 20, .25), 0 0 0 3px rgba(0, 255, 102, .08); }
body #view-notes .cn-reminder-hint.is-overdue { border-color: rgba(255, 122, 26, .55); background: linear-gradient(135deg, #3a1f0c, #1f1208); }
body #view-notes .cn-reminder-hint.is-overdue .cn-reminder-hint-icon { background: rgba(255, 122, 26, .18); color: #ff9a4a; }

/* En Recordatorios: volver a Cuadernos y título de la sección */
body #view-notes .library-mockup-bar .cn-back-pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; align-self: flex-start; justify-self: start; min-height: 38px; padding: 0 14px 0 10px; border: 1px solid rgba(0, 255, 102, .3); border-radius: 999px; background: rgba(0, 255, 102, .08); color: var(--library-accent, #00ff66); font: 800 13px Manrope, Inter, system-ui, sans-serif; cursor: pointer; }
body #view-notes .library-mockup-bar .cn-back-pill span:first-child { font-size: 20px; line-height: 1; }
body #view-notes .library-mockup-bar .cn-section-title { margin: 10px 0 6px; color: #e6fbf0; font: 800 22px/1.2 Manrope, Inter, system-ui, sans-serif; }
@media (prefers-reduced-motion: reduce) { body #view-notes .cuadernote-bottom-nav.cn-dock > *, body #view-notes .cn-reminder-hint { transition: none !important; } }
