/* Eki Sapo login/timeout page styles (D7-like) */

.user-header {
  width: 100%;
}
.user-header-line {
  border: 0;
  height: 2px;
  background: #cfcfcf;
  margin: 0;
}

/* Page wrapper (only on login/timeout templates) */
#contents_wrapper {
  min-height: calc(100vh - 40px);
  display: block;
  /* D7 近似のブルーグラデーション背景 */
  background: linear-gradient(180deg, #0a5a92 0%, #0d6aa6 50%, #0d5f95 100%);
}
#contents {
  width: 960px;
  max-width: 96%;
  margin: 0 auto;
}
.contents_logo {
  display: block;
  margin: 24px auto 12px;
  max-width: 100%;
  height: auto;
}

/* Title */
.login-title {
  text-align: center;
  color: #e6f1fb;
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 1px;
  margin: 4px 0 16px;
}

.login-form-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 520px;
  max-width: 100%;
  margin: 0 auto;
}
.timeout-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Center the wrapper itself similar to login wrapper */
  width: 520px;
  max-width: 100%;
  margin: 0 auto;
  /* Make text white by default in timeout area */
  color: #fff;
}

.login-form-wrapper .user-login-form,
.timeout-contents {
  width: 350px;
  max-width: 100%;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Links under the form */
.login-links {
  width: 520px;
  max-width: 100%;
  margin-top: 12px;
  text-align: left;
}
.login-link {
  color: #e6f1fb;
  text-decoration: none;
}
.login-link:hover {
  text-decoration: underline;
}

/* Form tweaks for Drupal core login */
.user-login-form .form-item {
  margin-bottom: 12px;
}
.user-login-form label {
  font-weight: 600;
}
.user-login-form input[type="text"],
.user-login-form input[type="password"] {
  width: 100%;
  box-sizing: border-box;
}
.user-login-form .form-actions {
  margin-top: 16px;
}

/* Password request page wrappers */
.password-form-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 520px;
  max-width: 100%;
  margin: 0 auto;
}
.password-form-contents {
  width: 520px;
  max-width: 100%;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.password-form-message {
  color: #fff;
  margin-bottom: 12px;
}

/* Password reset page wrappers */
.reset-form-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 520px;
  max-width: 100%;
  margin: 0 auto;
}
.reset-form-contents {
  width: 520px;
  max-width: 100%;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Timeout page */
.timeout-contents label {
  display: block;
  color: #fff;
  line-height: 1.7;
}
.user_link {
  color: #fff;
  text-decoration: none;
}
.user_link:hover {
  text-decoration: underline;
}

/* ===== Drupal 管理ツールバー（Admin Toolbar）を非表示 ===== */
/* /timeout や login 等でツールバーを非表示にする */
#toolbar-bar,
#toolbar-administration,
.toolbar-tray,
.toolbar-loading {
  display: none !important;
}

/* Toolbar による余白付与を打ち消す */
body.toolbar-fixed,
body.toolbar-tray-open,
body.toolbar-horizontal,
body.toolbar-vertical {
  padding-top: 0 !important;
}

/* 上位ラッパのマージン/パディング補正 */
.dialog-off-canvas-main-canvas,
.layout-container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* --- Robust centering overrides (ensure the form centers even inside blocks) --- */
.login-form-wrapper form.user-login-form {
  width: 520px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 24px 28px;
}
.login-form-wrapper [id^="block-"] form.user-login-form,
.login-form-wrapper .block-system form.user-login-form {
  width: 520px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Align helper links container with the centered card */
.login-form-wrapper .login-links {
  width: 520px;
  max-width: 100%;
  margin: 12px auto 0;
}
