/*
 * Base styles, ported from the existing site's common.css so this app sits alongside
 * the rest of our stuff. Page-level styles live in portal.css (vendor-facing) and
 * admin.css (staff-facing), each scoped to a section id the way the site already does.
 *
 * Fonts come from Typekit kit yxs6qjm. That kit does NOT include the bolder Futura
 * weights -- stick to 400 and 500, or the browser will synthesise a fake bold.
 */

:root {
  --font-ui: 'futura-pt', 'Jost', 'Century Gothic', 'Futura', sans-serif;
  --font-body: 'minion-pro', 'Minion Pro', Georgia, 'Times New Roman', serif;

  --ink: #21272a;
  --text: #475359;
  --text-muted: #626d73;
  --border: #acb9bf;
  --bg-tint: #f5f8fa;
  --bg-placeholder: #e6eef2;
  --accent: #008fd8;
  --error: #da4453;
}

* {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
}

html, body {
  height: 100%;
}

body {
  background: #fff;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: var(--ink);
  z-index: 4;
}

header h1 {
  font-size: 20px;
  line-height: 44px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 4px;
}

header h1 a {
  color: #fff;
  text-decoration: none;
}

/* Signed-in identity, pinned to the right of the bar. Absolute rather than floated so
   the title stays centred on the viewport instead of on the space left over. */
header .account {
  position: absolute;
  top: 0;
  right: 20px;
  line-height: 44px;
  font-size: 0;
}

header .account .who,
header .account .signout button {
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 44px;
  font-weight: 400;
  color: rgba(255, 255, 255, .6);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
}

header .account .who:hover,
header .account .signout button:hover { color: #fff; }

header .account .signout {
  display: inline-block;
  margin-left: 18px;
}

/* Sign out is a DELETE, so it has to be a button -- but it should read as a link. */
header .account .signout button {
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

main {
  position: relative;
  min-height: 100%;
  margin-top: 44px;
}

main section {
  position: relative;
}

.clear {
  clear: both;
}

/* Staff navigation, following the site's #nav pattern. */
#nav {
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  background: #fff;
}

#nav ul {
  font-size: 0;
  list-style: none;
  text-align: center;
}

#nav ul li {
  display: inline-block;
  margin: 0 20px;
}

#nav ul li a {
  display: block;
  padding: 17px 5px;
  font-size: 14px;
  line-height: 14px;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#nav ul li a:hover,
#nav ul li a.current {
  padding-bottom: 14px;
  color: var(--accent);
  border-bottom: 3px solid var(--accent);
}

/* Flash messages */
.flash {
  padding: 14px 20px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.flash.notice { background: var(--ink); }
.flash.alert  { background: var(--error); }

/* Buttons, from the register form's submit treatment. */
.button {
  display: inline-block;
  padding: 14px 24px;
  font-size: 14px;
  line-height: 14px;
  color: #fff;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--ink);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.button:hover { background: #333c41; }

.button.secondary {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
}

.button.secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: #fff;
}

.button.danger {
  color: var(--error);
  background: #fff;
  border: 1px solid var(--error);
}

.button.danger:hover { background: var(--error); color: #fff; }

.button.small {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 12px;
}

.button[disabled] {
  opacity: .45;
  cursor: default;
}

@media (min-width: 320px) and (max-width: 599px) {
  header h1 { font-size: 16px; letter-spacing: 2px; }
  #nav ul li { margin: 0 10px; }

  /* An email address won't fit beside the title on a phone. Sign out is the part you
     actually need to reach; the address is still on the account page. */
  header .account { right: 12px; }
  header .account .who { display: none; }
  header .account .signout { margin-left: 0; }
}
