.background {
  height: 100%;
  min-height: 100vh;
  width: 100%;
  min-width: 75px;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* `safe`, not a plain `center`. Centred flex content that overflows its
     container cannot be scrolled back to at the start edge, so in a task pane the
     top of the error box became permanently unreadable -- measured at 47px above
     the scrollable area with no way to reach it. `safe` falls back to start
     alignment exactly when the content overflows, and is inert otherwise, so the
     centring everywhere else is unchanged. */
  justify-content: safe center;
  gap: 32px;
  background-color: #02001A;
  background-image: url('https://static-cdn.linksquares.com/shared/login-background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateY(-95vh);
}

.divider {
  width: 1px;
  height: 180px;
  margin: 0 64px;
  background: linear-gradient(
          0deg,
          rgba(255, 255, 255, 0) 0%,
          rgba(255, 255, 255, 0.2) 10%,
          rgba(255, 255, 255, 0.2) 90%,
          rgba(255, 255, 255, 0) 100%
  );
}

@media (max-width: 768px) {
  .divider {
    width: 180px;
    height: 1px;
    margin: 32px 0;
    background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 10%,
            rgba(255, 255, 255, 0.2) 90%,
            rgba(255, 255, 255, 0) 100%
    );
  }
}

.stack {
  display: flex;
  flex-direction: row;
  align-items: center;
}

@media (max-width: 768px) {
  .stack {
    flex-direction: column;
  }
}

.custom-link-button,
.custom-link-button:hover,
.custom-link-button:focus,
.custom-link-button:active {
  font-weight: 500;
  font-size: 24px;
  line-height: 29px;
  font-family: inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: white;
}

.login-button {
  background: none!important;
  border: none;
  padding: 0!important;
  /*optional*/
  /*font-family: arial, sans-serif;*/
  /*input has OS specific font-family*/
  text-decoration: underline;
  cursor: pointer;
}

.login-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.deploy-id-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 280px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: left;
}

.deploy-id-label {
  font-family: inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff !important;
  margin-bottom: 4px;
}

.deploy-id-hint {
  font-size: 13px;
  font-weight: 400;
  color: #ffffff !important;
  font-style: italic;
  opacity: 0.85;
}

.deploy-id-input {
  font-family: inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  outline: none;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.deploy-id-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.deploy-id-input:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 127, 53, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 127, 53, 0.1);
}

/* Override browser autofill styles */
.deploy-id-input:-webkit-autofill,
.deploy-id-input:-webkit-autofill:hover,
.deploy-id-input:-webkit-autofill:focus {
  -webkit-text-fill-color: white;
  -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.deploy-id-description {
  font-family: inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 13px;
  color: #ffffff !important;
  margin: 0;
  line-height: 1.5;
  opacity: 0.9;
}

/* Error display section */
/* An author-level `display` beats the user-agent stylesheet's
   `[hidden] { display: none }`, so without this the add-in's status box -- which
   starts hidden and is only filled in once the login poll reports something --
   rendered as an empty outline on every sign-in. Kept next to the display it
   corrects rather than as a global [hidden] rule, so it cannot surprise anything
   else. */
.error-section[hidden] {
  display: none;
}

.error-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 16px;
}

.error-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 500px;
  width: calc(100% - 32px);
  padding: 16px;
  box-sizing: border-box;
  background: rgba(255, 193, 7, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 193, 7, 0.4);
  text-align: start;
}

.error-title {
  font-family: inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: rgb(249, 100, 37) !important;
  margin: 0 0 8px 0;
  padding: 0;
}

.error-message {
  font-family: inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: rgb(229, 231, 235) !important;
  margin: 0;
  padding: 0;
  line-height: 21px;
}

.error-message a {
  color: rgb(255, 127, 53);
  text-decoration: underline;
}

.error-message a:hover {
  color: rgb(255, 160, 100);
}

.error-subdomain {
  font-weight: 600;
  color: rgb(229, 231, 235) !important;
}

.subdomain-hint {
  font-family: inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  line-height: 1.5;
  text-align: center;
}

.subdomain-highlight {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

/* Deliberately not position:fixed. As an overlay it covered the Continue button
   whenever the org prompt grew past the pane height -- an error box above the form,
   or the deploy-id field outside production -- and being painted on top it
   swallowed the clicks as well, so the form could not be submitted at all. It is
   now a flex child of .background (see organization/new.html.erb) and flows after
   the content instead. The trade is that it sits below the form rather than pinned
   to the bottom of a tall viewport, which suits a centred layout anyway. */
.org-footer {
  text-align: center;
  padding: 12px 16px;
  max-width: 420px;
}

.org-footer p {
  font-family: inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.org-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

.org-footer a:hover {
  color: #ffffff;
}

/* The add-in dialog's own pages (auth0/dialog_failed) render standalone, with no
   .background wrapper -- that one paints the full-bleed marketing image and carries
   a translateY(-95vh) offset belonging to the login layout, neither of which suits a
   dialog the size of a phone screen. Without a wrapper of its own the error box sat
   flush against the top edge. */
.dialog-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.dialog-page main {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Narrow viewport support for Word Add-in task pane */
@media (max-width: 400px) {
  .background {
    gap: 16px;
  }

  .error-section {
    padding: 0 8px;
  }

  .error-content {
    width: calc(100% - 16px);
  }

  .error-title {
    font-size: 16px;
  }

  .error-message {
    font-size: 13px;
  }

  .stack {
    flex-direction: column;
    padding: 0 8px;
  }

  .divider {
    width: 180px;
    height: 1px;
    margin: 16px 0;
    background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 10%,
            rgba(255, 255, 255, 0.2) 90%,
            rgba(255, 255, 255, 0) 100%
    );
  }

  .deploy-id-section {
    width: calc(100% - 32px);
    max-width: 280px;
  }

  .custom-link-button,
  .custom-link-button:hover,
  .custom-link-button:focus,
  .custom-link-button:active {
    font-size: 20px;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Prevent white flash during page loads and redirects */
html, body {
  background-color: rgb(35, 30, 71);
  margin: 0;
  padding: 0;
}
