/* Study Session UX polish.
   The reusable Markdown panel is the canonical note editor during exams.
   Hide the legacy quick-note block so the question stays focused and uncluttered. */

div:has(> textarea[placeholder^="Ejemplo: revisar por qué dudé entre A y B"]) {
  display: none !important;
}

/* The floating exam menu close control should be visible without reading as an alert/destructive action. */
button[title="Cerrar menú"],
button[aria-label="Cerrar menú"] {
  border-color: rgba(148, 163, 184, 0.42) !important;
  background: rgba(100, 116, 139, 0.14) !important;
  color: rgb(71, 85, 105) !important;
}

button[title="Cerrar menú"]:hover,
button[aria-label="Cerrar menú"]:hover {
  border-color: rgba(100, 116, 139, 0.55) !important;
  background: rgba(100, 116, 139, 0.22) !important;
  color: rgb(30, 41, 59) !important;
}

/*
   Notes iconography
   -----------------
   Keep the brain icon reserved for the floating/simplified exam menu.
   In the question toolbar and the notes panel, use the same book metaphor as
   Source, while color keeps the two actions distinct (Source = sky,
   Notes = indigo/violet).
*/
header button[aria-pressed][title="Abrir apuntes"] > svg,
header button[aria-pressed][title="Cerrar apuntes"] > svg,
aside[aria-label="Apuntes de estudio"] > div:first-child > div:first-child > p:first-child > svg {
  display: none !important;
}

header button[aria-pressed][title="Abrir apuntes"]::before,
header button[aria-pressed][title="Cerrar apuntes"]::before,
aside[aria-label="Apuntes de estudio"] > div:first-child > div:first-child > p:first-child::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H11a2 2 0 0 1 2 2v15a2.7 2.7 0 0 0-2-1H6.5A2.5 2.5 0 0 0 4 21.5z'/%3E%3Cpath d='M20 5.5A2.5 2.5 0 0 0 17.5 3H13v17a2.7 2.7 0 0 1 2-1h2.5a2.5 2.5 0 0 1 2.5 2.5z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H11a2 2 0 0 1 2 2v15a2.7 2.7 0 0 0-2-1H6.5A2.5 2.5 0 0 0 4 21.5z'/%3E%3Cpath d='M20 5.5A2.5 2.5 0 0 0 17.5 3H13v17a2.7 2.7 0 0 1 2-1h2.5a2.5 2.5 0 0 1 2.5 2.5z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

/* Notes remain visually distinct from Source even though both use a book. */
.theme-sky header button[aria-pressed][title="Abrir apuntes"] {
  border-color: rgb(199 210 254) !important;
  background: rgb(238 242 255) !important;
  color: rgb(79 70 229) !important;
}

.theme-sky header button[aria-pressed][title="Abrir apuntes"]:hover {
  border-color: rgb(165 180 252) !important;
  background: rgb(224 231 255) !important;
  color: rgb(67 56 202) !important;
}
