/*
 * EduGames - Interactive Learning Games
 * (c) 2025-2026 Prof. N. All rights reserved.
 *
 * File:    styles/components/footer.css
 * Updated: 2026-10-04 13:01
 * Purpose: The one footer of every page (index.html): the Join / Feedback / About buttons and the copyright line,
 *          centered; the box is as wide as the page column.
 */

#global-footer {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--page-column);
  margin: var(--space-2) auto 0;
  padding: 0.4rem var(--page-gutter, 1rem);
  background-color: var(--bg-panel);
  border: var(--border-width-thin) solid var(--border-color);
  border-bottom: 0;
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  text-align: center;
}

.footer-content {
  container: footer / inline-size; /* the buttons drop their words when they do not fit in one line (see below) */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  box-sizing: border-box;
  width: 100%;
  max-width: var(--page-column);
  margin: 0 auto;
}

/* the copyright line sits under the buttons, so the footer stays narrow */
.footer-copy {
  flex: 1 1 100%;
  order: 3;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap; /* on a very narrow screen the buttons wrap instead of losing their labels */
  justify-content: center;
  gap: 0.4rem;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 1.9rem;
  margin: 0;
  padding: 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 1px 2px var(--shadow-color);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.footer-btn:hover {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 9%, var(--bg-card));
}

.footer-btn:active {
  box-shadow: none;
  transform: translateY(1px);
}

.footer-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.footer-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The three buttons need about 340 px with their words; in a narrower footer only the symbols stay (the words stay
   available to screen readers and as tooltips) */
@container footer (max-width: 345px) {
  .footer-btn {
    padding: 0 0.55rem;
  }

  .footer-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
