/* GOALS site skin.
 *
 * Makes the rest of Moodle read as the same product as the patient dashboard and
 * the clinic website, without replacing the theme. Every colour, radius and
 * typeface here is the website's own (sites/goals/src/styles/base.css) by way of
 * the dashboard's token block - nothing is invented, so the three surfaces cannot
 * drift apart.
 *
 * Deliberately additive and low-specificity: this restyles surfaces, type and
 * controls, and never moves anything. Moodle's layout keeps working; if this file
 * were removed the site would look like stock Boost again and nothing would break.
 *
 * NOT loaded on the embedded pagelayout - the patient dashboard defines its own
 * .card and its own tokens, and two stylesheets arguing over one page is how a
 * design system dies.
 */

:root{
  --evergreen:#13342B; --forest:#1B4332; --pine:#2E5C49;
  --paper:#FBF8F1; --ivory:#F6F1E7; --ivory-deep:#EFE8D9;
  --ink:#22201C; --ink-soft:#4C4A44; --ink-mute:#6B675C;
  --brass:#B08D57; --gold-soft:#E4D3AE; --sage:#A9BAA8; --sage-mist:#ECEFE3;
  --line:rgba(34,32,28,.14); --line-soft:rgba(34,32,28,.08);
  --g-serif:"Newsreader",Georgia,serif;
  --g-sans:"Public Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  --g-shadow:0 1px 2px rgba(23,42,58,.04), 0 14px 34px -22px rgba(19,52,43,.28);
  --g-radius:14px;
}

/* ---------------------------------------------------------------- ground --- */
body{
  font-family:var(--g-sans);
  background:var(--paper);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
#page,#page-wrapper,#region-main-box,#region-main{background:transparent}
#region-main{border:0}

/* ------------------------------------------------------------ typography --- */
h1,h2,h3,h4,h5,.h1,.h2,.h3,.h4,.h5,
.page-title,#page-header h1,.card-title{
  font-family:var(--g-serif);
  color:var(--evergreen);
  letter-spacing:-.01em;
  text-wrap:balance;
}
h1,.h1,.page-title{font-weight:600}
h2,.h2{font-weight:600}
p,li,td,th,.text-muted{font-family:var(--g-sans)}
.text-muted,small,.small{color:var(--ink-mute)!important}
a{color:var(--pine);text-underline-offset:2px}
a:hover{color:var(--forest)}

/* ------------------------------------------------------------- top navbar -- */
.navbar,nav.navbar.fixed-top{
  background:var(--evergreen)!important;
  border-bottom:1px solid rgba(176,141,87,.28);
  box-shadow:0 1px 0 rgba(0,0,0,.06);
}
.navbar .navbar-brand,.navbar a,.navbar .nav-link,.navbar button{color:#EDE6D8!important}
.navbar .nav-link:hover,.navbar a:hover{color:#fff!important}
.navbar .dropdown-menu{
  background:var(--card,#fff);border:1px solid var(--line);
  border-radius:12px;box-shadow:var(--g-shadow);padding:6px;
}
.navbar .dropdown-item{border-radius:8px;color:var(--ink)}
.navbar .dropdown-item:hover{background:var(--sage-mist);color:var(--forest)}
.navbar .badge{background:var(--brass);color:#13342B}

/* ----------------------------------------------------------------- cards --- */
.card,.block,.box.generalbox,.activity-item,.coursebox,
.summary-modchooser,.that-section{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--g-radius);
  box-shadow:var(--g-shadow);
}
.card-header{
  background:var(--ivory);
  border-bottom:1px solid var(--line-soft);
  font-family:var(--g-serif);font-weight:600;
  border-radius:var(--g-radius) var(--g-radius) 0 0;
}
.block .card-title,.block h5{font-family:var(--g-serif)}

/* --------------------------------------------------------------- buttons --- */
.btn,a.btn{
  border-radius:999px;
  text-decoration:none;
  font-family:var(--g-sans);
  font-weight:600;
  letter-spacing:.01em;
  padding:.42rem 1.05rem;
  transition:transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover,.btn:focus{text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn-primary{
  background:var(--evergreen);border-color:var(--evergreen);color:#F6F1E7;
  box-shadow:0 8px 20px -12px rgba(19,52,43,.7);
}
.btn-primary:hover,.btn-primary:focus{
  background:var(--forest);border-color:var(--forest);color:#fff;
}
.btn-secondary{
  background:var(--ivory-deep);border-color:var(--line);color:var(--ink);
}
.btn-secondary:hover{background:var(--sage-mist);border-color:var(--sage);color:var(--forest)}
.btn-outline-secondary{border-color:var(--brass);color:var(--brass);background:transparent}
.btn-outline-secondary:hover{background:var(--brass);border-color:var(--brass);color:#13342B}
.btn-success{background:var(--pine);border-color:var(--pine)}
.btn-link{color:var(--pine)}

/* ------------------------------------------------------------------ form --- */
.form-control,.custom-select,select,input[type=text],input[type=email],
input[type=password],input[type=number],textarea{
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  font-family:var(--g-sans);
}
.form-control:focus,.custom-select:focus,select:focus,textarea:focus,
input[type=text]:focus,input[type=email]:focus,input[type=password]:focus{
  border-color:var(--brass);
  box-shadow:0 0 0 3px rgba(176,141,87,.22);
  outline:none;
}
label,.col-form-label{font-weight:600;color:var(--ink-soft)}

/* ---------------------------------------------------------------- tables --- */
table.generaltable,table.table{background:#fff;border-radius:var(--g-radius);overflow:hidden}
table.generaltable th,table.table th{
  background:var(--ivory);
  font-family:var(--g-sans);font-weight:700;
  color:var(--ink-soft);
  letter-spacing:.02em;
  border-bottom:1px solid var(--line);
}
table.generaltable td{border-color:var(--line-soft)}
table.generaltable tbody tr:hover{background:var(--sage-mist)}

/* ---------------------------------------------------------------- drawer --- */
.drawer{background:#fff;border-left:1px solid var(--line);border-right:1px solid var(--line)}
.drawercontent .list-group-item{border-color:var(--line-soft);border-radius:10px}
.drawercontent .list-group-item:hover{background:var(--sage-mist)}
.courseindex .courseindex-item.pageitem{background:var(--sage-mist);border-radius:8px}
.courseindex .courseindex-section{border-radius:10px}

/* ---------------------------------------------------------------- course --- */
.activity-item{padding:.85rem 1rem;margin-bottom:.6rem}
.activity-item:hover{border-color:var(--sage);box-shadow:0 1px 2px rgba(23,42,58,.05),0 18px 40px -26px rgba(19,52,43,.35)}
.activityname a{font-weight:600;color:var(--ink)}
.activityname a:hover{color:var(--forest)}
.course-content .section-title,.sectionname{font-family:var(--g-serif)}
.completion-dot-completed,.badge-success{background:var(--pine)!important}

/* ----------------------------------------------------------------- alerts -- */
.alert{border-radius:12px;border:1px solid var(--line);font-family:var(--g-sans)}
.alert-success{background:#E6EFE6;border-color:#C4D9C6;color:#1F5138}
.alert-warning{background:#F6EBD6;border-color:#E4CFA6;color:#8A5A12}
.alert-danger{background:#F6E6E0;border-color:#E5C6BA;color:#9B3E2F}
.alert-info{background:var(--ivory);border-color:var(--line);color:var(--ink-soft)}

/* ------------------------------------------------------------- breadcrumb -- */
.breadcrumb{background:transparent;padding-left:0}
.breadcrumb-item,.breadcrumb-item a{color:var(--ink-mute);font-size:.92rem}
.breadcrumb-item a:hover{color:var(--forest)}

/* ------------------------------------------------------------------ misc --- */
.badge{border-radius:999px;font-weight:600}
hr{border-color:var(--line)}
::selection{background:var(--gold-soft);color:var(--ink)}
:focus-visible{outline:2px solid var(--brass);outline-offset:2px}

/* A patient reading course content should get the same measured line length the
   dashboard gives them - long lines are the commonest reason long-form health
   information does not get read. */
#region-main .no-overflow p,#region-main .activity-description p{max-width:72ch}

@media (prefers-reduced-motion:reduce){
  .btn{transition:none}
}
