/**
 * Login runtime bootstrap.
 *
 * Adds the pending class before the login runtime rearranges the page. If the
 * runtime does not finish, the fallback class restores the default structure.
 */

( function() {
  'use strict';

  var root = document.documentElement;

  root.classList.add( 'pdt-login-runtime-pending' );

  window.setTimeout( function() {
    if ( root.classList.contains( 'pdt-login-runtime-pending' ) ) {
      root.classList.remove( 'pdt-login-runtime-pending' );
      root.classList.add( 'pdt-login-runtime-fallback' );
    }
  }, 4000 );
}() );
