/* Styles for the myofascial fragments, harmonised with the WordPress site
   (Divi theme of www.myofascial.de): flat surfaces, square corners, brown-grey
   headings, gold accent, outline buttons, grey form fields.

   Everything is scoped to .myo. The font is inherited from the embedding page.
   The colours can be changed from the embedding site without touching this
   file, e.g.  .myo { --myo-accent: #c0603e; }  */
.myo {
  --myo-text: #666;          /* body text of the site */
  --myo-heading: #8c8074;    /* headings and prose of the site */
  --myo-accent: #edb059;     /* links and buttons of the site */
  --myo-muted: #baae9e;      /* footer band of the site */
  --myo-panel: #f4f4f4;      /* toggle / panel background */
  --myo-line: #d9d9d9;       /* panel border */
  --myo-line-soft: #ebe7e2;  /* row separators */
  --myo-field: #eee;         /* form fields */
  --myo-hover: #f7f3ee;
  --myo-open: #f1ebe3;
  --myo-error: #bf5d3d;

  box-sizing: border-box; color: var(--myo-text); line-height: 1.5;
}
.myo *, .myo *::before, .myo *::after { box-sizing: inherit; }
.myo a { color: var(--myo-accent); text-decoration: none; overflow-wrap: anywhere; }
.myo a:hover, .myo a:focus-visible { text-decoration: underline; }
.myo b { font-weight: 600; }
.myo input[type=checkbox] { accent-color: var(--myo-accent); width: 1em; height: 1em; margin: 0 .35em 0 0; vertical-align: -.1em; }

/* buttons: the outline button of the site */
.myo .myo-btn {
  display: inline-block; font: inherit; font-size: .875em; font-weight: 500; line-height: 1.5; cursor: pointer;
  padding: .25em .9em; border: 2px solid var(--myo-accent); border-radius: 3px;
  background: transparent; color: var(--myo-accent); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.myo .myo-btn:hover, .myo .myo-btn:focus-visible { background: var(--myo-accent); color: #fff; text-decoration: none; outline: none; }
.myo .myo-btn-primary { font-size: 1.125em; padding: .3em 1.1em; }
.myo .myo-btn-quiet { border-color: var(--myo-line); color: var(--myo-heading); }
.myo .myo-btn-quiet:hover, .myo .myo-btn-quiet:focus-visible { background: var(--myo-heading); border-color: var(--myo-heading); color: #fff; }
.myo .myo-btn[hidden] { display: none; }

.myo .myo-hint { margin: 1.2em 0 .4em; padding: 0; font-size: .875em; font-style: italic; color: var(--myo-heading); }
.myo .myo-note { margin: .6em 0; padding: 0; font-size: .875em; color: var(--myo-heading); }
.myo .myo-empty { margin: 1em 0; padding: 0; color: var(--myo-heading); }
.myo .myo-error { margin: .6em 0; padding: .6em 1em; background: var(--myo-error); color: #fff; }
.myo .myo-error[hidden] { display: none; }

/* tables (appointments, search results) */
/* "table.myo-table" outranks the table rules of the WordPress theme */
.myo table.myo-table { width: 100%; border-collapse: collapse; border: 0; margin: .2em 0 1.5em; }
.myo .myo-table th, .myo .myo-table td {
  padding: .7em .9em; border: 0; text-align: left; vertical-align: middle; color: inherit; max-width: none;
}
.myo .myo-table thead th {
  font-size: .75em; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; white-space: nowrap;
  color: var(--myo-heading); border-bottom: 1px solid var(--myo-muted);
}
.myo .myo-table th[data-sort] { cursor: pointer; user-select: none; }
.myo .myo-table th[data-sort]:hover { color: var(--myo-accent); }
.myo .myo-table th[data-sort]::after { content: " \2195"; opacity: .45; letter-spacing: 0; }
.myo .myo-table th[aria-sort="ascending"]::after { content: " \2191"; opacity: 1; color: var(--myo-accent); }
.myo .myo-table th[aria-sort="descending"]::after { content: " \2193"; opacity: 1; color: var(--myo-accent); }
.myo .myo-row { cursor: pointer; border-bottom: 1px solid var(--myo-line-soft); transition: background-color .15s; }
.myo .myo-row:hover, .myo .myo-row:focus-visible { background: var(--myo-hover); outline: none; }
.myo .myo-row:focus-visible { box-shadow: inset 3px 0 0 var(--myo-accent); }
.myo .myo-row[aria-expanded="true"] { background: var(--myo-open); border-bottom-color: transparent; }
.myo .myo-row[hidden], .myo .myo-details[hidden] { display: none; }
.myo .myo-row td:first-child b { font-weight: 600; color: var(--myo-heading); white-space: nowrap; }
.myo .myo-details > td {
  padding: 1em 1.2em 1.2em; background: var(--myo-panel);
  border-bottom: 1px solid var(--myo-line); box-shadow: inset 3px 0 0 var(--myo-accent);
}
.myo .myo-details-body { display: flex; flex-wrap: wrap; gap: 1em 2.5em; align-items: flex-start; }
.myo .myo-details-body > div:first-child { flex: 0 0 180px; color: var(--myo-heading); }
.myo .myo-details-body > div:first-child img { display: block; margin-bottom: .4em; }
.myo .myo-details-body > div:last-child { flex: 1 1 260px; }
.myo .myo-flag { width: 20px; height: auto; vertical-align: -2px; margin-right: .2em; }
.myo .myo-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4em; height: 2.4em; border-radius: 50%;
  background: var(--myo-muted); color: #fff; font-size: .8em; font-weight: 500; letter-spacing: 1px;
}

/* appointments */
.myo .myo-filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35em 1.2em;
  margin: 0 0 1em; padding: .8em 1.2em 1em; min-width: 0;
  background: var(--myo-panel); border: 1px solid var(--myo-line); border-radius: 0;
}
.myo .myo-filter legend {
  padding: 0 .6em; margin: 0 0 0 -.6em; width: auto; border: 0; background: none;
  font-size: .75em; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--myo-heading);
}
.myo .myo-filter label { white-space: nowrap; cursor: pointer; }
.myo .myo-filter label:hover { color: var(--myo-heading); }
.myo .myo-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: .35em 1.2em; flex: 1 1 100%; }
.myo .myo-filter-group:last-of-type { flex: 1 1 0; }
.myo .myo-filter .myo-btn { margin-left: auto; }
.myo .myo-course { margin: 0 0 .5em; }
/* same column positions in every course table */
.myo .myo-course table.myo-table { table-layout: fixed; }
.myo .myo-course th:nth-child(1) { width: 24%; }
.myo .myo-course th:nth-child(3) { width: 14%; }
.myo .myo-course th:nth-child(4) { width: 24%; }
.myo .myo-course[hidden] { display: none; }
.myo .myo-course h3 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em .8em;
  margin: 1.6em 0 .3em; padding: 0; font-size: 1.375em; font-weight: 400; line-height: 1.3;
  letter-spacing: 1px; color: var(--myo-heading);
}
.myo .myo-course h3 small { font-size: .55em; letter-spacing: 3px; text-transform: uppercase; color: var(--myo-muted); }
.myo .myo-course h3 span { color: inherit; }
.myo .myo-course h3 .myo-btn { font-size: .6em; letter-spacing: 0; margin-left: auto; align-self: center; }

/* leaders: same layout as the hand-made teacher list of the site */
.myo .myo-leader { display: flex; flex-wrap: wrap; gap: 1.5em 3em; margin: 0 0 4em; }
.myo .myo-leader-img { flex: 0 0 auto; width: 300px; max-width: 100%; height: auto; align-self: flex-start; }
.myo .myo-leader-body { flex: 1 1 360px; font-size: 1.25em; line-height: 1.4; color: var(--myo-heading); }
.myo .myo-leader-body h2 {
  margin: 0 0 .5em; padding: 0; font-size: 1.3em; font-weight: 400; line-height: 1.2;
  letter-spacing: 3px; text-transform: uppercase; color: var(--myo-heading);
}
.myo .myo-leader-body p { padding: 0; }
.myo .myo-text { white-space: pre-line; margin: 0 0 .6em; }

/* course centres */
.myo .myo-center { margin: 0; padding: 1.6em 0; background: none; border: 0; border-bottom: 1px solid var(--myo-line); }
.myo .myo-center:first-child { border-top: 1px solid var(--myo-line); }
.myo .myo-center-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4em 1.2em; margin: 0 0 .8em; padding: 0; background: none; }
.myo .myo-center-head h3 {
  flex: 1 1 320px; margin: 0; padding: 0; font-size: 1.25em; font-weight: 400; line-height: 1.3;
  letter-spacing: 1px; color: var(--myo-heading);
}
.myo .myo-center-body { display: flex; flex-wrap: wrap; gap: .6em 2.5em; align-items: flex-start; }
.myo .myo-box { padding: 0; border-radius: 0; background: none; }
.myo .myo-address { flex: 0 1 260px; }
.myo .myo-phone { flex: 0 1 240px; }
.myo .myo-contact { flex: 1 1 280px; }
.myo .myo-contact-details { flex: 1 1 280px; }
.myo .myo-contact-details summary { cursor: pointer; color: var(--myo-accent); }
.myo .myo-contact-details summary:hover { text-decoration: underline; }
.myo .myo-contact-details[open] summary { margin-bottom: .3em; }
.myo .myo-locations { margin-top: 1em; padding: .8em 1.2em; background: var(--myo-panel); border: 1px solid var(--myo-line); }
.myo .myo-locations > div {
  font-size: .75em; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--myo-heading);
}
.myo .myo-locations dl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: .15em 1.5em; margin: .4em 0 0; padding: 0; }
.myo .myo-locations dt { font-weight: 600; color: var(--myo-heading); }
.myo .myo-locations dd { margin: 0; }

/* therapist search */
.myo .myo-search-top { display: flex; flex-wrap: wrap; gap: 2em; align-items: flex-start; }
.myo .myo-search-form { flex: 1 1 320px; max-width: 520px; display: grid; grid-template-columns: 1fr 1fr; gap: .9em 1em; }
.myo .myo-search-form > label {
  display: flex; flex-direction: column; gap: .35em;
  font-size: .75em; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--myo-heading);
}
.myo .myo-search-form input:not([type=checkbox]), .myo .myo-search-form select {
  font: inherit; font-size: 1.3333em; letter-spacing: 0; text-transform: none; color: var(--myo-text);
  width: 100%; height: 3em; padding: 0 1em; margin: 0;
  border: 0; border-radius: 0; background-color: var(--myo-field); box-shadow: none;
}
.myo .myo-search-form select {
  appearance: none; -webkit-appearance: none; padding-right: 2.4em;
  background-image: linear-gradient(45deg, transparent 50%, var(--myo-heading) 50%), linear-gradient(135deg, var(--myo-heading) 50%, transparent 50%);
  background-position: calc(100% - 1.25em) 55%, calc(100% - .9em) 55%;
  background-size: .35em .35em, .35em .35em; background-repeat: no-repeat;
}
.myo .myo-search-form input:focus, .myo .myo-search-form select:focus { outline: 2px solid var(--myo-accent); outline-offset: 0; }
.myo .myo-checks, .myo .myo-search-form .myo-note, .myo .myo-actions, .myo .myo-search-form .myo-error { grid-column: 1 / -1; margin: 0; }
.myo .myo-checks { display: flex; flex-direction: column; gap: .3em; }
.myo .myo-checks label { cursor: pointer; }
.myo .myo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6em 1em; margin-top: .3em; }
.myo .myo-map { flex: 1 1 360px; height: 420px; min-width: 280px; background: var(--myo-field); border-radius: 0; }
.myo .myo-map[hidden] { display: none; }
.myo .myo-results { margin-top: 2em; }
.myo .myo-results[aria-busy="true"] { opacity: .5; }

@media (max-width: 640px) {
  .myo .myo-table th, .myo .myo-table td { padding: .55em .4em; }
  .myo .myo-table thead th { font-size: .65em; letter-spacing: .5px; }
  .myo .myo-course table.myo-table { table-layout: auto; }
  .myo .myo-course th:nth-child(n) { width: auto; }
  .myo .myo-avatar { width: 2.2em; height: 2.2em; letter-spacing: 0; }
  .myo .myo-search-form { grid-template-columns: 1fr; }
  .myo .myo-locations dl { grid-template-columns: 1fr; }
  .myo .myo-locations dd { margin-bottom: .4em; }
  .myo .myo-leader-body { font-size: 1.1em; }
  .myo .myo-course h3 { font-size: 1.2em; }
}

/* phones: the centre abbreviation column does not fit; the full centre name is in the row details */
@media (max-width: 480px) {
  .myo .myo-course th:nth-child(4), .myo .myo-course .myo-row td:nth-child(4) { display: none; }
}
