/* =========================
   Buttons
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  max-width: 100%;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 3px solid rgba(98, 196, 181, 0.55);
  outline-offset: 3px;
}

.btn-primary {
  color: var(--color-white);
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 6px 16px rgba(240, 120, 123, 0.2);
}

.btn-primary:hover {
  background: #e96870;
  border-color: #e96870;
}

.btn-secondary {
  color: var(--color-navy);
  background: var(--color-white);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-pale-aqua);
  border-color: var(--color-mint);
}

.btn-large {
  min-height: 50px;
  padding-inline: 24px;
}

.edu-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.edu-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-navy);
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.edu-back:not(:disabled):hover { background: var(--color-pale-aqua); color: var(--color-navy); }
.edu-back:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.edu-back svg { width: 16px; height: 16px; flex: none; }
.edu-back-icon { justify-content: center; min-width: 44px; }

.form-control {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--color-mint);
  outline: none;
  box-shadow: 0 0 0 3px rgba(98, 196, 181, 0.18);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--color-navy);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.edu-confirm-dialog {
  box-sizing: border-box;
  width: min(440px, calc(100% - 32px));
  padding: clamp(20px, 5vw, 28px);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-mint);
  border-radius: 20px;
  background: var(--color-white);
  color: var(--color-navy);
  font: 400 14px/1.6 "Poppins", sans-serif;
  box-shadow: 0 24px 64px rgba(31, 45, 61, 0.2);
  overflow-wrap: anywhere;
}

.edu-confirm-dialog::backdrop { background: rgba(31, 45, 61, 0.55); }
.edu-confirm-dialog.is-danger { border-top-color: var(--color-primary); }
.edu-confirm-dialog h2 { margin: 0 0 8px; font-size: 20px; }
.edu-confirm-dialog p { margin: 0; color: var(--color-text-muted); }
.edu-confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* =========================
   Accessibility
========================= */

button:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}
.edu-loader {
  display: grid;
  justify-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 22px 12px;
  color: var(--color-text-muted, #64748b);
  font-size: 13px;
}

.edu-loader[hidden], .btn[hidden] { display: none; }
.edu-loaded-stack:not([hidden]) { display: contents; }

.edu-loader::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 3px solid #e0eeeb;
  border-top-color: #287f73;
  border-right-color: #287f73;
  border-radius: 50%;
  animation: edu-loader-spin 750ms linear infinite;
}

@keyframes edu-loader-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .edu-loader::before { animation: none; }
}
