/* =========================================
   Auth0 Gate
   ========================================= */

:root {
  --brand: #2f487a;
  --card-max: 520px;
  --radius: 6px;
  --shadow: 0 5px 18px rgba(0,0,0,.12);
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --input-h: 34px;
  --space: 24px;
  --space-sm: 10px;
  --space-md: 14px;
  --space-lg: 16px;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
}

a { color: var(--brand); }

/* Ensure the off-canvas wrapper fills height on admin themes */
.dialog-off-canvas-main-canvas { height: 100%; }

.background-image {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('https://bookweb.org/sites/default/files/gallery/BWBG-062525.png');
  background-size: cover;
  background-position: center;
  filter: blur(8px);
  z-index: -1;
}

.login-container {
  position: relative;
  min-height: 100%;
  padding: var(--space);
  min-width: 0; /* flex/grid safety */
}

.login-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: var(--card-max);
  margin: 0 auto;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  border-top: 1px solid #e9e9e9;
  box-shadow: var(--shadow);
  min-width: 0; /* flex/grid safety */
  overflow: hidden;
}

.login-header {
  text-align: center;
  margin-bottom: 6px;
}

.login-header img {
  width: 90px;
  height: auto;
  opacity: .95;
}

.gate-messages .messages {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 4px;
}

.gate-form .messages--error   { background: #fdecea; color: #611a15; }
.gate-form .messages--status  { background: #edf7ed; color: #1e4620; }

.first-time-message {
  padding: 10px 16px;
  background: #d24827;
  color: #fff;
  border-radius: 14px;
  margin: 10px 0 14px;
}

.first-time-message a { color: #fff; text-decoration: underline; }

.gate-form { min-width: 0; }

.gate-form .form-item {
  margin-bottom: 10px;
  min-width: 0;
}

.gate-form .form-item label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font);
}

/* Inputs (support core classes & plain inputs) */
.gate-form input.form-text,
.gate-form input[type="text"],
.gate-form input[type="email"],
.gate-form input[type="password"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;                 /* override Claro/Gin min-widths */
  box-sizing: border-box;       /* include padding/border in 100% */
  height: var(--input-h);
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

.gate-form input.form-text:focus,
.gate-form input[type="text"]:focus,
.gate-form input[type="email"]:focus,
.gate-form input[type="password"]:focus {
  border-color: #66afe9;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

.gate-form .form-actions { margin-top: 10px; }

.gate-form .form-actions .button,
.gate-form .form-actions input[type="submit"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  font-size: 16px;
  line-height: 1.3;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
}

.gate-form .form-actions .button:hover,
.gate-form .form-actions input[type="submit"]:hover {
  background: #345187;
}

.aux-links { margin-top: 10px; }

.aux-links .reset-link {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid var(--brand);
  color: var(--brand);
  background: #fff;
}

.aux-links .reset-link:hover { background: #f6f8fb; }

.login-box #user-pass input.form-text,
.login-box #user-pass input[type="text"],
.login-box #user-pass input[type="email"] {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #333;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

.login-box #user-pass .form-actions { margin-top: 15px; }

.login-box #user-pass input.form-submit {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  font-size: 16px;
  line-height: 1.3;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
}

.login-box #user-pass input.form-submit:hover { background: #345187; }

.login-box #user-login-form input.form-text,
.login-box #user-login-form input[type="text"],
.login-box #user-login-form input[type="password"],
.login-box #user-login-form input[type="email"] {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #333;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

.login-box #user-login-form input.form-text:focus,
.login-box #user-login-form input[type="text"]:focus,
.login-box #user-login-form input[type="password"]:focus,
.login-box #user-login-form input[type="email"]:focus {
  border-color: #66afe9;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

.login-box #user-login-form .form-item,
.login-box #user-pass .form-item {
  margin-bottom: 10px;
}

.login-box #user-login-form .form-item label,
.login-box #user-pass .form-item label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

.login-box .btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 10px 16px;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
}

.login-box .btn-primary {
  background: var(--brand);
  color: #fff;
}

.login-box .btn-primary:hover {
  background: #345187;
  color: #fff;
}

.login-box .btn-default {
  background: #fff;
  color: var(--brand);
  border-color: var(--brand);
}

.login-box .btn-default:hover {
  background: #f6f8fb;
}

@media (max-width: 480px) {
  .login-box { padding: 18px; }
}

.auth0-logout-message {
  text-align: center;
  padding-top: 15px;
}
