/* =========================
   ScholaLudus Auth UI
   ========================= */

.sl-auth {
  max-width: 560px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* Title (pokud ho někde máš uvnitř .sl-auth) */
.sl-auth h1,
.sl-auth h2,
.sl-auth h3 {
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

/* =========================
   Messages
   ========================= */

.sl-auth-errors {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #8a1f11;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  margin: 0 0 1rem 0;
}

.sl-auth-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.sl-auth-success {
  background: #e6f4ea;
  border: 1px solid #b7dfc4;
  color: #1e4620;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  margin: 0 0 1rem 0;
}

/* =========================
   Form base
   ========================= */

.sl-auth form {
  margin: 0;
}

.sl-field {
  display: flex;
  flex-direction: column;
}

.sl-field label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 14px;
  color: #222;
}

.sl-field input,
.sl-field select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d1d1d1;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
}

.sl-field input::placeholder {
  color: #9a9a9a;
}

.sl-field input:focus,
.sl-field select:focus {
  outline: none;
  border-color: #666;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

/* Buttons */
.sl-auth button[type="submit"],
.sl-auth .sl-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.02s ease, background 0.15s ease, border-color 0.15s ease;
}

.sl-auth button[type="submit"] {
  width: 100%;
  background: #222;
  color: #fff;
}

.sl-auth button[type="submit"]:hover {
  background: #000;
}

.sl-auth button[type="submit"]:active {
  transform: translateY(1px);
}

/* Links under forms */
.sl-auth-links {
  margin-top: 1rem;
  font-size: 14px;
  text-align: center;
  color: #444;
}

.sl-auth-links a {
  color: #1e73be;
  text-decoration: none;
}

.sl-auth-links a:hover {
  text-decoration: underline;
}

/* =========================
   Register layout (2 columns)
   ========================= */

.sl-auth-register form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.4rem;
  align-items: start;
}

/* Full width field helper:
   Stačí v HTML přidat class "sl-field sl-field--full" */
.sl-auth-register .sl-field--full {
  grid-column: 1 / -1;
}

/* Submit button full width */
.sl-auth-register .sl-field button[type="submit"] {
  width: 100%;
}

.sl-auth-register .sl-field:has(button[type="submit"]) {
  grid-column: 1 / -1;
}

/* Pokud prohlížeč neumí :has(), můžeš místo toho dát submit fieldu class sl-field--full */
@supports not selector(:has(*)) {
  .sl-auth-register .sl-field.sl-field--submit {
    grid-column: 1 / -1;
  }
}

/* Mobile */
@media (max-width: 800px) {
  .sl-auth {
    margin: 1.5rem 1rem;
    padding: 1.5rem;
  }

  .sl-auth-register form {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* =========================
   Auth gate (when not logged in)
   ========================= */

.sl-auth-gate {
  max-width: 640px;
  margin: 3rem auto;
  padding: 1.75rem;
  background: #fff;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.sl-auth-gate__msg {
  font-size: 16px;
  margin: 0;
  color: #222;
}

.sl-auth-gate__actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.sl-auth-btn--primary {
  background: #222;
  color: #fff;
}

.sl-auth-btn--primary:hover {
  background: #000;
}

.sl-auth-btn--secondary {
  background: #f0f0f0;
  border-color: #e2e2e2;
  color: #111;
}

.sl-auth-btn--secondary:hover {
  background: #e8e8e8;
}

.sl-auth-gate__links {
  margin-top: 1rem;
  text-align: center;
  font-size: 14px;
}

.sl-auth-gate__links a {
  text-decoration: none;
  color: #1e73be;
}

.sl-auth-gate__links a:hover {
  text-decoration: underline;
}

/* LOGIN + FORGOT: nemají .sl-field wrappery, tak stylujeme přímo potomky formu */
.sl-auth-login form,
.sl-auth-forgot form {
  display: grid;
  gap: 1rem;
}

.sl-auth-login form label,
.sl-auth-forgot form label {
  display: block;
  font-weight: 600;
  margin: 0;
}

.sl-auth-login form input,
.sl-auth-forgot form input,
.sl-auth-login form select,
.sl-auth-forgot form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  margin: 0;
}

.sl-auth-login form button,
.sl-auth-forgot form button {
  width: 100%;
  padding: 0.75rem 1.1rem;
  border-radius: 8px;
  background: #222;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border: none;
}

.sl-auth-login form button:hover,
.sl-auth-forgot form button:hover {
  background: #000;
}


/* Center Nextend Social Login buttons */
.nsl-container {
    text-align: center;
}

.nsl-container .nsl-button {
    margin: 0 auto;
}
