/* Import font */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@font-face {
  font-family: "Stanford";
  src: url("https://www-media.stanford.edu/assets/fonts/stanford.woff")
      format("woff"),
    url("https://www-media.stanford.edu/assets/fonts/stanford.ttf")
      format("truetype");
  font-weight: 300;
  font-display: swap;
}
/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --text-color: rgb(14, 26, 128);
  --student-text-color: rgb(59, 63, 101);
  --accent-color: #2545bf;
  --button-color: rgb(255, 169, 112);
  --submit-color: rgb(217, 84, 32);
  --submit-disabled-color: rgb(129, 129, 129);
  --suggesting-color: rgba(255, 70, 70, 0.496);
  --suggestion-color: rgba(49, 131, 255, 0.508);
}

body {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-color);
  background-image: linear-gradient(
    180deg,
    rgba(192, 216, 252, 0.72) 0%,
    #ffffff 100%
  );
  background-attachment: fixed;
  /* background-color: #ebd7a1; */
  /* padding: 1rem; */
  overflow-y: scroll;
  min-width: 320px;
}

.stanford-bar {
  font-size: 20px;
  line-height: 1;
  color: white;
  background-color: rgb(140, 21, 21);
  font-family: "Stanford", "serif";
  font-weight: 400;
  padding-left: 1rem;
  padding-bottom: 0.2rem;
  padding-top: 0.4rem;
  -webkit-font-smoothing: antialiased; /* For Chrome, Safari, and other WebKit-based browsers */
  -moz-osx-font-smoothing: grayscale; /* For Firefox on macOS */
  font-smooth: auto; /* Standard property, though not widely supported */
  text-rendering: optimizeLegibility;
}
.stanford-bar a {
  text-decoration: none;
  color: white;
  font-weight: 400;
  letter-spacing: normal;
}
.stanford-bar a:hover,
.stanford-bar a:focus {
  text-decoration: none;
  color: white;
}

.topnav {
  width: 100%;
  padding: 1rem;
  background-color: white;
  /* display: flex; */
  position: relative;
  margin-bottom: 1rem;
}

.topnav .logout {
  position: absolute;
  display: flex;
  /* top: 1rem;
  left: 1rem; */
  align-items: center;
  flex: 0 0 auto;
}
/* Layout the icon left of the text */
.infobox {
  max-width: 50rem;
  margin-inline: auto;
  display: flex;
  align-items: center; /* vertically center glyph and text */
  gap: 0.75rem;
}

/* Make the glyph a fixed-size left element (circle icon) */
.infoglyph {
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px; /* fixed width */
  height: 36px;
}

/* Text takes remaining space */
.infotext {
  flex: 1;
}

.flash-container {
  max-width: 50rem;
  margin-inline: auto;

  align-items: center;
}
.flash {
  margin-top: 1rem;
  color: red;
}

.content {
  margin-bottom: 10rem;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .login-form {
    margin: 1rem auto;
    padding: 1.5rem;
  }

  .content {
    margin: 1rem;
    margin-bottom: 10rem;
  }
}
@media (max-width: 62rem) {
  .topnav .logout {
    display: block;
    position: relative;
    /* left: inherit;
    right: inherit; */
    display: block;
    margin-bottom: 1rem;
  }
}

h1 {
  padding-bottom: 1rem;
  text-align: center;
}

/* Login Form */
.login-form {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.google-login-button {
  padding-top: 1rem;
}

.login-form input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: #007bff;
}

.login-button {
  padding: 0.5rem;
  background: #d95420;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-button:hover {
  background: rgb(196, 73, 29);
}

.login-form input[type="submit"] {
  width: 100%;
  padding: 0.75;
  margin-bottom: 0;
  background: #d95420;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-form input[type="submit"]:hover {
  background: rgb(196, 73, 29);
}

.greetings {
  text-align: center;
  max-width: 50rem;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem auto;
}

/* Feedback */
.feedback {
  max-width: 50rem;
  width: 100%;
  margin: 0 auto 1rem auto; /* centers horizontally, keeps bottom margin */
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 4px 4px 0px rgba(14, 26, 128, 0.25);
  border: 1px solid var(--text-color);
}

.feedback-header {
  padding: 1rem;
  background: white;
  /* background: #e9ecef; */
  /* border-bottom: 1px solid #caccce; */
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feedback-header-text {
  font-weight: 600;
  /* color: #41474b; */
  color: var(--text-color);
  font-size: 0.9rem;
}

.feedback-toggle::after {
  content: "▼";
  display: inline-block;
  transition: transform 0.075s;
}

.feedback.collapsed .feedback-toggle::after {
  transform: rotate(-90deg);
}

.feedback-content {
  padding: 2rem;
  border-top: 1px solid var(--text-color);
  border-bottom: 1px solid #f1f3f4;
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.feedback.collapsed .feedback-content {
  visibility: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 0px;
}

.feedback-move-description {
  font-weight: 400;
  padding: 2rem;
  border: 1px solid var(--text-color);
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 5px 5px 0px var(--suggestion-color);
}

.feedback-move {
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.feedback-instructions {
  margin-top: 1rem;
  font-weight: 400;
}

.feedback-polarity {
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.feedback-negative {
  margin-bottom: 0;
  margin-top: 2rem;
}

.feedback-positive {
  margin-bottom: 1rem;
  margin-top: 2rem;
}
.feedback-text {
  line-height: 1.7;
}

/* Sub-feedback */
.sub-feedback {
  /* margin-left: 1rem; */
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--accent-color);
  background: #f8f9fa;
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}
.sub-feedback.no-btm {
  margin-bottom: 0;
}

.sub-feedback-header {
  padding: 0.75rem;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e9ecef;
}

.sub-feedback-title {
  font-weight: 400;
  font-size: 0.9rem;
}

.sub-feedback-toggle::after {
  content: "▼";
  display: inline-block;
  font-size: 0.8rem;
  transition: transform 0.075s;
}

.sub-feedback.collapsed .sub-feedback-toggle::after {
  transform: rotate(-90deg);
}

.sub-feedback-content {
  padding: 0.75rem;
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.sub-feedback.collapsed .sub-feedback-content {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.sub-feedback-text {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Activity Table */
.activity {
  width: 100%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.activity table {
  width: 100%;
  border-collapse: collapse;
}

.activity th,
.activity td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.activity th {
  background: #f8f9fa;
  font-weight: 600;
  font-size: 0.9rem;
  color: #495057;
}

.activity tbody tr:hover {
  background: #f8f9fa;
}

.activity tbody tr:last-child td {
  border-bottom: none;
}

.feedback-text-table {
  border-collapse: collapse;
  border-width: 1px;
  /* border-style: solid; */
  border-radius: 5px;
  border-color: #0e1a80;
  /* background-color: #D95420; */
}
.feedback-text-table td {
  padding: 0.25rem 0.5rem;
}

.feedback-table-role {
  vertical-align: top;
}

.feedback-row-copy {
  font-weight: 600;
  font-style: italic;
}

.feedback-row-STUDENT {
  color: var(--student-text-color);
  /* background-color: #e9ecef; */
  /* font-style: italic; */
}

.feedback-row-suggesting {
  text-decoration: underline solid var(--suggesting-color) 5px;
  text-decoration-skip-ink: none;
  /* background-color: rgba(255, 139, 139, 0.309); */
  /* background: linear-gradient(
    to top,
    transparent 10%,
    var(--suggesting-color) 10%,
    var(--suggesting-color) 55%,
    transparent 45%
  ); */

  font-weight: 500;
}
.feedback-row-suggestion {
  text-decoration: underline solid var(--suggestion-color) 5px;
  text-decoration-skip-ink: none;
  /* background: linear-gradient(
    to top,
    transparent 10%,
    var(--suggestion-color) 10%,
    var(--suggestion-color) 55%,
    transparent 45%
  ); */
  font-weight: 500;
}

/* gauge */
.progress-bar-header {
  width: 100%;
  font-weight: 500;
  text-align: center;
}
.progress-bar-header b {
  font-weight: 700;
}

.progress-bar-container {
  /* display: flex; */
  align-items: center;
  margin-inline: auto;
  margin-top: 2rem;
}
.progress-bar-description {
  text-align: center;
  font-style: italic;
}

.progress-bar-canvas-container {
  margin-inline: auto;
  width: fit-content;
}

.progress-bar-canvas {
  margin-inline: auto;
  width: 222px;
  height: 130px;
}

/* Survey */

.survey-container {
  font-weight: 400;
  padding: 2rem;
  border: 1px solid var(--text-color);
  border-radius: 8px;
  margin-top: 2rem;
  box-shadow: 5px 5px 0px rgba(217, 84, 32, 0.5);
}

.survey-intro {
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.hidden {
  display: none;
}

.question-container {
  margin-bottom: 1rem;
}

.survey-textarea {
  margin-top: 0.5rem;
  font-family: inherit;
  width: 100%;
  max-width: 100%;
  height: 4rem;
  resize: none;
}

.survey-form input[type="submit"] {
  padding: 0.5rem;
  margin-bottom: 0;
  background: var(--submit-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}
.survey-form input[type="submit"]:disabled {
  background: var(--submit-disabled-color);
  cursor: default;
}

.survey-required::after {
  content: "*";
  color: var(--submit-color);
}

fieldset {
  border: none;
}

.survey-thanks {
  font-weight: 600;
  text-align: center;
}

@media (max-width: 400px) {
  .feedback-content {
    padding: 1rem;
  }
  .feedback-move-description {
    padding: 1rem;
  }
  .survey-container {
    padding: 1rem;
  }
}
