
/* Margin, Padding, Border Resets
-------------------------------------------------------------- */
html, body, div, span, p,
dl, dt, dd, ul, ol, li,
h1, h2, h3, h4, h5, h6,
form, fieldset, input, textarea {
  margin: 0;
  padding: 0;
}

img, abbr, acronym {
  border: 0;
}

/* HTML Elements
-------------------------------------------------------------- */

body {
  font-family: var(--font-sans);
  line-height: 150%;   /* 1.5x vertical rhythm */
}

button {
  font: inherit;
}

/* Headings */
h1, h2, h3, h4, h5, h6, .block-title {
  font-weight: 500;
  line-height: 100%;
  margin: 0 0 0.5em 0;
}

#page-title { font-weight: 600; }

h1 { font-size: 1.875em; }
h2 { font-size: 1.375em; }
h3 { font-size: 1.25em; }
h4 { font-size: 1.125em; }
h5 { font-size: 1em; }
h6 { font-size: .875em; }

p {
  margin: 1em 0;
}

/* Blockquotes */
blockquote {
  font-style: italic;
  margin: 10px 0;
  padding: 10px 30px;
  background: #ececec url(../img/blockquote-quote.png) no-repeat 8px 8px;
  border-top: var(--border-thin);
  color: #6a6a6a;
}

/* Links */

/* Reset styles to make a button element look like a link */
button.style-as-link {
  all: unset;
  cursor: pointer;
}

button.style-as-link,
a {
  --_color: var(--link-color, var(--color-accent, initial));
  --_color-visited: var(--link-color-visited, var(--_color));
  --_color-hover: var(--link-color-hover, var(--color-attention, var(--_color)));
  --_color-focus: var(--link-color-focus, var(--_color-hover));
  --_color-active: var(--link-color-active, var(--_color-hover));
  color: var(--_color);
  background: transparent;
  text-decoration: none;
}

a:visited { color: var(--_color-visited); }

button.style-as-link:focus-visible,
a.active:focus-visible,
a:focus-visible   { color: var(--_color-focus); }

button.style-as-link:hover,
a.active:hover,
a:hover   { color: var(--_color-hover); }

button.style-as-link:active,
a.active:active,
a:active  { color: var(--_color-active); }

/* Lists */
ul, ol, dd {
  margin-bottom: 1.5em;
  margin-left: 2em; /* LTR */
}

li ul, li ol {
  margin-bottom: 0;
}



dl dt {
  font-weight:600;
  line-height: 1.25em;
  color: #333;
  margin-bottom: .2em;
}

dl dd {
  line-height: 1.5em;
  margin-left:0;
}

dl > dd dt {
  font-size: 100%;
}

dl > dd dt,
dl > dd dd {
  margin-left: 1em;
}

dl > dd > dl {
  margin-top: .5em;
}

/* Remove margin on UL's if they are inside a DD. Without this we get margins from both */
dd > ul {
  margin-left: 0 !important;
}

hr {
  border:0;
  background-color:#ccc;
  margin: 1em 0;
}

.modalframe-page-wrapper img,
.page img {
  max-width: 100% !important;
  height: auto !important;
}

iframe {
  border: 0;
}

b, th  { font-weight: 600; }
strong { font-weight: 700; }

/* Tables
-------------------------------------------------------------- */
table {
  --table-padding-vertical: clamp(0.5rem, 1.5vw, 0.75rem);
  --table-padding-horizontal: clamp(0.5rem, 1.5vw, 1.5rem);

  --_table-border-color: var(--table-border-color, var(--color-primary-200));
  --_table-inner-border: var(--table-border, none);
  --_table-radius: var(--table-radius, var(--radius, 0));
  --_table-outer-border: var(--table-outer-border, none);

  border: var(--_table-outer-border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--_table-radius);
  overflow: hidden;
  width: 100%;
}

caption { text-align: left; }
tbody { border: none; }

th,
thead th,
tbody th {
  background: var(--color-primary-100);
  font-size: .875em;

  border: none;
  padding: var(--table-padding-vertical) var(--table-padding-horizontal);
  --_table-inner-border: 1px solid var(--_table-border-color);
}


tr.even,
tr.odd {
  --_table-inner-border: 1px solid var(--_table-border-color);
  background-color: transparent;
}

tr td,
tr.even td,
tr.odd td {
  background-color: transparent;
  padding: var(--table-padding-vertical) var(--table-padding-horizontal);
}

tbody tr th,
tbody td                                 { border:none; border-top: var(--_table-inner-border); }

table:not(.bt) thead th:first-child,
table:not(.bt) tbody tr th:first-child,
table:not(.bt) tbody tr td:first-child            { border-left:   var(--_table-inner-border); }

table:not(.bt) th:last-child,
table:not(.bt) tbody tr td:last-child             { border-right:  var(--_table-inner-border); }

table thead th                           { border-top: var(--_table-inner-border); }

table:has(thead) { --_table-inner-border: 1px solid var(--_table-border-color); }

table:not(.bt) tbody tr:last-child th,
table:not(.bt) tbody tr:last-child td             { border-bottom: var(--_table-inner-border); }

table thead tr:first-child th:first-child,
table:not(:has(thead)) > tbody > tr:first-child th:first-child,
table:not(:has(thead)) > tbody > tr:first-child td:first-child { border-top-left-radius:    var(--_table-radius); }

table th:last-child,
table:not(:has(thead)) > tbody > tr:first-child > td:last-child { border-top-right-radius:    var(--_table-radius); }

table tbody tr:last-child th:first-child,
table tbody tr:last-child td:first-child { border-bottom-left-radius:  var(--_table-radius); }

table tbody tr:last-child th:last-child,
table tbody tr:last-child td:last-child  { border-bottom-right-radius: var(--_table-radius); }


tr.drag td,
tr.drag-previous td {
  background-color: #ffd;
}

/* Allow table classes for content editor to use for styled tables */
table.padding td              { padding: 10px; }
table.zebra tr:nth-child(odd) { background-color: #f9f9f9; }


table.border,
table[border]:not([border="0"]) {
  --table-border:  1px solid var(--_table-border-color);
}

table.border td,
table.border thead th,
table[border]:not([border="0"]) td,
table[border]:not([border="0"]) thead th { border-left: 1px solid var(--_table-border-color); }

table.bt {
  --table-outer-border: 1px solid var(--_table-border-color);
  --table-border: none !important;
}
table.bt tbody tr:first-child td:first-child {
  border-top-left-radius: 0;
  border-top: none;
  border-left: none;
}
table.bt tbody tr:last-child td:first-child {
  border-bottom-left-radius: 0;
}
table.bt tbody tr:last-child td:last-child {
  border-bottom-right-radius: 0;
  border-right: none;
}

table.bt td[data-th=""]:before{
  display: none;
}



/* CCK field multiple value tables */
table.content-multiple-table { --table-outer-border: 1px solid var(--_table-border-color); }
table.content-multiple-table th,
table.content-multiple-table tr.even,
table.content-multiple-table tr.odd { --_table-inner-border: none !important;}
table.content-multiple-table,
table.content-multiple-table + .description { margin-bottom: .5rem; }
table.content-multiple-table tr td { border-top: 1px solid var(--_table-border-color); }
table.content-multiple-table .widget-preview + .widget-edit { max-width: 65%; }
