/* Shared site styles, loaded by templates/gate_warden/_root.html on every
 * page. Brand styling lives here once — do not redefine these in template
 * <style> blocks. */

/* --- Brand button ------------------------------------------------------ */
/* Mason green via Bootstrap 5.3 button custom properties so every state
 * (hover/active/disabled/border/focus ring) derives from the brand color. */
.btn-success {
  --bs-btn-bg: #006633;
  --bs-btn-border-color: #006633;
  --bs-btn-hover-bg: #00532a;
  --bs-btn-hover-border-color: #00532a;
  --bs-btn-active-bg: #004a26;
  --bs-btn-active-border-color: #004a26;
  --bs-btn-disabled-bg: #006633;
  --bs-btn-disabled-border-color: #006633;
  --bs-btn-focus-shadow-rgb: 0, 102, 51;
}

/* --- Layout / sections -------------------------------------------------- */
.navbar-brand {
  font-weight: bold;
  font-size: 1.25rem;
}

.hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 1rem;
}

.bg-viewport-full {
  background-color: #e8f0ef;
  width: 100%;
}

.bg-gmu-dark {
  background-color: #00543c;
  color: white;
}

.bg-about-gray {
  background-color: #efefef;
  color: #000;
}

.bg-gmu-dark .btn-outline-light:hover {
  background-color: white;
  color: #00543c;
  border-color: white;
}

.bg-light-green {
  background-color: #cef6e3ff;
}

.btn-cta {
  background-color: #198754;
  color: white;
}

.btn-cta:hover {
  background-color: #157347;
  color: white;
}

.btn-outline-white {
  border: 2px solid white;
  color: white;
  background-color: transparent;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
}

.btn-outline-white:hover {
  background-color: white;
  color: #00543c;
  text-decoration: none;
}

/* Icon bubble on the "how it works" cards. */
.icon-circle {
  width: 50px;
  height: 50px;
}

.lucide-dollar-sign path {
  stroke: #006400;
}

/* Vertical rule between the two stats in the index sidebar card. */
.stat-divider {
  position: absolute;
  left: 49%;
  top: 24px;
  height: 56px;
  width: 1px;
  background: #ccc;
  z-index: 1;
}

.circular-progress {
  --size: 80px;
  --thickness: 8px;
  --value: 50;
  --fill: #198754;
  --track: #e6e6e6;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(closest-side, white 79%, transparent 80% 100%),
    conic-gradient(var(--fill) calc(var(--value) * 1%), var(--track) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  margin: 0 auto 0.5rem auto;
}

/* --- Dashboard layout ---------------------------------------------------- */
/* Two-column dashboard only at >=1024px; anything narrower stacks the
   progress sidebar under the chain card. 1024 is deliberate (iPad landscape
   keeps two columns) — Bootstrap's lg (992) would squeeze the sidebar. */
@media (min-width: 1024px) {
  .col-dash-main {
    width: 75%;
  }

  .col-dash-side {
    width: 25%;
  }
}

/* --- Chain tree (dashboard) --------------------------------------------- */
.layer {
  position: relative;
  padding-top: 1.75rem; /* reserve space above for the inbound line + label */
  margin-bottom: 25px;
}

/* vertical line going UP into this layer */
.layer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 1.75rem;
  border-left: 2px solid #d0d0d0;
}

/* horizontal bracket around the centered branch content */
.layer-branch {
  position: relative;
  width: fit-content;
  /* Floor the width so the bracket always extends past the label (which is
     absolutely positioned and doesn't contribute to fit-content) — keeps the
     bracket's downturned corners outside the label even with no avatars. */
  min-width: 240px;
  max-width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1rem 0;
}

.layer-branch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1rem;
  border-top: 2px solid #d0d0d0;
  border-left: 2px solid #d0d0d0;
  border-right: 2px solid #d0d0d0;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  z-index: 0;
}

.layer-branch > * {
  position: relative;
  z-index: 1;
}

/* First layer has no inbound line */
.layer-root::before {
  display: none;
}

/* Outlined label threaded onto the vertical/horizontal connector junction at
   the top-center of each layer. Higher specificity than `.layer-branch > *`
   so it stays absolutely positioned and out of the flex flow. */
.layer-branch > .layer-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: #fff;
  border: 1px solid #c0c0c0;
  border-radius: 999px;
  padding: 0.1rem 0.65rem;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #6c757d;
  white-space: nowrap;
}

/* "Invite more" action button in the chain. Solid green with a white "+",
   highlighted by a slow pulsing halo so it reads as the call-to-action and
   stays distinct from the green "chain completed" trophy badges. */
.invite-btn {
  animation: invite-pulse 2s ease-in-out infinite;
}

@keyframes invite-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.5); }
  70%  { box-shadow: 0 0 0 12px rgba(25, 135, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

/* Respect users who prefer less motion — keep it static for them. */
@media (prefers-reduced-motion: reduce) {
  .invite-btn {
    animation: none;
  }
}

/* --- Google/Apple sign-in buttons (login page) --------------------------- */
/* Google's official material button styling, applied to <a> elements. */
.gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-appearance: none;
  background-color: WHITE;
  background-image: none;
  border: 1px solid #747775;
  border-radius: 4px;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: 'Roboto', arial, sans-serif;
  font-size: 17px;
  height: 44px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s;
  vertical-align: middle;
  white-space: nowrap;
  width: auto;
  max-width: 700px;
  min-width: min-content;
}

/* The sign-in controls are anchors styled as buttons (valid HTML; a <button>
 * may not nest inside an <a>) — suppress link styling on them. */
a.gsi-material-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 12px;
  min-width: 20px;
  width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: center;
  position: relative;
  width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
  flex-grow: 0;
  font-family: 'Roboto', arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  transition: opacity 0.218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.gsi-material-button:active .gsi-material-button-state,
.gsi-material-button:focus .gsi-material-button-state {
  background-color: #303030;
  opacity: 12%;
}

.gsi-material-button:hover {
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.gsi-material-button:hover .gsi-material-button-state {
  background-color: #303030;
  opacity: 8%;
}
