/*------------------------------------------------------------------*/
/* Stilul site-ului cursului de Probabilități și Statistică.         */
/* Tema de bază (culori, fonturi, casetele notelor) este aceeași ca  */
/* în notele săptămânale: html/curs.scss (Fira Sans + Pagella,       */
/* bleumarin #1B3A5C). Aici: navbar, casetele Quarto native folosite */
/* în „Introducere în R/Tidyverse”, slide-urile încorporate.         */
/*------------------------------------------------------------------*/

:root {
  --curs-accent: #1B3A5C;
  --curs-accentlight: #DCE6F0;
  --curs-link: #1F5FA0;
  --curs-gray: #6B7785;
  --curs-defframe: #2B6CB0;  --curs-defback: #EEF5FC;
  --curs-thmframe: #9B2335;  --curs-thmback: #FCF1F2;
  --curs-propframe: #7A3E8E; --curs-propback: #F6F0F9;
  --curs-exframe: #2F7D4A;   --curs-exback: #F1F8F3;
  --curs-exrframe: #C0661A;  --curs-exrback: #FFF7EE;
  --curs-obsframe: #5A6572;  --curs-obsback: #F5F6F8;
  --curs-sumframe: #1F7A7A;  --curs-sumback: #ECF7F7;
}

/* ---------------- Navbar ---------------- */
#quarto-header { border-bottom: 3px solid var(--curs-accentlight); }
.navbar-brand-container { margin-right: 0; flex-shrink: 0; }
.navbar-brand, .navbar-brand .navbar-title { overflow: visible; text-overflow: clip; }
@media (min-width: 1020px) { .navbar-brand-container { margin-right: 0.6em; } }
.navbar-brand > img { max-height: 26px; }

/* titlul navbar-ului pe (cel mult) două rânduri, centrat */
.navbar-title {
  display: block;
  max-width: 170px;
  font-size: 0.78rem;
  line-height: 1.15;
  text-align: center;
  font-weight: 600;
  white-space: normal !important;
}
.navbar { font-size: 15px; }
.navbar-nav .nav-link,
.navbar .dropdown-menu .dropdown-item { font-size: 0.8rem; }
.navbar-nav .nav-link > i { margin-right: .15rem; }
@media (max-width: 1500px) { .navbar-nav .nav-link > i.bi { display: none; } }
.navbar-nav .nav-link { padding-left: 0.6rem; padding-right: 0.6rem; white-space: nowrap; }
.navbar .dropdown-menu { max-height: 80vh; overflow-y: auto; }
a.dropdown-item { color: var(--curs-accent); }
a.dropdown-item > i { color: var(--curs-link); }

.quarto-title-banner { color: var(--curs-accent); }
.quarto-title .subtitle, .quarto-title p.subtitle { text-align: left; }
.nav-footer { font-size: 0.8em; }

/* ---------------- Casete Quarto native (paginile R / Tidyverse, anexa) ---------------- */
.theorem, .proof, .solution {
  position: relative;
  border-radius: 3px;
  padding: .9rem 1.1rem .5rem 1.1rem;
  margin: 1.4rem 0;
}
.theorem { background: var(--curs-defback); border-left: 4px solid var(--curs-defframe); }
.theorem > p:first-child > span.theorem-title { color: var(--curs-defframe); font-family: "Fira Sans", sans-serif; font-weight: 600; }
.theorem.definition { background: var(--curs-defback); border-left-color: var(--curs-defframe); }
.theorem.proposition, .theorem.lemma, .theorem.corollary { background: var(--curs-propback); border-left-color: var(--curs-propframe); }
.theorem.proposition span.theorem-title, .theorem.lemma span.theorem-title,
.theorem.corollary span.theorem-title { color: var(--curs-propframe) !important; }
.theorem.theorem { background: var(--curs-thmback); border-left-color: var(--curs-thmframe); }
.theorem.example { background: var(--curs-exback); border-left-color: var(--curs-exframe); }
.theorem.example span.theorem-title { color: var(--curs-exframe) !important; }
.theorem.exercise { background: var(--curs-exrback); border-left-color: var(--curs-exrframe); }
.theorem.exercise span.theorem-title { color: var(--curs-exrframe) !important; }
.proof { background: #fff; border-left: 4px solid var(--curs-obsframe); }
.proof > p:first-child > span.proof-title { color: var(--curs-obsframe); font-family: "Fira Sans", sans-serif; }
.solution.proof { background: #fff; border: 1px dashed var(--curs-exrframe); border-left: 4px solid var(--curs-exrframe); }
.solution.proof > p:first-child > span.proof-title { color: var(--curs-exrframe); font-weight: 600; }

.callout { border-radius: 3px; }

/* ---------------- Slide-urile încorporate în note ---------------- */
details.slides-embed {
  margin: 1.2rem 0 2rem 0;
  border: 1px solid var(--curs-accentlight);
  border-left: 4px solid var(--curs-accent);
  border-radius: 3px;
  background: #F7F9FC;
  padding: .55rem 1rem .9rem 1rem;
}
details.slides-embed > summary {
  cursor: pointer;
  font-family: "Fira Sans", sans-serif;
  font-weight: 600;
  color: var(--curs-accent);
  font-size: .98rem;
}
details.slides-embed > summary i { margin-right: .35rem; }
.slides-embed-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  margin: .6rem 0 .7rem 0;
  font-family: "Fira Sans", sans-serif; font-size: .82rem; color: var(--curs-gray);
}
.slides-embed-bar .btn { font-family: "Fira Sans", sans-serif; }
.slides-embed-hint kbd { font-size: .72rem; padding: .05rem .3rem; }
.slides-embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1280 / 760;
  border: 1px solid #cfd8e3;
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(27, 58, 92, .12);
}
.slides-embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------------- Paginile de prezentare (curs/index, laborator/index) ---------------- */
table.saptamani { width: 100%; font-size: .95rem; }
table.saptamani td, table.saptamani th { vertical-align: middle; padding: .45rem .6rem; }
table.saptamani th { font-family: "Fira Sans", sans-serif; color: var(--curs-accent); }
table.saptamani td:first-child { font-family: "Fira Sans", sans-serif; font-weight: 600; color: var(--curs-accent); white-space: nowrap; }
table.saptamani td:last-child { white-space: nowrap; width: 1%; }
table.saptamani a.btn { font-family: "Fira Sans", sans-serif; font-size: .78rem; padding: .12rem .5rem; margin: .1rem .15rem; }

/* ---------------- Butonul „Înapoi sus” ---------------- */
#curs-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1030;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: var(--curs-accent);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(27, 58, 92, .35);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .2s;
}
#curs-to-top.visible { opacity: .9; visibility: visible; transform: translateY(0); }
#curs-to-top:hover, #curs-to-top:focus-visible { opacity: 1; background: var(--curs-link); outline: none; }
@media (max-width: 767.98px) {
  #curs-to-top { right: 1rem; bottom: 1rem; width: 2.4rem; height: 2.4rem; font-size: 1.1rem; }
}
@media print { #curs-to-top { display: none; } }

/* ---------------- Pagina de start: sigla cursului ---------------- */
/* Sigla stă în corpul paginii, la dreapta textului de întâmpinare (nu în marginea din dreapta,
   unde se suprapunea cu cuprinsul „Pe această pagină”). */
img.sticker-index {
  float: right;
  width: 170px;
  max-width: 32%;
  height: auto;
  margin: 0 0 0.8rem 1.6rem;
}
.sticker-clear { clear: both; }

/* ---------------- Publicare săptămânală: materiale „în curând” ---------------- */
/* (tabelele din curs/index.qmd și laborator/index.qmd, generate de tools/build_notes.R) */
table.saptamani tr.in-curand td { color: var(--curs-gray); }
table.saptamani tr.in-curand td:first-child { font-weight: 400; }
.eticheta-in-curand {
  display: inline-block;
  padding: .2rem .6rem;
  border: 1px dashed var(--curs-gray);
  border-radius: .25rem;
  font-size: .85em;
  color: var(--curs-gray);
  background: #F7F8FA;
  white-space: nowrap;
}
.eticheta-in-curand > i { margin-right: .2rem; }

/* butonul „Rezolvări” (laborator/index.qmd): rezolvările complete ale unui seminar */
.btn.btn-rezolvari {
  color: var(--curs-thmframe, #1B3A5C);
  border-color: var(--curs-thmframe, #1B3A5C);
  background: transparent;
}
.btn.btn-rezolvari:hover, .btn.btn-rezolvari:focus {
  color: #fff;
  background: var(--curs-thmframe, #1B3A5C);
  border-color: var(--curs-thmframe, #1B3A5C);
}
