
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');

/* Common classes */

/**
 * Need to target elements lower down in the DOM here or our styles will
 * override that of any site hosting the app.
 */
.container a {
  font-size: .9em;
}
.container button {
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}
.container .hints {
  background: rgba(113, 176, 63, 0.5);
  display: block;
  font-size: .9em;
  flex: 1 0 100%;
  padding: 0.7em 0.9em;
  margin: 0 0 1rem;
}

/**
 * Bootstrap overrides.
 */
.btn {
  cursor: pointer;
}
.btn-primary {
  color: #fff;
  background-color: #70b040;
  border-color: #70b040;
}
.btn-primary:hover {
  color: #fff;
  background-color: #588b32;
  border-color: #538330;
}
.btn.focus,
.btn:focus {
    box-shadow: 0 0 0 2px rgba(112, 112, 112, .25);
}
.btn-primary.disabled, .btn-primary:disabled {
    background-color: #70b040;
    border-color: #70b040;
}
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  color: #fff;
  background-color: #588b32;
  background-image: none;
  border-color: #538330;
}

button.btn.dropdown-toggle:after {
  content: none;
}
.dropdown-item:hover:not(:active) {
  background-color: rgba(0, 0, 0, 0.05);
}
.dropdown-item.action-delete {
    margin-top: .5rem;
    color: #d9534f;
}
.dropdown-item.action-delete:hover {
    cursor: pointer;
    background: #d9534f;
    color: white;
}
.form-control:focus {
  color: #464a4c;
  background-color: #fff;
  border-color: #b3d997;
  outline: none;
}

/**
 * Dashboard layout
 */
body {
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}
#contents > div {
  display: grid;
  grid: [row1-start] "header header" 1fr [row1-end]
        [row2-start] "body body" auto [row2-end]
        / 1fr 1fr;
  grid-gap: 1rem 2rem;
}
section.login {
  padding: 2rem;
}
.recent-forms h1 {
  margin: 0;
}
.new-form h1 {
  margin: 0 0 1rem 0;
}

/* Headings/Labels with icons */

.new-form-selector .not-selected,
.new-form-selector .selected {
  position: relative;
  margin-bottom: .25rem;
}
.recent-forms .documents article,
.new-form h2 {
  border-radius: .25rem;
  display: flex;
  font-weight: normal;
  margin: 0;
  padding: .5rem;
  position: relative;
}
.recent-forms .documents article {
  margin: 0 0 .5rem;
}
.new-form h2 {
  color: #292b2c;
  font-size: 1rem;
  align-items: center;
}
.new-form.selected h2 {
  padding: .5rem;
  color: rgba(41, 43, 44);
}
.recent-forms .documents article:hover,
.new-form .not-selected:hover,
.new-form .selected:hover {
  background-color: rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

/* Alert list */
.alert-list {
  list-style: none;
  padding-left: 0;
}

.landing-page > .alert {
  grid-column: body-start / body-end;
  margin: 0;
}

.alert-info {
  background-color: #ebf7d9;
  border-color: #dcf1bc;
}

.alert-info a:link,
.alert-info a:visited {
  color: #578017;
}

/* New Forms list */
.new-form-details {
  margin-top: 1.4em;
}
.new-form-details legend {
  margin-bottom: .5em;
}
.new-form .form-group {
  display: flex;
  align-items: center;
}
.new-form .form-group label {
  flex: 0 0 6rem;
  font-weight: 400;
  margin-bottom: 0;
}
.new-form .form-group .elm-select,
.new-form .form-group .selector-group {
  flex: 1 1 auto;
  margin-bottom: 0;
  align-items: center;
}

/* Recent Forms */
.recent-forms {
  min-height: 25rem;
}
.recent-forms .documents {
  position: relative;
}
.recent-forms .documents h3 {
  color: rgb(41, 43, 44);
  font-size: 1rem;
  margin-bottom: 0;
}
.recent-forms article .document-anchor {
  display: flex;
  flex: 2 0 0;
  color: rgba(41, 43, 44);
  text-decoration: none;
}
.recent-forms article .document-anchor div {
  padding-top: .3rem;
}
.recent-forms article .document-extra {
  margin: -.5rem 0 0 0;
}
.recent-forms article time {
  font-size: .75em;
  font-weight: 300;
  margin: 0 0 0 auto;
  white-space: nowrap;
}
.recent-forms  .employer {
  font-size: .9em;
  font-weight: 300;
  margin: 0;
  padding-top: .3rem;
}
.recent-forms .buttons {
  position: absolute;
  bottom: 0;
  right: 0;
  margin: 0 .5rem .5rem 0;
  display: flex;
  flex-direction: row;
}
.recent-forms .buttons .btn-secondary {
  padding: .3rem .8rem;
  font-size: .9em;
}
.search-options {
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "teacher-filter semester-filter"
    "search search";
  grid-gap: .5rem;
}
.search-options .search {
  grid-area: search;
}
/* Containing h1 and three dots drop-down. */
.recent-forms .heading.recent-form-group {
  display: grid;
  grid-template-columns: auto 2.2rem;
  grid-template-rows: auto;
  margin-bottom: 1rem;
}
.recent-forms .heading .dropdown {
  justify-self: end;
  align-self: center;
}
.recent-forms .heading .dropdown button {
  background: none;
  color: rgb(61, 61, 61);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 .5rem;
  padding-top: .3rem;
  width: 1.7rem;
}
.recent-forms .heading .dropdown button:hover {
  background: none;
}
.software-links {
  grid-column-start: 2;
  margin-top: 1rem;
}
.software-links ul {
  list-style: none;
  text-align: right;
}
.recent-forms .new-document {
  opacity: 1;
  animation-name: fadeInOpacity;
  animation-iteration-count: 1;
  animation-timing-function: ease-in;
  animation-duration: 0.5s;
}
@keyframes fadeInOpacity {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
.recent-forms .new-document .document-time:after {
    content: ' ⭐ ';
}
.show-more,
.show-less {
  border-radius: .25rem;
  display: block;
  padding: .75rem 0;
  text-align: center;
  color: rgba(41, 43, 44);
}
.show-more:hover,
.show-less:hover,
.show-more:focus,
.show-less:focus {
  color: rgba(41, 43, 44);
  text-decoration: none;
}
.show-more:hover,
.show-less:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
.show-more.chevron.bottom:before,
.show-less.chevron.top:before {
  position: relative;
  left: -.5rem;
}
.show-more.chevron.bottom:before {
  top: .2rem;
}
.show-less.chevron.top:before {
  top: .4rem;
}

/* Form type icons . */

.form-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #464a4c;
  border-radius: .25rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  margin-right: 1rem;
}

abbr[data-original-title], abbr[title], /* Bootstrap selectors */
abbr:hover,
.form-type-icon:hover {
  cursor: default;
}
abbr.form-type-icon[title] {
  text-decoration: none;
}

.goal .form-type-icon { background-color: #426d1a; }
.celp .form-type-icon { background-color: #f46036; }
.cov .form-type-icon { background-color: #4cbb17; }
.agree .form-type-icon { background-color: #e12423; }
.wea .form-type-icon { background-color: #414770; }
.oyap .form-type-icon { background-color: #372248; }
.risk .form-type-icon { background-color: #ba8f00; }
.decl .form-type-icon { background-color: #7a1010; }
.swim .form-type-icon { background-color: #fe37af; }
.scelp .form-type-icon { background-color: #f46036; }
.pplp .form-type-icon { background-color: #5b85aa; }
.pla .form-type-icon { background-color: #9e376a; }
.wec .form-type-icon { background-color: #012a36; }
.equ .form-type-icon { background-color: #F7B538; }
.ocot .form-type-icon { background-color: #3E5641; }
.ecf .form-type-icon { background-color: #F7C1BB; }
.swa .form-type-icon { background-color: #1C0221; }
.hspa .form-type-icon { background-color: #00008b; }
.pfwc .form-type-icon { background-color: #372248; }
.amd .form-type-icon { background-color: #FE7F9C; }
.aic .form-type-icon { background-color: #008081; }
.pac .form-type-icon { background-color: #b0fc38; }
.ppe .form-type-icon { background-color: #324634; }
.ic .form-type-icon { background-color: #E48B2E; }
.asou .form-type-icon { background-color: #394F87; }
.owea .form-type-icon { background-color: #12ABD6; }
.tea .form-type-icon { background-color: #CF1E1E; }
.conf .form-type-icon { background-color: #c2a5f0; }
.amend .form-type-icon { background-color: #40E0D0;}
.cepa .form-type-icon { background-color: #ffaa80;}
.sph .form-type-icon { background-color: #663046; }
.roi .form-type-icon { background-color: #757575; }
.tsp .form-type-icon { background-color: #18B6B; }
.hs .form-type-icon { background-color: #B65FCF; }
.app .form-type-icon { background-color: #3DED97; }
.scesp .form-type-icon { background-color: #c88df8; }
.inj .form-type-icon { background-color: #9ce2fd; }

/* Clicking on a selected form header does nothing. */
.new-form:not(.selected) h2 {
  cursor: pointer;
}

/**
 * New form Form
 * .new-form.selected is for when the user has selected a form type and is
 * filling it out.
 */
.new-form.selected h1 {
  display: flex;
}
.new-form.selected h1 .back {
  font-size: 1rem;
  align-self: center;
  margin: 0 .7rem 0 .3rem;
  color: rgba(41, 43, 44);
}
.new-form.selected .chevron:before {
  left: -.1rem;
}
.new-form .form-type-icon {
  width: 4rem;
  height: 4rem;
  transition: all 1.3s;
}
.selected .form-type-icon,
.recent-forms .documents .form-type-icon {
  font-size: .8em;
  min-width: 3rem; /* Sometimes the icons are squished if this is not set. */
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  transition: all 1.3s;
}
.new-form.selected .form-type-icon {
  cursor: default;
}
.new-form.selected .new-form-selector > div {
  transition: all 1.3s;
}
.new-form.selected .new-form-selector > div.selected {
  background: #70b0403d;
  padding: 0;
}
.new-form-selector .selected h2:after {
  content: '';
  background: center center no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='width:24px;height:24px' viewBox='0 0 24 24'%3E%3Cpath fill='%2370b040' d='M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z' /%3E%3C/svg%3E");
  height: 1.5em;
  width: 1.5em;
  margin-left: auto;
  flex-grow: 0;
  flex-shrink: 0;
}
.new-form .new-form-selector select {
  max-width: calc(100% - 12em);
  font-size: .8em;
  padding: 0.2rem .5rem;
  position: relative;
  left: 4.5rem;
  top: -.8rem;
}
.new-form .more-or-less {
  margin-bottom: 1rem;
}
.new-form .more-or-less a:link,
.new-form .more-or-less a:active,
.new-form .more-or-less a:visited {
  color: rgba(41, 43, 44);
  margin-left: .6rem;
  text-decoration: none;
}
.new-form .more-or-less a:hover {
  text-decoration: underline;
}
.new-form .more-or-less .chevron:before {
  left: -.5rem;
}
.form-creation-buttons .btn-primary {
  margin-left: 1rem;
}
.form-design-toggle {
  padding: .5rem;
  padding-left: .75rem;
  margin-top: -.3rem;
}
.form-design-toggle span {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

/* Duplicate form indicator */
.duplicate {
  background: hsla(240, 14%, 92%, 1);
  flex-wrap: wrap;
}
.recent-forms .documents article.duplicate {
  padding: 0;
}
.duplicate:before { /*@todo: put this into the JS if possible */
  content: 'Use this form as a template';
  display: block;
  font-size: .9em;
  background: rgba(113, 176, 63, 0.5);
  flex: 1 0 100%;
  padding: 0.3em 0.9em;
  margin: 0 0 0.7rem;
}
.duplicate div {
  padding-bottom: 1rem;
}
.duplicate abbr {
  margin-left: 1rem;
}

/** HTML forms. **/
.elm-select-menu {
  position: absolute;
  top: 2rem; /* Based on Bootstrap's styling for .form-control. */
  z-index: 1000;
  width: 100%;
  background-color: #fff;
  border: 1px solid #b3d997;
  border-width: 0 1px 1px;
  border-radius: 0 0 .25rem .25rem;
}
/** Stops really big selects breaking out of the grid in Firefox. */
#course-select-input {
  overflow: hidden;
}
.elm-select-item {
  padding: .25rem;
  cursor: pointer;
}
.elm-select-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/** Grouped controls. **/
.selector-group {
  display: flex;
  margin-bottom: 1rem;
}

.selector-group .elm-select {
    flex: 1;
    margin-bottom: 0;
}

/** Specific form control overrides **/

#employer-select {
    margin-right: 1rem;
}

.form-creation-buttons {
  display: flex;
  justify-content: flex-end;
}
.form-creation-buttons .btn:not(:last-child) {
  margin-right: .6rem;
}

.student-profile-link:not(.disabled) {
  margin: 0 .5rem;
}
.student-profile-link a:link,
.student-profile-link a:visited {
  color: rgba(41, 43, 44);
}
.student-profile-link img {
  width: 1.5rem;
  margin: 0 .3rem;
  position: relative;
  top: -.05rem;
}

/**
 * Forms in modal dialogs ?
*/

body.modal-open .modal-dialog {
  display: block;
}
.employer-modal .modal-dialog {
  max-width: 80%;
}
.modal-header,
.modal-body {
  padding: 1.5rem;
}
.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 400;
}
.modal-dialog h3 {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: .6;
  margin-bottom: 1rem;
}
.modal-dialog label {
  font-weight: 500;
  white-space: nowrap;

  flex: 1 0 auto;
  margin: 0 .8rem 0 0;
}
.modal-dialog input:not(:last-child) {
  margin-right: 1rem;
}
.modal-footer .btn {
  margin-left: .6rem;
}

/* Employer contact forms */
.employer-contact-form {
  margin: 2rem 0;
}
.employer-contact-form .contact.form-group {
  background: #eee;
  margin-bottom: 1rem;
  padding: 1rem 3rem 1rem 1rem;
  margin-bottom: 1rem;
  position: relative;
}
.employer-contact-form .contact .form-group {
  display: flex;
  align-items: center;
  margin: 0 50px 1rem 0;
}
.employer-contact-form .contact.form-group .btn { /* 'Remove' button */
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
}


/* Add employer form - this should be changed/removed after mark-up is fixed
  These are the from elements that don't have wrappers */

.modal-dialog .employer-form {
  overflow: auto;
}
.modal-dialog .employer-form label,
.modal-dialog label[for^='email'],
.employer-position-form label {
  float: left;
  line-height: 2.4rem;
  margin-right: .8rem;
}
.modal-dialog .employer-form input {
  max-width: calc(100% - 11rem)
}
.modal-dialog label[for^='email']  {
  width: 5.3rem;
  margin-bottom: 1rem;
}
.modal-dialog input[type='email'] {
  max-width: calc(50% - 8rem);
}
.modal-dialog .contact-numbers {
  clear: both;
  margin-top: .5rem;
}
.employer-contact-form hr {
  display: none;
}

/* Employer position */

.employer-position-form .position.form-group {
  display: flex;
  background: #eee;
  padding: 1rem;
}

/* Chevrons */
.chevron:before {
  border-color: rgba(41, 43, 44);
  border-style: solid;
  border-width: 0.2rem 0.2rem 0 0;
  content: '';
  display: inline-block;
  height: .6rem;
  left: 0.3rem;
  position: relative;
  top: 0.3rem;
  transform: rotate(-45deg);
  vertical-align: top;
  width: .6rem;
}
.chevron.right:before {
  left: 0;
  transform: rotate(45deg);
}
.chevron.top:before {
  top: .6rem;
}
.chevron.bottom:before {
  top: .25rem;
  transform: rotate(135deg);
}
.chevron.left:before {
  left: 0.25em;
  transform: rotate(-135deg);
}

.new-form fieldset {
  box-shadow: none;
}
