/*
 * Pages still built on Bootstrap 3 (index.php, page/*.php, blog): restyles the Bootstrap parts they use
 * with the shared colour tokens, so they follow the light/dark theme. Load after bootstrap.min.css,
 * main.css and base.css.
 */

body { background: var(--bg); color: var(--text); }

/* header width follows Bootstrap's .container, so its edges line up with the content */
.site-header { margin-bottom: 20px; }
.site-header__inner { max-width: none; padding: 0 15px; }
@media (min-width: 768px) { .site-header__inner { width: 750px; } }
@media (min-width: 992px) { .site-header__inner { width: 970px; } }
@media (min-width: 1200px) { .site-header__inner { width: 1170px; } }

/* next to the docked sidebar (base.css, from 1024 px) Bootstrap's fixed-width container would not fit */
@media (min-width: 1024px) { html.has-side .container { width: auto; max-width: 1170px; } }

a, a:hover, a:focus { color: var(--accent); }
hr { border-top-color: var(--border); }
blockquote { border-left-color: var(--border); }
code { background: var(--surface-2); color: var(--text); }

.panel { background-color: var(--surface); border-color: var(--border); box-shadow: none; }
.panel-default > .panel-heading { background-color: var(--surface-2); border-color: var(--border); color: var(--text); }
.panel-title > a { color: var(--accent); }

.table > thead > tr > th,
.table > thead > tr > td,
.table > tbody > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > th,
.table > tfoot > tr > td { border-color: var(--border); }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: var(--surface-2); }
.table-hover > tbody > tr:hover { background-color: var(--accent-soft); }
.table-responsive { border-color: var(--border); }

.form-control { background-color: var(--surface); border-color: var(--border); color: var(--text); }
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--muted); }

.btn-default { background-color: var(--surface); border-color: var(--border); color: var(--text); }
.btn-default:hover, .btn-default:focus, .btn-default:active { background-color: var(--surface-2); border-color: var(--accent); color: var(--text); }

.pagination > li > a, .pagination > li > span { background-color: var(--surface); border-color: var(--border); color: var(--accent); }
.pagination > li > a:hover, .pagination > li > a:focus { background-color: var(--surface-2); border-color: var(--border); color: var(--accent); }
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > span {
	background-color: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}

.well { background-color: var(--surface-2); border-color: var(--border); }
.text-muted { color: var(--muted); }

/* Bootstrap's green button has white text at 2.5:1 contrast: darker green, readable in both themes */
.btn-success, .btn-success:focus { background-color: #157f3b; border-color: #157f3b; color: #fff; }
.btn-success:hover, .btn-success:active { background-color: #116a31; border-color: #116a31; color: #fff; }
