.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;
  justify-content: 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 */
.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;
}

.org-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 12px 16px;
}

.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;
}

/* 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;
  }
}
