/* Notes (aranda-web.com/notes/): folders and the AI assistant.
   Uses ../portada.css for the blue band and the 3D buttons; this file adds the rest.
   Folder colours: one class each. --f is the folder colour, --paper its light tint,
   --ink the text colour on the tab (white, or dark on yellow). */
.c-rose   { --f: #D2386C; --paper: #FDE8EF; --ink: #fff; }
.c-violet { --f: #5061E8; --paper: #E9ECFF; --ink: #fff; }
.c-teal   { --f: #0E8A7D; --paper: #DDF4F0; --ink: #fff; }
.c-sun    { --f: #F2B705; --paper: #FFF5CF; --ink: #3A2A00; }
.c-sky    { --f: #1976D2; --paper: #E2EFFC; --ink: #fff; }
.c-leaf   { --f: #2E7D32; --paper: #E4F3E5; --ink: #fff; }

.notes-page { max-width: 1100px; padding: 18px 16px 56px; }
.intro { font-size: 17px; max-width: 62ch; margin: 6px 0 0; }

/* ---------- Folders: a coloured tab with the name, a note sheet peeking out, the folder front ---------- */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 30px 30px; margin: 30px 0 44px; }
.folder { position: relative; --c: var(--f); --t: var(--ink); }
.folder .tab {
  position: relative; z-index: 2; display: inline-block; max-width: 85%; margin: 0;
  padding: 9px 18px 7px; border-radius: 12px 12px 0 0;
  background: var(--f); color: var(--ink); font: 600 19px/1.25 "Segoe UI", Arial, sans-serif;
}
.folder::before {                  /* a ruled note sheet sticking out of the folder */
  content: ""; position: absolute; z-index: 1; top: 3px; right: 18px; width: 44%; height: 60px;
  border: 1px solid #c3cddd; border-bottom: 0; border-radius: 3px 3px 0 0; transform: rotate(3deg); transform-origin: bottom left;
  box-shadow: 0 -1px 3px rgba(40, 60, 100, .12);
  background:
    linear-gradient(90deg, transparent 14px, #ee8f8f 14px, #ee8f8f 15px, transparent 15px),
    repeating-linear-gradient(#fff 0 9px, #b9cbe8 9px 10px);
}
.folder .sheet {
  position: relative; z-index: 3; margin-top: -1px;
  background: var(--paper); border: 3px solid var(--f); border-radius: 0 16px 16px 16px;
  padding: 16px 20px 6px;
}
.folder .sheet p { margin: 0 0 4px; font-size: 15.5px; }
.folder .btn { font-size: 20px; padding: 10px 20px; margin: 12px 0 18px; box-shadow: 0 7px #8f8f8f; }
.folder .btn:active { box-shadow: 0 4px #666; transform: translateY(3px); }

/* ---------- AI assistant ---------- */
.assistant { background: #F2F5FB; border-radius: 18px; padding: 6px 24px 24px; max-width: 860px; }
.assistant h2 { margin-top: 20px; }
.assistant .how { margin: 0 0 16px; max-width: 64ch; }
.assistant label { display: block; font-weight: bold; margin-bottom: 6px; }

textarea#question {               /* a ruled notepad: one line every 28px, red margin on the left */
  display: block; width: 100%; min-height: 128px; resize: vertical;
  padding: 2px 14px 0 52px; border: 1px solid #b9c4d8; border-radius: 10px;
  font: 16px/28px Verdana, sans-serif; color: #111;
  background:
    linear-gradient(90deg, transparent 38px, #f2a7a7 38px, #f2a7a7 39px, transparent 39px),
    repeating-linear-gradient(#fff 0 27px, #d6e2f3 27px 28px);
  background-attachment: local;
}
textarea#question:focus { outline: 3px solid var(--band, #2196F3); outline-offset: 1px; }
textarea#question::placeholder { color: #7a8599; }

.send-to { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; margin: 16px 0 4px; }
.send-to > span { font-weight: bold; margin-right: 6px; }
.svc, .svc-all {
  font: inherit; font-size: 15px; cursor: pointer; padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 2px solid #c3cde0; background: #fff; color: #222; display: inline-flex; align-items: center; gap: 7px;
}
.svc::before, .svc-all::before {   /* tick box inside the chip */
  content: ""; width: 14px; height: 14px; border-radius: 4px; border: 2px solid #9aa6bd; background: #fff;
}
.svc[aria-pressed="true"], .svc-all[aria-pressed="true"] { border-color: #5061E8; background: #E9ECFF; color: #1f2a8a; }
.svc[aria-pressed="true"]::before, .svc-all[aria-pressed="true"]::before {
  border-color: #5061E8;
  background: #5061E8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.svc-all { border-style: dashed; }
.svc:hover, .svc-all:hover { border-color: #5061E8; }
.svc:focus-visible, .svc-all:focus-visible, .plain:focus-visible, .status a:focus-visible { outline: 3px solid #111; outline-offset: 3px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.btn.ask { --c: #5061E8; font-size: 22px; padding: 11px 34px; margin: 16px 0 18px; box-shadow: 0 7px #8f8f8f; }
.btn.ask:active { box-shadow: 0 4px #666; transform: translateY(3px); }
.plain { font: inherit; background: none; border: 0; padding: 4px 0; color: #2a35a0; text-decoration: underline; cursor: pointer; }

.status { background: #fff; border-left: 5px solid #5061E8; border-radius: 6px; padding: 10px 14px; margin-top: 4px; }
.status p { margin: 0 0 6px; }
.status p:last-child { margin-bottom: 0; }
.status.warn { border-left-color: #D2386C; }
.status .open { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.status .open a {
  display: inline-block; padding: 6px 14px; border-radius: 8px; background: #5061E8; color: #fff; text-decoration: none; font-size: 15px;
}
.status .open a:hover { filter: brightness(.9); }
.status .tip { font-size: 13.5px; color: #4a5468; }

/* ---------- A folder's own page ---------- */
body.folder-page header { background: var(--f); color: var(--ink); }
.folder-intro { font-size: 17px; max-width: 62ch; }
ul.files { list-style: none; padding: 0; margin: 22px 0 0; max-width: 760px; }
ul.files li { border-top: 1px solid #e3e7ef; }
ul.files li:last-child { border-bottom: 1px solid #e3e7ef; }
ul.files a { display: flex; gap: 14px; align-items: baseline; padding: 12px 4px; text-decoration: none; }
ul.files a::before {               /* a small note sheet in the folder colour */
  content: ""; flex: none; width: 14px; height: 18px; border-radius: 2px; transform: translateY(3px);
  background: repeating-linear-gradient(var(--paper) 0 3px, var(--f) 3px 4px); border: 1px solid var(--f);
}
ul.files .t { flex: 1; font-size: 16px; }
ul.files a:hover .t { text-decoration: underline; }
ul.files .k { font-size: 13px; color: #5a6477; white-space: nowrap; }
ul.files:has(li) + .empty { display: none; }   /* the message disappears once the list has a note */
.empty { background: var(--paper); border-radius: 12px; padding: 14px 18px; max-width: 760px; }

@media (max-width: 760px) {
  .assistant { padding: 4px 16px 20px; border-radius: 14px; }
  textarea#question { padding-left: 46px; background:
    linear-gradient(90deg, transparent 32px, #f2a7a7 32px, #f2a7a7 33px, transparent 33px),
    repeating-linear-gradient(#fff 0 27px, #d6e2f3 27px 28px); background-attachment: local; }
}
@media (prefers-reduced-motion: reduce) { .btn:active, .folder .btn:active, .btn.ask:active { transform: none; } }
