/* Moje vzdělávací portfolio — built on the tokens already declared in
   index.html (--brand, --ink, --line, --card, --radius, --shadow, --display).
   Nothing new is introduced to the palette. */

/* ---------- Heart on a course card ---------- */
.heart {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(10, 41, 66, .12);
  cursor: pointer; padding: 0;
  color: var(--muted);
  transition: transform .12s ease, color .12s ease, border-color .12s ease;
}
.heart:hover { transform: scale(1.08); color: var(--a4); border-color: var(--a4); }
.heart:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.heart svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.heart.on { color: var(--a4); border-color: var(--a4); }
.heart.on svg { fill: var(--a4); }
.heart.busy { opacity: .5; pointer-events: none; }

/* ---------- Header auth control ---------- */
.auth-nav { display: flex; align-items: center; gap: 10px; margin-left: auto; white-space: nowrap; }
/* In the one-line nav the account is a round badge with initials (the full
   address is in its tooltip); the address itself only shows in the collapsed
   menu, where it has a line of its own. */
.auth-nav .who { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--muted); }
.auth-nav .avatar {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e6f4fb; color: var(--brand-deep); font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.auth-nav .mail { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1080px) {
  .auth-nav .mail { position: static; width: auto; height: auto; clip: auto; overflow: hidden; text-overflow: ellipsis; }
}
header.site.nav-collapsed .auth-nav { width: 100%; margin: 0 0 10px; }
header.site.nav-collapsed .auth-nav .mail { position: static; width: auto; height: auto; clip: auto; overflow: hidden; text-overflow: ellipsis; }
.auth-nav button {
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
}
.auth-nav button.ghost { background: #fff; color: var(--brand-dark); }
@media (max-width: 1080px) { .auth-nav { width: 100%; margin: 0 0 10px; } }

/* ---------- Portfolio layout ---------- */
.pf { padding: 44px 0 80px; }
.pf-panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; margin-bottom: 20px;
}
.pf-panel > h3 {
  font-family: var(--display); font-weight: 700; font-size: 20px;
  letter-spacing: -.01em; margin: 0 0 6px;
}
.pf-panel > p.hint { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

.pf-gate { text-align: center; padding: 54px 26px; }
.pf-gate h2 { font-family: var(--display); font-size: 30px; letter-spacing: -.02em; margin: 0 0 12px; }
.pf-gate p { color: var(--muted); max-width: 560px; margin: 0 auto 22px; }

.pf-steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 30px auto 0; text-align: left; max-width: 900px; }
.pf-step { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg); }
.pf-step strong { display: block; font-family: var(--display); font-size: 15px; margin-bottom: 4px; }
.pf-step span { font-size: 13.5px; color: var(--muted); }

/* ---------- Goals ---------- */
.pf-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.pf-chip {
  font: inherit; font-size: 14px; font-weight: 500;
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.pf-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cdot, var(--brand)); }
.pf-chip.on { border-color: var(--con, var(--brand)); background: color-mix(in srgb, var(--con, var(--brand)) 10%, #fff); font-weight: 600; }
.pf-chip:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.pf-label { display: block; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 9px; }
.pf-input, .pf-textarea, .pf-select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-sizing: border-box;
}
.pf-textarea { min-height: 84px; resize: vertical; line-height: 1.55; }
.pf-input:focus, .pf-textarea:focus, .pf-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16, 164, 221, .16); }

/* ---------- Items ---------- */
.pf-count { font-size: 14px; color: var(--muted); }
.pf-item {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; margin-bottom: 12px; background: #fff;
}
.pf-item.done { border-color: var(--a2); background: color-mix(in srgb, var(--a2) 4%, #fff); }
.pf-item-head { display: flex; align-items: flex-start; gap: 14px; }
.pf-item-head h4 { font-family: var(--display); font-size: 17px; font-weight: 700; margin: 0 0 5px; line-height: 1.3; }
.pf-item-head h4 a { color: inherit; text-decoration: none; }
.pf-item-head h4 a:hover { color: var(--brand-dark); text-decoration: underline; }
.pf-item-meta { font-size: 13px; color: var(--muted); }
.pf-item-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }

.pf-btn {
  font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.pf-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.pf-btn.on { background: var(--a2); border-color: var(--a2); color: #fff; }
.pf-btn.danger:hover { border-color: var(--a4); color: var(--a4); }
.pf-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.pf-btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.pf-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.pf-btn[disabled] { opacity: .5; cursor: default; }

.pf-item-body { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pf-files { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 7px; }
.pf-files li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pf-files .tagk { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 5px; background: var(--bg); color: var(--muted); }
.pf-files .tagk.certificate { background: color-mix(in srgb, var(--a3) 16%, #fff); color: var(--a3); }
.pf-files a { color: var(--brand-dark); font-weight: 500; }
.pf-files .rm { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; }
.pf-files .rm:hover { color: var(--a4); }

.pf-upload { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 14px; }
.pf-upload .note { font-size: 12.5px; color: var(--muted); }

.pf-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.pf-empty strong { display: block; font-family: var(--display); font-size: 18px; color: var(--ink); margin-bottom: 8px; }

/* ---------- Export to Word ---------- */
.pf-export { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.pf-export .hint { flex: 1; min-width: 240px; margin: 0; }

/* ---------- Star ratings ---------- */
/* On a catalogue card the whole surface is covered by an invisible <a>, so the
   stars have to be lifted above it the same way .open and .codes-detail are. */
.rating { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.rating.busy { opacity: .5; pointer-events: none; }
.rating .stars { display: flex; gap: 1px; }
.rating .star {
  border: 0; background: none; padding: 2px; cursor: pointer;
  line-height: 0; color: #cbd6df;
  transition: color .1s ease, transform .1s ease;
}
.rating .star svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.rating .star.on { color: #E8A33A; }
.rating .star:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; border-radius: 3px; }
/* Hover preview: light every star, then unlight the ones past the cursor. */
.rating .stars:hover .star { color: #E8A33A; }
.rating .stars .star:hover { transform: scale(1.15); }
.rating .stars .star:hover ~ .star { color: #cbd6df; }
.rating .rating-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rating.rated .rating-meta { color: var(--brand-dark); font-weight: 600; }

/* ---------- Forum ---------- */
.forum-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.forum-item { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.forum-item.mine { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.forum-item p { margin: 8px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.forum-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.forum-meta strong { color: var(--ink); font-size: 13.5px; }
.forum-del { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--muted); font: inherit; font-size: 12.5px; padding: 2px 4px; }
.forum-del:hover { color: var(--a4); text-decoration: underline; }
.forum-del[disabled] { opacity: .5; cursor: default; }

.forum-form { display: flex; flex-direction: column; gap: 10px; }
.forum-form .pf-textarea { width: 100%; min-height: 96px; font-size: 15px; }
.forum-form-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.forum-form-foot .hint { flex: 1; min-width: 200px; margin: 0; }

.forum-gate strong { display: block; font-family: var(--display); font-size: 17px; margin-bottom: 6px; }
.forum-gate p { color: var(--muted); margin: 0 0 14px; }
.forum-modnote {
  margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 13.5px;
  background: color-mix(in srgb, var(--a3) 12%, #fff); color: var(--a3); font-weight: 600;
}

/* ---------- Share ---------- */
.pf-share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pf-share-row .pf-input { flex: 1; min-width: 260px; font-family: var(--mono); font-size: 13px; }

/* ---------- Toast ---------- */
.pf-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--brand-deep); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200;
}
.pf-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pf-toast.err { background: var(--a4); }

@media (prefers-reduced-motion: reduce) {
  .heart, .pf-toast, .rating .star { transition: none; }
  .rating .stars .star:hover { transform: none; }
}
