/*
 * The cover page forms (individual, group, field report) in the paper look
 * (see shared/paper.css). Loaded after each page's own stylesheet; it changes
 * colours, outlines and shadows only. Sizes and layout stay as they are: the
 * title and logo area is tuned per university.
 */

html {
  background-color: #f0986e;
}

body {
  background: #f0986e !important;
}

/* ---------- The sheet ---------- */

div.body {
  color: #2a211c;
  background-color: #f6e2d2;
  border: 3px solid #333333;
  border-radius: 18px;
  -webkit-box-shadow: 8px 8px 0 #333333;
          box-shadow: 8px 8px 0 #333333;
  margin-bottom: 40px;
}

.body > h1,
.body > h2 {
  color: #2a211c;
}

/* Back: a small paper button. */
.body .back-link {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  color: #2a211c;
  text-decoration: none;
  background: #fbefe5;
  border: 2px solid #333333;
  border-radius: 10px;
  -webkit-box-shadow: 2px 2px 0 #333333;
          box-shadow: 2px 2px 0 #333333;
  -webkit-transition:
    -webkit-transform 0.14s ease,
    -webkit-box-shadow 0.14s ease;
  transition:
    -webkit-transform 0.14s ease,
    -webkit-box-shadow 0.14s ease;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    -webkit-transform 0.14s ease,
    -webkit-box-shadow 0.14s ease;
}

.body .back-link:hover {
  color: #2a211c;
  -webkit-transform: translate(-1px, -1px);
      -ms-transform: translate(-1px, -1px);
          transform: translate(-1px, -1px);
  -webkit-box-shadow: 3px 3px 0 #333333;
          box-shadow: 3px 3px 0 #333333;
}

.body .back-link:active {
  -webkit-transform: translate(2px, 2px);
      -ms-transform: translate(2px, 2px);
          transform: translate(2px, 2px);
  -webkit-box-shadow: 0 0 0 #333333;
          box-shadow: 0 0 0 #333333;
}

/* ---------- Labels and fields ---------- */

.body label,
.body .labelName {
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  color: #2a211c;
}

.body input[type="text"],
.body input[type="number"],
.body input[type="email"],
.body textarea {
  color: #2a211c;
  background-color: #fbefe5;
  border: 2.5px solid #333333;
  border-radius: 12px;
  -webkit-box-shadow: 3px 3px 0 #333333;
          box-shadow: 3px 3px 0 #333333;
  font-family: "DM Sans", sans-serif;
}

.body input::-webkit-input-placeholder, .body textarea::-webkit-input-placeholder {
  color: #9a8578;
}

.body input::-moz-placeholder, .body textarea::-moz-placeholder {
  color: #9a8578;
}

.body input:-ms-input-placeholder, .body textarea:-ms-input-placeholder {
  color: #9a8578;
}

.body input::-ms-input-placeholder, .body textarea::-ms-input-placeholder {
  color: #9a8578;
}

.body input::placeholder,
.body textarea::placeholder {
  color: #9a8578;
}

.body select {
  color: #2a211c;
  background-color: #fbefe5;
  border: 2.5px solid #333333;
  border-radius: 12px;
  -webkit-box-shadow: 3px 3px 0 #333333;
          box-shadow: 3px 3px 0 #333333;
  font-family: "DM Sans", sans-serif;
}

.body .form input:not([type="checkbox"]):not([type="radio"]):focus,
.body .form select:focus,
.body .form textarea:focus,
.body input[type="text"]:focus,
.body input[type="number"]:focus {
  border: 2.5px solid #333333;
  -webkit-box-shadow: 3px 3px 0 #005a9c;
          box-shadow: 3px 3px 0 #005a9c;
}

/* Checkboxes: an ink square, teal with an ink tick when checked. */
.body input[type="checkbox"]:not(.inp-cbx) {
  background-color: #fbefe5;
  border: 2.5px solid #333333;
  border-radius: 6px;
  -webkit-box-shadow: 2px 2px 0 #333333;
          box-shadow: 2px 2px 0 #333333;
  cursor: pointer;
}

.body input[type="checkbox"]:not(.inp-cbx):checked {
  background-color: #93f9e8;
  border-color: #333333;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80% 80%;
}

/* Plain Submit (shown when the server has no Preview/PDF): signature blue. */
.body .button-submit {
  color: #ffffff;
  background-color: #005a9c;
  border: 2.5px solid #333333;
  border-radius: 12px;
  -webkit-box-shadow: 4px 4px 0 #333333;
          box-shadow: 4px 4px 0 #333333;
  font-family: "DM Sans", sans-serif;
}

.body .button-submit:hover {
  background-color: #005a9c;
  -webkit-transform: translate(-2px, -2px);
      -ms-transform: translate(-2px, -2px);
          transform: translate(-2px, -2px);
  -webkit-box-shadow: 6px 6px 0 #333333;
          box-shadow: 6px 6px 0 #333333;
}

.body .button-submit:active,
.body button.button-submit:active {
  background-color: #005a9c;
  -webkit-transform: translate(4px, 4px);
      -ms-transform: translate(4px, 4px);
          transform: translate(4px, 4px);
  -webkit-box-shadow: 0 0 0 #333333;
          box-shadow: 0 0 0 #333333;
}

/* Side-by-side fields (module code, facilitator, reg number and programme)
   have their own older rules in each page's stylesheet; give them the same
   outline, corners and shadow as every other field. The extra "div" outranks
   those rules whichever stylesheet loads last. Focus rules stay stronger, so
   the focus outline still shows. */
.body .form div.ModuleBox div input,
.body .form div.FacilitatorBox div input,
.body .form div.FacilitatorBox div select,
.body .form div.ParticipantBoxInner .box-1 input,
.body .form div.ParticipantBoxInner .box-2 input {
  background-color: #fbefe5;
  border: 2.5px solid #333333;
  border-radius: 12px;
  -webkit-box-shadow: 3px 3px 0 #333333;
          box-shadow: 3px 3px 0 #333333;
}

/* Their outer edges line up with the full-width fields above and below: the
   old 3px side margins become one 8px gap between the fields. */
.body .form div.ModuleBox,
.body .form div.FacilitatorBox,
.body .form div.ParticipantBoxInner {
  gap: 8px;
}

.body .form div.ModuleBox > div,
.body .form div.ParticipantBoxInner > .box-1,
.body .form div.ParticipantBoxInner > .box-2 {
  -webkit-box-flex: 1;
      -ms-flex: 1 1 0px;
          flex: 1 1 0;
  width: auto;
  min-width: 0;
  margin-right: 0;
  margin-left: 0;
}

.body .form div.FacilitatorBox > div {
  min-width: 0;
  margin-right: 0;
  margin-left: 0;
}

/* ---------- Name boxes (Title, First name, Last name) on a phone ----------
   The same on every form: assignment facilitator (individual and group) and
   the Project / Report supervisors and lecturers. The Title box keeps its
   word clear of the dropdown arrow; Title and First name share the first
   line and Last name goes across under them, so each name box is wide
   enough for its hint. (On a computer they stay on one line.) */
@media (max-width: 640px) {
  .body .form div.FacilitatorBox {
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    row-gap: 0;
  }

  .body .form div.FacilitatorBox > div.box-0 {
    -webkit-box-flex: 0;
        -ms-flex: 0 0 86px;
            flex: 0 0 86px;
  }

  .body .form div.FacilitatorBox > div.box-2 {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 0px;
            flex: 1 1 0;
  }

  .body .form div.FacilitatorBox > div.box-1 {
    -webkit-box-flex: 1;
        -ms-flex: 1 0 100%;
            flex: 1 0 100%;
  }

  .body .form div.FacilitatorBox div select {
    padding-right: 28px;
    padding-left: 12px;
    text-align: left;
    -moz-text-align-last: left;
         text-align-last: left;
  }

  .body .form div.FacilitatorBox div input {
    padding-right: 12px;
    padding-left: 14px;
  }
}

/* Very narrow phones (under 380px): First name gets its own line too, so
   its hint is never cut. */
@media (max-width: 379px) {
  .body .form div.FacilitatorBox > div.box-2 {
    -webkit-box-flex: 1;
        -ms-flex: 1 0 100%;
            flex: 1 0 100%;
  }
}

/* ---------- Group participants ---------- */

/* Each participant is a deeper paper card, so its cream fields stand out.
   (The plain white card comes from a style block common_group_cpage.ts adds.) */
.body .participant {
  padding: 10px 14px 14px;
  background: #efd3bf;
  border: 2.5px solid #333333;
  border-radius: 14px;
  -webkit-box-shadow: 4px 4px 0 #333333;
          box-shadow: 4px 4px 0 #333333;
}

.body .participant .drag-handle {
  color: #6e5a4e !important;
}

/* Dragging: the empty slot is a dashed outline, the lifted card a bigger shadow. */
.body .participant.sortable-ghost {
  opacity: 0.45;
  background: transparent;
  border: 2.5px dashed #333333;
  -webkit-box-shadow: none;
          box-shadow: none;
}

.body .participant.sortable-drag {
  background: #efd3bf;
  -webkit-box-shadow: 8px 8px 0 #333333;
          box-shadow: 8px 8px 0 #333333;
}

/* Saved-groups button on the left edge: a round paper button. */
body .group-float {
  background: #f6e2d2;
  border: 2.5px solid #333333;
  -webkit-box-shadow: 3px 3px 0 #333333;
          box-shadow: 3px 3px 0 #333333;
  -webkit-transition:
    -webkit-transform 0.16s ease,
    -webkit-box-shadow 0.16s ease;
  transition:
    -webkit-transform 0.16s ease,
    -webkit-box-shadow 0.16s ease;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    -webkit-transform 0.16s ease,
    -webkit-box-shadow 0.16s ease;
}

/* Lift on hover with a mouse only: on a touch screen :hover sticks after a
   tap and would leave the button raised. */
@media (hover: hover) {
  body .group-float:hover {
    -webkit-transform: translateY(-50%) translate(-2px, -2px);
        -ms-transform: translateY(-50%) translate(-2px, -2px);
            transform: translateY(-50%) translate(-2px, -2px);
    -webkit-box-shadow: 5px 5px 0 #333333;
            box-shadow: 5px 5px 0 #333333;
  }
}

body .group-float:active {
  -webkit-transform: translateY(-50%) translate(3px, 3px);
      -ms-transform: translateY(-50%) translate(3px, 3px);
          transform: translateY(-50%) translate(3px, 3px);
  -webkit-box-shadow: 0 0 0 #333333;
          box-shadow: 0 0 0 #333333;
}

/* Below 900px the gutter beside the 720px sheet is too narrow and the button
   would sit on the form, so it moves to the bottom-right corner. */
@media (max-width: 900px) {
  body .group-float {
    top: auto;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: auto;
    -webkit-transform: none;
        -ms-transform: none;
            transform: none;
  }

  body .group-float:active {
    -webkit-transform: translate(3px, 3px);
        -ms-transform: translate(3px, 3px);
            transform: translate(3px, 3px);
  }
}

@media (max-width: 900px) and (hover: hover) {
  body .group-float:hover {
    -webkit-transform: translate(-2px, -2px);
        -ms-transform: translate(-2px, -2px);
            transform: translate(-2px, -2px);
  }

  /* Repeated after :hover so a click still presses the button in. */
  body .group-float:active {
    -webkit-transform: translate(3px, 3px);
        -ms-transform: translate(3px, 3px);
            transform: translate(3px, 3px);
  }
}

/* ---------- Footer inside the sheet ---------- */

.body .footer {
  color: #f6efe9;
  background: #333333;
  border: 0;
  border-radius: 0 0 15px 15px;
}

.body .footer p,
.body .footer p b,
.body .footer .labelName {
  color: #f6efe9;
}

.body .footer a,
.body .footer a.designer-link {
  color: #93f9e8;
  font-weight: 700;
}

.body .footer a:hover,
.body .footer a.designer-link:hover {
  color: #ffffff;
}

/* ---------- "Preparing cover page" ---------- */

/* The same dark, blurred overlay as the pop-ups, with a paper card. */
.cp-submit-overlay {
  background: rgba(24, 17, 13, 0.62) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.cp-submit-wrap {
  width: min(360px, calc(100vw - 40px));
  min-height: 260px;
  background: #f6e2d2;
  border: 3px solid #333333;
  border-radius: 18px;
  -webkit-box-shadow: 8px 8px 0 #333333;
          box-shadow: 8px 8px 0 #333333;
}

#cp-submit-txt {
  color: #2a211c !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700;
  opacity: 1 !important;
}

.cp-submit-dot {
  background: #2a211c !important;
}

.cp-submit-fazer {
  background: rgba(51, 51, 51, 0.45) !important;
}

.cp-submit-circle-loader {
  border-color: #d0673f !important;
}

/* Grouped fields (module code, facilitator, reg number) have their own,
   more specific border rules; these win so every field looks the same. */
.body .form input[type="text"],
.body .form input[type="number"],
.body .form select,
.body .form textarea {
  color: #2a211c !important;
  background-color: #fbefe5 !important;
  border: 2.5px solid #333333 !important;
  border-radius: 12px !important;
  -webkit-box-shadow: 3px 3px 0 #333333 !important;
          box-shadow: 3px 3px 0 #333333 !important;
  font-family: "DM Sans", sans-serif !important;
}

.body .form input[type="text"]:focus,
.body .form input[type="number"]:focus,
.body .form select:focus,
.body .form textarea:focus {
  -webkit-box-shadow: 3px 3px 0 #005a9c !important;
          box-shadow: 3px 3px 0 #005a9c !important;
}

/* Everything in the footer band reads light on ink. */
.body .footer,
.body .footer * {
  color: #f6efe9;
}

.body .footer a,
.body .footer a * {
  color: #93f9e8;
}

/* ---------- Group page extras ---------- */

/* "+ Participant": the signature blue, outlined. */
.body .add-participant-btn {
  color: #ffffff;
  background: #005a9c;
  border: 2.5px solid #333333;
  border-radius: 12px;
  -webkit-box-shadow: 3px 3px 0 #333333;
          box-shadow: 3px 3px 0 #333333;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  -webkit-transition:
    -webkit-transform 0.14s ease,
    -webkit-box-shadow 0.14s ease;
  transition:
    -webkit-transform 0.14s ease,
    -webkit-box-shadow 0.14s ease;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    -webkit-transform 0.14s ease,
    -webkit-box-shadow 0.14s ease;
}

.body .add-participant-btn:hover:not(:disabled) {
  -webkit-transform: translate(-1px, -1px);
      -ms-transform: translate(-1px, -1px);
          transform: translate(-1px, -1px);
  -webkit-box-shadow: 4px 4px 0 #333333;
          box-shadow: 4px 4px 0 #333333;
}

.body .add-participant-btn:active:not(:disabled) {
  background: #005a9c;
  -webkit-transform: translate(3px, 3px);
      -ms-transform: translate(3px, 3px);
          transform: translate(3px, 3px);
  -webkit-box-shadow: 0 0 0 #333333;
          box-shadow: 0 0 0 #333333;
}

.body .add-participant-btn:disabled {
  color: #8a7366;
  background: #efd3bf;
  border-style: dashed;
  -webkit-box-shadow: none;
          box-shadow: none;
}

/* "Store Group Details" / "Include Signature Column": ink checkboxes that
   turn teal with an ink tick, keeping their little pop animation. */
.checkbox-wrapper-46 .cbx span:last-child {
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  color: #2a211c;
}

.checkbox-wrapper-46 .cbx span:first-child {
  background: #fbefe5;
  border: 2.5px solid #333333;
  border-radius: 6px;
  -webkit-box-shadow: 2px 2px 0 #333333;
          box-shadow: 2px 2px 0 #333333;
}

.checkbox-wrapper-46 .cbx:hover span:first-child {
  border-color: #333333;
}

.checkbox-wrapper-46 .cbx span:first-child svg {
  stroke: #333333;
  stroke-width: 2.6;
}

.checkbox-wrapper-46 .cbx span:first-child:before {
  background: #93f9e8;
}

.checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child {
  background: #93f9e8;
  border-color: #333333;
}

/* ---------- Field report extras ---------- */

.body .form input[type="month"],
.body .form input[type="date"] {
  color: #2a211c !important;
  background-color: #fbefe5 !important;
  border: 2.5px solid #333333 !important;
  border-radius: 12px !important;
  -webkit-box-shadow: 3px 3px 0 #333333 !important;
          box-shadow: 3px 3px 0 #333333 !important;
  font-family: "DM Sans", sans-serif !important;
}

.body .form input[type="month"]:focus,
.body .form input[type="date"]:focus {
  -webkit-box-shadow: 3px 3px 0 #005a9c !important;
          box-shadow: 3px 3px 0 #005a9c !important;
}

.body .form legend {
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  color: #2a211c;
}

/* The intro tip: a paper note instead of a blue box. */
.body .field-report-form__intro {
  color: #3d2f27;
  background: #efd3bf;
  border: 2px dashed #b4643e;
  border-left: 2px dashed #b4643e;
  border-radius: 10px;
  font-family: "DM Sans", sans-serif;
}

/* Even margins: the fields (and their shadows) sit as far from the sheet's
   right edge as from its left, instead of pressing against the border. The
   sheet's own shadow matches the other sheets on the site (6px). */
.body .form {
  margin-right: 30px;
  margin-left: 30px;
}

div.body {
  -webkit-box-shadow: 6px 6px 0 #333333;
          box-shadow: 6px 6px 0 #333333;
}

@media (max-width: 600px) {
  .body .form {
    margin-right: 20px;
    margin-left: 18px;
  }
}

/* University logos are mostly drawn on white; on the sand sheet that showed
   as a white box. Multiply blends the white into the paper and leaves the
   logo's colours as they are. */
.body > .banner > img {
  mix-blend-mode: multiply;
}

/* What a student types reads a little bolder than the grey hints, on every
   cover form. Screen only: the Word file keeps its own fonts. */
.body input[type="text"],
.body input[type="number"],
.body input[type="email"],
.body input[type="tel"],
.body input[type="date"],
.body input[type="month"],
.body textarea,
.body select {
  font-weight: 600;
}

.body input::-webkit-input-placeholder, .body textarea::-webkit-input-placeholder {
  font-weight: 400;
}

.body input::-moz-placeholder, .body textarea::-moz-placeholder {
  font-weight: 400;
}

.body input:-ms-input-placeholder, .body textarea:-ms-input-placeholder {
  font-weight: 400;
}

.body input::-ms-input-placeholder, .body textarea::-ms-input-placeholder {
  font-weight: 400;
}

.body input::placeholder,
.body textarea::placeholder {
  font-weight: 400;
}

/* ---------- The optional question (bottom of the cover) ---------- */

.body .form textarea.cp-question {
  display: block;
  width: 100%;
  min-height: 92px;
  margin-top: 8px;
  padding: 12px 14px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  font-size: 16px;
  line-height: 1.45;
  resize: vertical;
}

.body .cp-question-meta {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: #6b5446;
}

.body .cp-question-meta #QuestionCount {
  -webkit-box-flex: 0;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.body .cp-question-meta #QuestionCount.is-full {
  color: #b23c17;
  font-weight: 700;
}

